diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-07 04:06:30 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-07 04:06:30 +0000 |
commit | 9926b16d358f218776b8ae573ea775011fd367cd (patch) | |
tree | 2d3053550c203b53d2a6d6653a21c02fe4615d58 /lib/rubygems/spec_fetcher.rb | |
parent | 105361d9d4bb4ee642d367a3652251cd516325bc (diff) | |
download | ruby-9926b16d358f218776b8ae573ea775011fd367cd.tar.gz |
* ChangeLog:
* lib/rubygems/commands/setup_command.rb (class Gem):
* lib/rubygems/commands/setup_command.rb (TEXT):
* lib/rubygems/spec_fetcher.rb (class Gem):
* lib/rubygems/test_utilities.rb (class Gem):
* lib/rubygems.rb (module Gem):
* test/rubygems/test_gem_commands_setup_command.rb (class TestGemCommandsSetupCommand):
* test/rubygems/test_gem_spec_fetcher.rb (Upgraded http):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/spec_fetcher.rb')
-rw-r--r-- | lib/rubygems/spec_fetcher.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb index 62613f7a51..31205b9a06 100644 --- a/lib/rubygems/spec_fetcher.rb +++ b/lib/rubygems/spec_fetcher.rb @@ -241,7 +241,13 @@ class Gem::SpecFetcher https_uri.scheme = 'https' https_uri += '/' - Gem::RemoteFetcher.fetcher.fetch_path https_uri, nil, true + https_uri = URI https_uri.to_s # cast to URI::HTTPS + + begin + Gem::RemoteFetcher.fetcher.fetch_path https_uri, nil, true + rescue Gem::RemoteFetcher::FetchError => e + raise unless e.message =~ / Not Allowed 405 / + end say "Upgraded #{uri} to HTTPS" |