Class: PkgForge::Forge
- Inherits:
-
Object
- Object
- PkgForge::Forge
- Defined in:
- lib/pkgforge/forge.rb
Overview
Real Forge object
Instance Attribute Summary collapse
-
#build_block ⇒ Object
Returns the value of attribute build_block.
-
#cflags ⇒ Object
Returns the value of attribute cflags.
-
#configure_flags ⇒ Object
Returns the value of attribute configure_flags.
-
#deps ⇒ Object
Returns the value of attribute deps.
-
#libs ⇒ Object
Returns the value of attribute libs.
-
#license ⇒ Object
Returns the value of attribute license.
-
#name ⇒ Object
Returns the value of attribute name.
-
#org ⇒ Object
Returns the value of attribute org.
-
#patches ⇒ Object
Returns the value of attribute patches.
-
#test_block ⇒ Object
Returns the value of attribute test_block.
-
#version_block ⇒ Object
Returns the value of attribute version_block.
Instance Method Summary collapse
- #build! ⇒ Object
-
#initialize(params = {}) ⇒ Forge
constructor
A new instance of Forge.
- #push! ⇒ Object
- #test! ⇒ Object
Methods included from Helpers
#dep, #releasedir, #run, #test_run
Constructor Details
#initialize(params = {}) ⇒ Forge
Returns a new instance of Forge.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pkgforge/forge.rb', line 23 def initialize(params = {}) = params @license = 'LICENSE' @deps = {} @flags = {} @patches = [] @build_block = proc { raise('No build block provided') } @test_block = proc { raise('No test block provided') } nil end |
Instance Attribute Details
#build_block ⇒ Object
Returns the value of attribute build_block.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def build_block @build_block end |
#cflags ⇒ Object
Returns the value of attribute cflags.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def cflags @cflags end |
#configure_flags ⇒ Object
Returns the value of attribute configure_flags.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def configure_flags @configure_flags end |
#deps ⇒ Object
Returns the value of attribute deps.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def deps @deps end |
#libs ⇒ Object
Returns the value of attribute libs.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def libs @libs end |
#license ⇒ Object
Returns the value of attribute license.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def license @license end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def name @name end |
#org ⇒ Object
Returns the value of attribute org.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def org @org end |
#patches ⇒ Object
Returns the value of attribute patches.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def patches @patches end |
#test_block ⇒ Object
Returns the value of attribute test_block.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def test_block @test_block end |
#version_block ⇒ Object
Returns the value of attribute version_block.
18 19 20 |
# File 'lib/pkgforge/forge.rb', line 18 def version_block @version_block end |
Instance Method Details
#build! ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/pkgforge/forge.rb', line 35 def build! prepare_source! patch_source! prepare_deps! builder = BuildDSL.new(self) builder.instance_eval(&build_block) end |
#push! ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/pkgforge/forge.rb', line 50 def push! add_license! make_tarball! bump_revision! update_repo! upload_artifact! end |
#test! ⇒ Object
44 45 46 47 |
# File 'lib/pkgforge/forge.rb', line 44 def test! tester = TestDSL.new(self) tester.instance_eval(&test_block) end |