Sha256: 2f48b9f375857aed7afb29f405d654817a562f1588e0c47d451da4ac34176b5c

Contents?: true

Size: 682 Bytes

Versions: 12

Compression:

Stored size: 682 Bytes

Contents

class Jeweler
  module Commands
    class InstallGem
      attr_accessor :gemspec_helper, :output

      def initialize
        self.output = $stdout
      end


      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

      def gem_command
        Config::CONFIG['RUBY_INSTALL_NAME'].sub('ruby', 'gem')
      end

      def self.build_for(jeweler)
        command = new
        command.output = jeweler.output
        command.gemspec_helper = jeweler.gemspec_helper
        command
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
gemrage-1.0.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb
jeweler-1.4.0 lib/jeweler/commands/install_gem.rb