Shopify/shopify_app — pull request #55 by alexcoco (2013-07-03 14:49:54+00:00)
Title: Multiple config sources

@kmcphillips @christopherlobay

ShopifyApp::Configuration works the same way it did before except for a few differences:

* Multiple configuration sources
* New order of precedence:
1. ENV variable
1. Configuration set in a Rails `.rb` config file
1. Configuration loaded from `` key in `shopify_app.yml`
1. Configuration loaded from `common` key in `shopify_app.yml`
1. Defaults to empty string
* Future proof: just add new configuration options to the `VALID_KEYS` array

Seemed simpler to do it this way instead of involving another gem. There's some magic but it's literally all there instead of in some gem.

/cc @jeromecornet