-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sourcing additional files #17
Comments
I would like to see something like this, as well. Is any work being done on it, or shall I take a stab? |
i had hoped to have a go at it, but never got around to it. |
OK, maybe I'll give it a go this weekend. On Wed, Jul 13, 2011 at 5:02 PM, brewster1134 <
|
I added support to my fork this morning, and it seems to work well. Give it a shot, and if it's all good, I'll request a pull. Thanks! |
sorry just got around to checking out your fork. works great! But 1 thing... I think the hashes need to be recursively merged. otherwise if a deeply nested key/value is missing from the 2nd hash, when its merged, the new hash will be missing that key/value as well instead of falling back on the key/value from the 1st hash. thoughts? |
im wondering how i can source an additional file and override values. what i am trying to do is have a settings.yml file.... and an additional user_settings.yml file. user_settings.yml will be omitted form version control and unique to each developer.
an example of what i would like to do is...
settings.yml
defaults: &defaults
interceptor_email: noreply@domain.com
user_settings.yml # for userfoo
defaults:
interceptor_email: userfoo@domain.com
user_settings.yml # for userbar
defaults:
interceptor_email: userbar@domain.com
say my class is Settings, calling on Settings.interceptor_email for the developer userfoo would return userfoo@domain.com, and for userxyz, it would return noreply@domain.com since he doesnt have a local user_settings.yml file.
maybe i am going about this the wrong way?
The text was updated successfully, but these errors were encountered: