TomPoulton/hiera-eyaml — pull request #70 by devin-c (2014-02-17 17:12:27+00:00)
Title: Re-factor the backend implementation

This is an attempt to get deep_merge's working, which are currently
throwing exceptons in my testing environment. See TomPoulton/hiera-eyaml#65.

I copied the yaml_backend from hiera v1.2.1, which is the one used in
puppet v3.4.2, and injected the decryption mechanics. I also needed to
copy the `parse_answer` method from the `::Hiera::Backend` and modified
it to use the decryption aware version of `parse_string`. It's still an
unfortunately long implementation considering that the only real
difference between the eyaml backend and the yaml backend is the change
to `::Heira::Backend.parse_string` that allows it to process encrypted
values.

I feel like this backend could be trimmed down so that it inherits from
the yaml backend, but the issues with doing that are tricky enough to
solve that I'm not going to pursue it at this point.

I've successfully tested this in my sandbox environment at work.