diff options
author | Andre Arko <andre@arko.net> | 2013-10-19 18:00:06 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-10-19 18:00:06 -0700 |
commit | 5e294f645cd9cc19c089bbd76c1118a6f9f99df2 (patch) | |
tree | 12f8194a264e8cc889a992dc253427c13999613f /lib/bundler/source.rb | |
parent | 59a6f88251bb776d67fe3d1214a7f87cd60a9fa6 (diff) | |
download | bundler-5e294f645cd9cc19c089bbd76c1118a6f9f99df2.tar.gz |
1.8.7 can't URI a URI
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r-- | lib/bundler/source.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index a0977b85..4ab7a8e4 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -5,11 +5,13 @@ module Bundler autoload :Git, 'bundler/source/git' def self.mirror_for(uri) + uri = URI(uri.to_s) unless uri.is_a?(URI) + # Settings keys are all downcased mirrors = Bundler.settings.gem_mirrors normalized_key = URI(uri.to_s.downcase) - mirrors[normalized_key] || URI(uri) + mirrors[normalized_key] || uri end end |