aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 8e439180..de0644ad 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -201,14 +201,21 @@ module Bundler
hash.delete(key) if value.nil?
SharedHelpers.filesystem_access(file) do |p|
FileUtils.mkdir_p(p.dirname)
- require "bundler/psyched_yaml"
- File.open(p, "w") {|f| f.puts YAML.dump(hash) }
+ p.open("w") {|f| f.write(serialize_hash(hash)) }
end
end
value
end
+ def serialize_hash(hash)
+ yaml = String.new("---\n")
+ hash.each do |key, value|
+ yaml << key << ": " << value.to_s.gsub(/\s+/, " ").inspect << "\n"
+ end
+ yaml
+ end
+
def global_config_file
if ENV["BUNDLE_CONFIG"] && !ENV["BUNDLE_CONFIG"].empty?
Pathname.new(ENV["BUNDLE_CONFIG"])