Project

idkfa

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Use this gem to store your site credentials in a secure way
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

idkfa

Storing keys in your repository is A Bad Idea™. With idkfa, you can store them in a YAML file outside your repository yet include them easily.

Once installed and setup with Idkfa.load_keys, your sensitive information will be stored in upper-cased keys inside ENV.

Why “idkfa?” Haven’t you played Doom?

Default Configuration

To configure idkfa, you will need to add a credentials.yml file to your project

Sample config/credentials.yml:

common: &COMMON
  domain_url: http://localhost:3000
  my_secret_api_key: something_really_secret
development:
  <<: *COMMON
production:
  <<: *COMMON

Usage with Rails

  • Add gem 'idkfa' to your Gemfile
  • Run bundle
  • Add the Idkfa.load_keys call inside your Application definition in config/application.rb:
class Application < Rails::Application
  Idkfa.load_keys Rails.env, :credentials => Rails.root.join('config', 'credentials.yml')
  ...
end
  • In your application, use ENV['MY_SECRET_API_KEY']

General Usage

  • Run gem install idkfa
  • Use Idkfa.load_keys :production, :credentials => File.expand_path('../credentials.yml', __FILE__) (or similar)
  • In your code, use ENV['MY_SECRET_API_KEY']

Acknowledgements

Written/Conceived by:

  • Bradley Grzesiak – Bendyworks
  • Jaymes Waters – Bendyworks
  • Nick Karpenske – Bendyworks