opscode/cheffish — pull request #8 by mwrock (2014-06-20 05:50:06+00:00)
Title: improve debug experience for MergedConfig

On a couple occasions while debugging my metal driver, I've been perplexed by errors such as:

````
# with backtrace:
# /home/mwrock/dev/cheffish/lib/cheffish/merged_config.rb:48:in `method_missing'
# /home/mwrock/dev/cheffish/spec/functional/merged_config_spec.rb:14:in `block (3 levels) in '
````
The root of this is bad code on my end where, for example, I think I have a normal hash but I really have a MergedConfig and calling merge(some_hash) results in an error like the one above. I spend several moments trying to figure out where I am passing in the wrong number of args and then after looking at the stack more carefully, I open up merged_config.rb to realize this is a side effect of my error.

This PR tries to make the initial error more clear.

Also, when debugging, I also run into situations where I have stuck in code like:
````
puts "my options:#{config[:driver_options]}"
```.
I know...I know terrible debugging technique but I'm a ruby noob and sometimes this is what I do.

This tells me something rather unhelpful:
````
my options:
````
This PR changes the string representation of MergedConfig to use its to_hash and then return the to_s of that hash. This helps me to see what the merge_config is holding.