Class: Jeweler::Commands::InstallGem
- Inherits:
-
Object
- Object
- Jeweler::Commands::InstallGem
- Includes:
- FileUtils
- 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
- #gem_command ⇒ Object
-
#initialize ⇒ InstallGem
constructor
A new instance of InstallGem.
- #run ⇒ Object
Constructor Details
#initialize ⇒ InstallGem
Returns a new instance of InstallGem.
8 9 10 |
# File 'lib/jeweler/commands/install_gem.rb', line 8 def initialize self.output = $stdout end |
Instance Attribute Details
#gemspec_helper ⇒ Object
Returns the value of attribute gemspec_helper.
6 7 8 |
# File 'lib/jeweler/commands/install_gem.rb', line 6 def gemspec_helper @gemspec_helper end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/jeweler/commands/install_gem.rb', line 6 def output @output end |
Class Method Details
.build_for(jeweler) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/jeweler/commands/install_gem.rb', line 23 def self.build_for(jeweler) command = new command.output = jeweler.output command.gemspec_helper = jeweler.gemspec_helper command end |
Instance Method Details
#gem_command ⇒ Object
19 20 21 |
# File 'lib/jeweler/commands/install_gem.rb', line 19 def gem_command "#{RbConfig::CONFIG['RUBY_INSTALL_NAME']} -S gem" end |
#run ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jeweler/commands/install_gem.rb', line 12 def run command = "#{gem_command} install #{gemspec_helper.gem_path}" output.puts "Executing #{command.inspect}:" sh command # TODO: where does sh actually come from!? - rake, apparently end |