diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-19 00:08:49 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-19 00:08:49 +0000 |
commit | e798ccbacf489a3af2201ae30058ff0ae7f79045 (patch) | |
tree | 4147a7834eb88323057fd2120a2ddc96c1eb32ab /lib/rubygems/commands/install_command.rb | |
parent | d26fb035cae8d351dc238376722c980230dc5fbd (diff) |
Import rubygems 1.5.0 (release candidate)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/install_command.rb')
-rw-r--r-- | lib/rubygems/commands/install_command.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb index 06a89eeb0a..530f746e89 100644 --- a/lib/rubygems/commands/install_command.rb +++ b/lib/rubygems/commands/install_command.rb @@ -1,3 +1,9 @@ +###################################################################### +# This file is imported from the rubygems project. +# DO NOT make modifications in this repo. They _will_ be reverted! +# File a patch instead and assign it to Ryan Davis or Eric Hodel. +###################################################################### + require 'rubygems/command' require 'rubygems/doc_manager' require 'rubygems/install_update_options' @@ -22,7 +28,6 @@ class Gem::Commands::InstallCommand < Gem::Command :generate_rdoc => true, :generate_ri => true, :format_executable => false, - :test => false, :version => Gem::Requirement.default, }) @@ -41,7 +46,7 @@ class Gem::Commands::InstallCommand < Gem::Command def defaults_str # :nodoc: "--both --version '#{Gem::Requirement.default}' --rdoc --ri --no-force\n" \ - "--no-test --install-dir #{Gem.dir}" + "--install-dir #{Gem.dir}" end def description # :nodoc: @@ -115,6 +120,8 @@ to write the specification by hand. For example: get_all_gem_names.each do |gem_name| begin + next if options[:conservative] && Gem.available?(gem_name, options[:version]) + inst = Gem::DependencyInstaller.new options inst.install gem_name, options[:version] @@ -127,7 +134,7 @@ to write the specification by hand. For example: alert_error "Error installing #{gem_name}:\n\t#{e.message}" exit_code |= 1 rescue Gem::GemNotFoundException => e - show_lookup_failure e.name, e.version, e.errors + show_lookup_failure e.name, e.version, e.errors, options[:domain] exit_code |= 2 end @@ -154,19 +161,6 @@ to write the specification by hand. For example: Gem::DocManager.new(gem, options[:rdoc_args]).generate_rdoc end end - - if options[:test] then - installed_gems.each do |spec| - gem_spec = Gem::SourceIndex.from_installed_gems.find_name(spec.name, spec.version.version).first - result = Gem::Validator.new.unit_test(gem_spec) - if result and not result.passed? - unless ask_yes_no("...keep Gem?", true) - require 'rubygems/uninstaller' - Gem::Uninstaller.new(spec.name, :version => spec.version.version).uninstall - end - end - end - end end raise Gem::SystemExitException, exit_code |