mozilla/configman — pull request #119 by twobraids (2014-08-01 16:37:54+00:00)
Title: added object hook for post processing value sources

don't be intimidated by the size, most of the changes are adding tests

When a value source (mappings from the commandline, config file, environment, etc) is brought into configman, they've been translated into instance of DotDict. This change adds an ```object_hook``` so that the translation can be into whatever Mapping type is useful.

The first application for this will be to support legacy keys in existing configurations for crontabber. That app, unfortunately, used the hyphen in namespace names. Hyphens are not allowed in environment variables. Crontabber will be modified to not use define requirements with hyphens. However, we still want existing config files that use hyphens to still be useful. This will be done by having crontabber use a DotDict variant that translates keys with hyphens into keys with underscores. That mapping class will be used as ```value_source_object_hook```. For crontabber, the hyphen and underscore will be treated as if they were underscores.

I hesitated to bake this key translation directly into configman. I didn't want the overhead, nor did I want to force clients of configman into restrictive key rules. Armed with this new system using an object hook, crontabber will be able to use a translating system and other clients of configman won't suffer the overhead of the translations.