diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-18 22:14:56 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-18 22:14:56 +0000 |
commit | 18b7112ec1923319bff52dfe280fb8b03b6c97bb (patch) | |
tree | 69bc3c21284ed8d28c0fd8c8f772dae62ef1bc75 | |
parent | aa7a74e4ffd38ec466b13779df8367070d435919 (diff) |
* lib/rubygems: Update to RubyGems master 42543b6. Changes:
Fix `gem update` for gems with multiple platforms.
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 4 | ||||
-rw-r--r-- | test/rubygems/test_gem_commands_update_command.rb | 14 |
3 files changed, 25 insertions, 1 deletions
@@ -1,3 +1,11 @@ +Sat Oct 19 07:14:40 2013 Eric Hodel <[email protected]> + + * lib/rubygems: Update to RubyGems master 42543b6. Changes: + + Fix `gem update` for gems with multiple platforms. + + * test/rubygems: ditto. + Sat Oct 19 06:55:52 2013 Eric Hodel <[email protected]> * lib/rubygems: Update to RubyGems master 0a3814b. Changes: diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 7d7371818f..c3532841c3 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -112,7 +112,9 @@ command to remove old versions. spec_tuples, errors = fetcher.search_for_dependency dependency - raise errors.first unless errors.empty? + error = errors.find { |errors| errors.respond_to? :exception } + + raise error if error spec_tuples end diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index 181784b61c..01e95cbbb4 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -390,6 +390,20 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end end + def test_fetch_remote_gems_mismatch + platform = Gem::Platform.new 'x86-freebsd9' + a2_p = quick_spec 'a', 2 do |s| s.platform = platform end + + util_setup_spec_fetcher @a2, a2_p + + expected = [ + [Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY), + Gem::Source.new(@gem_repo)], + ] + + assert_equal expected, @cmd.fetch_remote_gems(@a1) + end + def test_fetch_remote_gems_prerelease @cmd.options[:prerelease] = true |