Sha256: 627256ee38867635e935c0ff72b37c05a220b4b9f8ba9fc62033380264e0e429

Contents?: true

Size: 705 Bytes

Versions: 17

Compression:

Stored size: 705 Bytes

Contents

class Juwelier
  module Commands
    class InstallGem
      include FileUtils

      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
        "#{RbConfig::CONFIG['RUBY_INSTALL_NAME']} -S gem"
      end

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
juwelier-2.4.9 lib/juwelier/commands/install_gem.rb
juwelier-2.4.7 lib/juwelier/commands/install_gem.rb
juwelier-2.4.6 lib/juwelier/commands/install_gem.rb
juwelier-2.4.5 lib/juwelier/commands/install_gem.rb
juwelier-2.4.4 lib/juwelier/commands/install_gem.rb
juwelier-2.4.1 lib/juwelier/commands/install_gem.rb
juwelier-2.4.0 lib/juwelier/commands/install_gem.rb
juwelier-2.3.6 lib/juwelier/commands/install_gem.rb
juwelier-2.3.4 lib/juwelier/commands/install_gem.rb
juwelier-2.3.2 lib/juwelier/commands/install_gem.rb
juwelier-2.3.0 lib/juwelier/commands/install_gem.rb
juwelier-2.2.3 lib/juwelier/commands/install_gem.rb
juwelier-2.2.1 lib/juwelier/commands/install_gem.rb
juwelier-2.1.3 lib/juwelier/commands/install_gem.rb
juwelier-2.1.2 lib/juwelier/commands/install_gem.rb
juwelier-2.1.1 lib/juwelier/commands/install_gem.rb
juwelier-2.1.0 lib/juwelier/commands/install_gem.rb