Class: Jeweler::Commands::InstallGem
- Inherits:
-
Object
- Object
- Jeweler::Commands::InstallGem
- Includes:
- FileUtils
- Defined in:
- lib/jeweler/commands/install_gem.rb
Instance Attribute Summary (collapse)
-
- (Object) gemspec_helper
Returns the value of attribute gemspec_helper.
-
- (Object) output
Returns the value of attribute output.
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) gem_command
-
- (InstallGem) initialize
constructor
A new instance of InstallGem.
- - (Object) run
Constructor Details
- (InstallGem) initialize
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
- (Object) gemspec_helper
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 |
- (Object) output
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
+ (Object) build_for(jeweler)
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
- (Object) gem_command
19 20 21 |
# File 'lib/jeweler/commands/install_gem.rb', line 19 def gem_command "#{RbConfig::CONFIG['RUBY_INSTALL_NAME']} -S gem" end |
- (Object) run
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 |