Class: Jeweler::Commands::ReleaseToRubygems
- Inherits:
-
Object
- Object
- Jeweler::Commands::ReleaseToRubygems
- Includes:
- FileUtils
- 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.
8 9 10 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 8 def initialize self.output = $stdout end |
Instance Attribute Details
#gemspec ⇒ Object
Returns the value of attribute gemspec.
6 7 8 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 6 def gemspec @gemspec end |
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
6 7 8 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 6 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 6 def output @output end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 6 def version @version end |
Class Method Details
.build_for(jeweler) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 18 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
12 13 14 15 16 |
# File 'lib/jeweler/commands/release_to_rubygems.rb', line 12 def run command = "gem push #{@gemspec_helper.gem_path}" output.puts "Executing #{command.inspect}:" sh command end |