Open bendycode opened 11 years ago
Cut scope, be opinionated:
config/idkfa.yml
config/idkfa.yml
(this lets you change the contents without having to restart the server)config/idkfa.yml
should be read once, and at startupLove the "Cut scope, be opinionated" refinements.
When faced with the opinionated, default scenario, allow the call to:
Idkfa.load_keys(Rails.env, :credentials => Rails.root.join('config', 'credentials.yml'))
to default to the much simpler:
Idkfa.load_keys()
Still allow the parameters to be specified when the default behavior is not desired.
The env parameter should default to Rails.env if you are in Rails. Use the current production default as the fallback when not specified, and not in Rails.
If :credentials are not passed in via the opts hash, then look for the yaml file in the default path location before raising "You must pass :credentials => 'file.yml' or have a #{DEFAULT_CREDENTIALS_PATH} file".
Change the README to reflect the simpler call.