summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-10-19 18:00:06 -0700
committerAndre Arko <andre@arko.net>2013-10-19 18:00:06 -0700
commit5e294f645cd9cc19c089bbd76c1118a6f9f99df2 (patch)
tree12f8194a264e8cc889a992dc253427c13999613f
parent59a6f88251bb776d67fe3d1214a7f87cd60a9fa6 (diff)
downloadbundler-5e294f645cd9cc19c089bbd76c1118a6f9f99df2.tar.gz
1.8.7 can't URI a URI
-rw-r--r--lib/bundler/source.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb
index a0977b8580..4ab7a8e457 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