redding/deas — pull request #51 by kellyredding (2013-05-12 16:59:30+00:00)
Title: add a `set` method to the server API

This allows for setting custom settings on the sinatra app by 3rd-party
stuff.

Some things, like custom error procs, can be set by 3rd-party tools
but are instance eval'd in the sinatra call. If the 3rd-party needed
to access some of its own custom data or configs, it would have to
implement them as a Singleton to get access to them. That's no good.

This allows the 3rd party to instead set their custom data as a setting
and then they can access via the sinatra call's settings.

This is a bit "dangerous" in that a 3rd-party can potentially override
the settings applied by the other 3rd parties or even Deas itself. In
general, namespaced settings _should_ be used to preven this, but
nothing guarantees that. Just noting that here.

@jcredding thoughts on this? ready for review.