basho/cuttlefish — pull request #85 by joedevivo (2013-12-10 21:18:58+00:00)
Title: Refactorings and More

I'd say the biggest thing in this PR is refactoring a lot of `variable` related code into a new `cuttlefish_variable` module and out of the `cuttlefish_util` module.

That broke some of the existing API for cuttlefish schema writers, so I left backwards compatible stubs in `cuttlefish_util`.

This also includes a new `cuttlefish_error` module, which is just a standard place to do error handley stuff.

The `cuttlefish` module is an entry API point. It's a better place than `cuttlefish_util` for exposed functions. I'll eventually put a wrapper for the things @jrwest is using for bucket type config in here so all users of cuttlefish need to worry about will be in this module. Speaking of @jrwest, there are some logging changes in this PR that should make his use case less verbose. `cuttlefish_generator:map/2` now returns a proplist or `{error, atom(), errorlist()}`.

Also in here, some more verbose debugging output that @Vagabond would have liked to have earlier this week.

Also, @uwiger found a previously untested case of prefix matching, and I've included his fix.