Class: Jeweler::Commands::InstallGem
- Inherits:
-
Object
- Object
- Jeweler::Commands::InstallGem
- Defined in:
- lib/jeweler/commands/install_gem.rb
Instance Attribute Summary collapse
-
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
-
#output ⇒ Object
Returns the value of attribute output.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ InstallGem
constructor
A new instance of InstallGem.
- #run ⇒ Object
Constructor Details
#initialize ⇒ InstallGem
Returns a new instance of InstallGem.
6 7 8 |
# File 'lib/jeweler/commands/install_gem.rb', line 6 def initialize self.output = $stdout end |
Instance Attribute Details
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
4 5 6 |
# File 'lib/jeweler/commands/install_gem.rb', line 4 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
4 5 6 |
# File 'lib/jeweler/commands/install_gem.rb', line 4 def output @output end |
Class Method Details
.build_for(jeweler) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/jeweler/commands/install_gem.rb', line 18 def self.build_for(jeweler) command = new command.output = jeweler.output command.gemspec_helper = jeweler.gemspec_helper command end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 |
# File 'lib/jeweler/commands/install_gem.rb', line 11 def run command = "sudo gem install #{gemspec_helper.gem_path}" output.puts "Executing #{command.inspect}:" sh command # TODO where does sh actually come from!? end |