bendyworks / idkfa

Simple credentials loading
https://github.com/bendyworks/idkfa
4 stars 3 forks source link

rails generate idkfa:install #6

Open bendycode opened 11 years ago

bendycode commented 11 years ago

Let's have a generator to make using idkfa as simple as:

  1. gem 'idkfa'
  2. bundle
  3. rails generate idkfa:install
  4. add your keys to config/credentials.yml
  5. add your keys to config/credentials.yml.example

We'll have to have something like DEFAULT_CREDENTIALS_PATH declared. Perhaps this should be set to something like config/idkfa_credentials.yml, config/credentials.yml, or config/idkfa.yml

Generator should:

  1. add "#{DEFAULT_CREDENTIALS_PATH}" into .gitignore
  2. drop the default skeleton file contents into DEFAULT_CREDENTIALS_PATH
  3. drop the default skeleton file contents into #{DEFAULT_CREDENTIALS_PATH}.example
  4. write a message to stdout, prompting the user to now add their keys with values to DEFAULT_CREDENTIALS_PATH, and without the values to #{DEFAULT_CREDENTIALS_PATH}.example
listrophy commented 11 years ago

As mentioned in #5, just use config/idkfa.yml. Don't let the user configure it (yet).