Econfig::Keychain

An OSX keychain adapter for Econfig, using Mellon.

Usage with Rails

For OSX, during development only.

First, add econfig-keychain to your Gemfile:

gem "econfig", require: "econfig/rails"
gem "econfig-keychain"

Second, create a keychain you wish to store configuration in, name it something clever like thanks-a-latte. Within config/initializers/econfig.rb write the following:

MyApp.extend Econfig::Shortcut

if Rails.env.development?
  Econfig.use_keychain "thanks-a-latte"
end

That's it! You can change your configuration from the Rails console:

MyApp.aws_access_key_id = "xyz"

You can also edit your configuration manually using the Mellon CLI:

bundle exec mellon edit myapp-development

License

MIT. See LICENSE.