Class: Jeweler::Commands::ReleaseToRubygems
- Inherits:
-
Object
- Object
- Jeweler::Commands::ReleaseToRubygems
- Defined in:
- lib/jeweler/commands/release_to_rubygems.rb
Instance Attribute Summary collapse
-
#gemspec ⇒ Object
Returns the value of attribute gemspec.
-
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
-
#output ⇒ Object
Returns the value of attribute output.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ReleaseToRubygems
constructor
A new instance of ReleaseToRubygems.
- #run ⇒ Object
Constructor Details
#initialize ⇒ ReleaseToRubygems
Returns a new instance of ReleaseToRubygems.
6 7 8 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 6 def initialize self.output = $stdout end |
Instance Attribute Details
#gemspec ⇒ Object
Returns the value of attribute gemspec.
4 5 6 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 4 def gemspec @gemspec end |
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
4 5 6 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 4 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
4 5 6 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 4 def output @output end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 4 def version @version end |
Class Method Details
.build_for(jeweler) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 16 def self.build_for(jeweler) command = new command.gemspec = jeweler.gemspec command.gemspec_helper = jeweler.gemspec_helper command.version = jeweler.version command.output = jeweler.output command end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 10 def run command = "gem push #{@gemspec_helper.gem_path}" output.puts "Executing #{command.inspect}:" sh command end |