diff options
author | Andre Arko <andre@arko.net> | 2014-11-19 14:01:17 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-11-19 14:44:40 -0800 |
commit | 94fd250935314aee86759de3e9b0e98a709823ed (patch) | |
tree | 10e9db05720c6011173f268831a973f7e3b45e71 | |
parent | 4304bd6419e059f5fbf6a82c2516e384d6bf27d5 (diff) | |
download | bundler-94fd250935314aee86759de3e9b0e98a709823ed.tar.gz |
ensure quotes will not duplicate during YAML.dump
closes #3261
-rw-r--r-- | lib/bundler/settings.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index d6d2da1e..b2c61b08 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -139,6 +139,7 @@ module Bundler require 'bundler/psyched_yaml' File.open(file, "w") { |f| f.puts YAML.dump(hash) } end + value end @@ -155,7 +156,9 @@ module Bundler valid_file = config_file && config_file.exist? && !config_file.size.zero? if !ignore_config? && valid_file config_regex =/^(BUNDLE_.+): (?:['"](.*)['"]|(.+(?:\n(?!BUNDLE).+))|(.+))$/ - config_pairs = config_file.read.scan(config_regex).map{|m| m.compact.map { |n| n.gsub(/\s+/, " ") } } + config_pairs = config_file.read.scan(config_regex).map do |m| + m.compact.map { |n| n.gsub(/\s+/, " ").tr('"', "'") } + end Hash[config_pairs] else {} |