leongersing/configulations — pull request #9 by drbobbeaty (2012-10-09 14:39:28+00:00)
Title: Allow overlay of local on standard configs

### Set-Up

When trying to use the `local` configuration feature of Configulations, I realized very soon that it wasn't working on the 0.2.2 Gem at http://rubygems.org/ as it wasn't in the version of the Gem on that server. I then forked the code here, built it, and put it on our server.

Still didn't work, but in an _entirely different_ way.

### Error

When loading the `local` config files, the existing code **overwrites** the standard config for the same file. This is not what I want to have happen - nor is it what I think _most_ people expect. I think the right approach is to _overlay_ the local config on the standard config and merge the two.

So that's what I did.

### Solution

I simply merged the parsed data into the existing data, and because of the order things are parsed, we load the 'standard' config first, and then _overlay_ the local config.

I also wrote a spec to verify that the non-repeated values are still intact.