ruby-changes:36387
From: hsbt <ko1@a...>
Date: Mon, 17 Nov 2014 12:55:15 +0900 (JST)
Subject: [ruby-changes:36387] hsbt:r48468 (trunk): * lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4
hsbt 2014-11-17 12:55:02 +0900 (Mon, 17 Nov 2014) New Revision: 48468 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48468 Log: * lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4 master (2f6e42e). Modified files: trunk/ChangeLog trunk/lib/rubygems/commands/contents_command.rb trunk/lib/rubygems/commands/update_command.rb trunk/lib/rubygems/dependency.rb trunk/lib/rubygems/indexer.rb trunk/lib/rubygems/package/old.rb trunk/lib/rubygems/remote_fetcher.rb trunk/lib/rubygems/request/connection_pools.rb trunk/lib/rubygems/request/http_pool.rb trunk/lib/rubygems/user_interaction.rb trunk/lib/rubygems.rb trunk/test/rubygems/test_gem_remote_fetcher.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48467) +++ ChangeLog (revision 48468) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Nov 17 12:54:56 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * lib/rubygems/*, test/rubygems/*: Update to RubyGems 2.4.4 + master (2f6e42e). + Mon Nov 17 06:13:06 2014 Nobuyoshi Nakada <nobu@r...> * proc.c (proc_binding): use the original iseq on a binding from Index: lib/rubygems/request/http_pool.rb =================================================================== --- lib/rubygems/request/http_pool.rb (revision 48467) +++ lib/rubygems/request/http_pool.rb (revision 48468) @@ -23,6 +23,15 @@ class Gem::Request::HTTPPool # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/request/http_pool.rb#L23 @queue.push connection end + def close_all + until @queue.empty? + if connection = @queue.pop(true) and connection.started? + connection.finish + end + end + @queue.push(nil) + end + private def make_connection Index: lib/rubygems/request/connection_pools.rb =================================================================== --- lib/rubygems/request/connection_pools.rb (revision 48467) +++ lib/rubygems/request/connection_pools.rb (revision 48468) @@ -28,6 +28,10 @@ class Gem::Request::ConnectionPools # :n https://github.com/ruby/ruby/blob/trunk/lib/rubygems/request/connection_pools.rb#L28 end end + def close_all + @pools.each_value {|pool| pool.close_all} + end + private ## @@ -69,7 +73,7 @@ class Gem::Request::ConnectionPools # :n https://github.com/ruby/ruby/blob/trunk/lib/rubygems/request/connection_pools.rb#L73 Gem::UriFormatter.new(proxy_uri.password).unescape, ] elsif no_proxy? uri.host, no_proxy then - net_http_args += [nil, nil] + net_http_args + [nil, nil] else net_http_args end Index: lib/rubygems/package/old.rb =================================================================== --- lib/rubygems/package/old.rb (revision 48467) +++ lib/rubygems/package/old.rb (revision 48468) @@ -153,10 +153,10 @@ class Gem::Package::Old < Gem::Package https://github.com/ruby/ruby/blob/trunk/lib/rubygems/package/old.rb#L153 begin @spec = Gem::Specification.from_yaml yaml - rescue yaml_error => e + rescue yaml_error raise Gem::Exception, "Failed to parse gem specification out of gem file" end - rescue ArgumentError => e + rescue ArgumentError raise Gem::Exception, "Failed to parse gem specification out of gem file" end Index: lib/rubygems/commands/contents_command.rb =================================================================== --- lib/rubygems/commands/contents_command.rb (revision 48467) +++ lib/rubygems/commands/contents_command.rb (revision 48468) @@ -146,7 +146,6 @@ prefix or only the files that are requir https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/contents_command.rb#L146 def path_description spec_dirs # :nodoc: if spec_dirs.empty? then - spec_dirs = Gem::Specification.dirs "default gem paths" else "specified path" Index: lib/rubygems/commands/update_command.rb =================================================================== --- lib/rubygems/commands/update_command.rb (revision 48467) +++ lib/rubygems/commands/update_command.rb (revision 48468) @@ -84,8 +84,6 @@ command to remove old versions. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/update_command.rb#L84 end def execute - hig = {} - if options[:system] then update_rubygems return Index: lib/rubygems/user_interaction.rb =================================================================== --- lib/rubygems/user_interaction.rb (revision 48467) +++ lib/rubygems/user_interaction.rb (revision 48468) @@ -318,7 +318,6 @@ class Gem::StreamUI https://github.com/ruby/ruby/blob/trunk/lib/rubygems/user_interaction.rb#L318 elsif Gem.win_platform? def _gets_noecho require "Win32API" - char = nil password = '' while char = Win32API.new("crtdll", "_getch", [ ], "L").Call do Index: lib/rubygems/dependency.rb =================================================================== --- lib/rubygems/dependency.rb (revision 48467) +++ lib/rubygems/dependency.rb (revision 48468) @@ -281,7 +281,7 @@ class Gem::Dependency https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency.rb#L281 } end - matches = matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed + matches.sort_by { |s| s.sort_obj } # HACK: shouldn't be needed end ## Index: lib/rubygems/indexer.rb =================================================================== --- lib/rubygems/indexer.rb (revision 48467) +++ lib/rubygems/indexer.rb (revision 48468) @@ -235,7 +235,7 @@ class Gem::Indexer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/indexer.rb#L235 sanitize spec spec - rescue SignalException => e + rescue SignalException alert_error "Received signal, exiting" raise rescue Exception => e Index: lib/rubygems/remote_fetcher.rb =================================================================== --- lib/rubygems/remote_fetcher.rb (revision 48467) +++ lib/rubygems/remote_fetcher.rb (revision 48468) @@ -326,7 +326,7 @@ class Gem::RemoteFetcher https://github.com/ruby/ruby/blob/trunk/lib/rubygems/remote_fetcher.rb#L326 def correct_for_windows_path(path) if path[0].chr == '/' && path[1].chr =~ /[a-z]/i && path[2].chr == ':' - path = path[1..-1] + path[1..-1] else path end @@ -352,6 +352,10 @@ class Gem::RemoteFetcher https://github.com/ruby/ruby/blob/trunk/lib/rubygems/remote_fetcher.rb#L352 uri.scheme.downcase == 'https' end + def close_all + @pools.each_value {|pool| pool.close_all} + end + protected # we have our own signing code here to avoid a dependency on the aws-sdk gem Index: lib/rubygems.rb =================================================================== --- lib/rubygems.rb (revision 48467) +++ lib/rubygems.rb (revision 48468) @@ -9,7 +9,7 @@ require 'rbconfig' https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L9 require 'thread' module Gem - VERSION = '2.4.3' + VERSION = '2.4.4' end # Must be first since it unloads the prelude from 1.9.2 Index: test/rubygems/test_gem_remote_fetcher.rb =================================================================== --- test/rubygems/test_gem_remote_fetcher.rb (revision 48467) +++ test/rubygems/test_gem_remote_fetcher.rb (revision 48468) @@ -77,30 +77,6 @@ gems: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_remote_fetcher.rb#L77 DIR = File.expand_path(File.dirname(__FILE__)) - module RemoteFetcherCleanup - refine Gem::RemoteFetcher do - def close_all - @pools.each_value {|pool| pool.close_all} - end - end - refine Gem::Request::ConnectionPools do - def close_all - @pools.each_value {|pool| pool.close_all} - end - end - refine Gem::Request::HTTPPool do - def close_all - until @queue.empty? - if connection = @queue.pop(true) and connection.started? - connection.finish - end - end - @queue.push(nil) - end - end - end - using RemoteFetcherCleanup - def setup @proxies = %w[http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY] @old_proxies = @proxies.map {|k| ENV[k] } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/