puppetlabs / ruby-hocon

A Ruby port of the Typesafe Config library.
Apache License 2.0
34 stars 30 forks source link

(TK-246) Fix single-line config bug #58

Closed MSLilah closed 9 years ago

MSLilah commented 9 years ago

Previously there was a bug wherein building out a config starting from an empty ConfigDocument would cause the entire config to exist on a single line. Fix this bug by modifying the addition of new maps along a path to add multi-line maps instead of single-line maps if the object being added to is an empty root or a multi-line object.

This PR is based on https://github.com/typesafehub/config/pull/333.

MSLilah commented 9 years ago

@highb This should fix the issue you were seeing in the HOCON module.

highb commented 9 years ago

@fpringvaldsen Yep! Just tested this gem out via the hocon module, and it doesn't create single line config files anymore! ;) Thanks for doing this!

jpinsonault commented 9 years ago

:+1:

jpinsonault commented 9 years ago

Just waiting on travis, then I'll merge it