puppetlabs / ruby-hocon

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

(MAINT) Fix Hocon.load substitution issue #70

Closed MSLilah closed 8 years ago

MSLilah commented 8 years ago

Previously, Hocon.load was calling into the ConfigFactory.parse_file method. However, the parse methods in ConfigFactory do not resolve substitutions, as that is the intent of the load methods.

This commit updates the Hocon.load method to call into ConfigFactory.load_file. It also updates the readme to explain the usage of ConfigDocuments, and adds a comment to explain that the load methods in ConfigFactory should be used if substitutions are present

This PR should address https://github.com/puppetlabs/ruby-hocon/issues/67

MSLilah commented 8 years ago

Pinging @cprice404, @KevinCorcoran, and @jpinsonault for review.

@kolia @faizhasim This should fix the issues you were seeing when having a substitution in your configuration files.