Class: LibGems::Builder
- Inherits:
-
Object
- Object
- LibGems::Builder
- Includes:
- UserInteraction
- Defined in:
- lib/libgems/builder.rb
Overview
The Builder class processes RubyGem specification files to produce a .gem file.
Instance Method Summary collapse
-
#build ⇒ Object
Builds the gem from the specification.
-
#initialize(spec) ⇒ Builder
constructor
Constructs a builder instance for the provided specification.
- #success ⇒ Object
Methods included from UserInteraction
Methods included from DefaultUserInteraction
ui, #ui, ui=, #ui=, use_ui, #use_ui
Constructor Details
#initialize(spec) ⇒ Builder
Constructs a builder instance for the provided specification
- spec
- LibGems::Specification
-
The specification instance
32 33 34 |
# File 'lib/libgems/builder.rb', line 32 def initialize(spec) @spec = spec end |
Instance Method Details
#build ⇒ Object
Builds the gem from the specification. Returns the name of the file written.
40 41 42 43 44 45 46 47 |
# File 'lib/libgems/builder.rb', line 40 def build @spec.mark_version @spec.validate @signer = sign write_package say success if LibGems.configuration.verbose @spec.file_name end |
#success ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/libgems/builder.rb', line 49 def success <<-EOM Successfully built RubyGem Name: #{@spec.name} Version: #{@spec.version} File: #{@spec.file_name} EOM end |