diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
commit | 372dcece3f69989d133f720468f1e24aa1133cda (patch) | |
tree | c173ca48a23ce18afa44feb15bf68d2dd14ac619 /lib/rubygems/commands/fetch_command.rb | |
parent | d0e5a34ac7c34e70c145024a0fed8f6042814f29 (diff) |
Update to RubyGems 1.3.7.pre.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/fetch_command.rb')
-rw-r--r-- | lib/rubygems/commands/fetch_command.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rubygems/commands/fetch_command.rb b/lib/rubygems/commands/fetch_command.rb index b12e1b4a5d..43229c0512 100644 --- a/lib/rubygems/commands/fetch_command.rb +++ b/lib/rubygems/commands/fetch_command.rb @@ -34,7 +34,7 @@ class Gem::Commands::FetchCommand < Gem::Command def execute version = options[:version] || Gem::Requirement.default - all = Gem::Requirement.default + all = Gem::Requirement.default != version gem_names = get_all_gem_names @@ -42,13 +42,17 @@ class Gem::Commands::FetchCommand < Gem::Command dep = Gem::Dependency.new gem_name, version dep.prerelease = options[:prerelease] - specs_and_sources = Gem::SpecFetcher.fetcher.fetch(dep, false, true, + specs_and_sources = Gem::SpecFetcher.fetcher.fetch(dep, all, true, dep.prerelease?) + specs_and_sources, errors = + Gem::SpecFetcher.fetcher.fetch_with_errors(dep, all, true, + dep.prerelease?) + spec, source_uri = specs_and_sources.sort_by { |s,| s.version }.last if spec.nil? then - alert_error "Could not find #{gem_name} in any repository" + show_lookup_failure gem_name, version, errors next end |