diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-15 14:23:26 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-15 14:23:26 +0000 |
commit | 72fb9d16dc0301bd142f05b73f15b015afd22125 (patch) | |
tree | 6a02c00e24a11233284ce96e5da10be9340725e2 /lib | |
parent | 9aab347c155b4b202947e31af20cf96afed11764 (diff) |
* lib/rubygems: Update to Rubygems 2.0.9. [ruby-core:57183]
[Backport #8908]
the patch is provided by drbrain (Eric Hodel).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/fetch_command.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/gemcutter_utilities.rb | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 78bdc4867d..f8633d50df 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ require 'rbconfig' module Gem - VERSION = '2.0.8' + VERSION = '2.0.9' end # Must be first since it unloads the prelude from 1.9.2 diff --git a/lib/rubygems/commands/fetch_command.rb b/lib/rubygems/commands/fetch_command.rb index ec021359b6..f5a8abc349 100644 --- a/lib/rubygems/commands/fetch_command.rb +++ b/lib/rubygems/commands/fetch_command.rb @@ -43,12 +43,13 @@ class Gem::Commands::FetchCommand < Gem::Command dep.prerelease = options[:prerelease] specs_and_sources, errors = Gem::SpecFetcher.fetcher.spec_for_dependency dep + if platform then filtered = specs_and_sources.select { |s,| s.platform == platform } specs_and_sources = filtered unless filtered.empty? end - spec, source = specs_and_sources.sort_by { |s,| s.version }.first + spec, source = specs_and_sources.max_by { |s,| s.version } if spec.nil? then show_lookup_failure gem_name, version, errors, options[:domain] diff --git a/lib/rubygems/gemcutter_utilities.rb b/lib/rubygems/gemcutter_utilities.rb index 04d7cd300f..c0628ebfb5 100644 --- a/lib/rubygems/gemcutter_utilities.rb +++ b/lib/rubygems/gemcutter_utilities.rb @@ -27,7 +27,8 @@ module Gem::GemcutterUtilities end end - def sign_in sign_in_host = self.host + def sign_in sign_in_host = nil + sign_in_host ||= self.host return if Gem.configuration.rubygems_api_key pretty_host = if Gem::DEFAULT_HOST == sign_in_host then |