class Jeweler::Commands::InstallGem

Attributes

gemspec_helper[RW]
output[RW]

Public Instance Methods

gem_command() click to toggle source
# File lib/jeweler/commands/install_gem.rb, line 19
def gem_command
  "#{RbConfig::CONFIG['RUBY_INSTALL_NAME']} -S gem"
end
run() click to toggle source
# 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

Public Class Methods

build_for(jeweler) click to toggle source
# 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
new() click to toggle source
# File lib/jeweler/commands/install_gem.rb, line 8
def initialize
  self.output = $stdout
end