diff options
author | Andre Arko <andre@arko.net> | 2015-05-16 22:50:09 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-05-16 22:50:09 -0700 |
commit | 86c0b7775690f5b00fe3f3f73ae407b2fa6db875 (patch) | |
tree | 54e974cb12ed5148f35b8d1213b1a9d7b08a4273 /lib/bundler/settings.rb | |
parent | 7536f442674f3a8d8407fdf72719559340783a77 (diff) | |
parent | be432f5bceacf37e08d4dc8e3a727717260f18f7 (diff) | |
download | bundler-86c0b7775690f5b00fe3f3f73ae407b2fa6db875.tar.gz |
Merge tag 'v1.9.9' into 1-10-stable
Version 1.9.9
Conflicts:
CHANGELOG.md
lib/bundler/fetcher.rb
lib/bundler/lockfile_parser.rb
lib/bundler/version.rb
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r-- | lib/bundler/settings.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 7a58c8af..beb53205 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -228,7 +228,7 @@ module Bundler config_regex = /^(BUNDLE_.+): (['"]?)(.*(?:\n(?!BUNDLE).+)?)\2$/ config_pairs = config_file.read.scan(config_regex).map do |m| key, _, value = m - [key, value.gsub(/\s+/, " ").tr('"', "'")] + [convert_to_backward_compatible_key(key), value.gsub(/\s+/, " ").tr('"', "'")] end Hash[config_pairs] else @@ -236,6 +236,12 @@ module Bundler end end + def convert_to_backward_compatible_key(key) + key = "#{key}/" if key =~ /https?:/i && key !~ %r[/\Z] + key = key.gsub(".", "__") if key.include?(".") + key + end + # TODO: duplicates Rubygems#normalize_uri # TODO: is this the correct place to validate mirror URIs? def normalize_uri(uri) |