palkan / anyway_config

Configuration library for Ruby gems and applications
MIT License
778 stars 52 forks source link

Add Rails generators #52

Closed palkan closed 4 years ago

palkan commented 4 years ago

Changes

$ rails generate anyway:config aws access_key_id secret_access_key region storage_bucket
    generate  anyway:install
       rails  generate anyway:install
      create  app/configs/application_config.rb
      append  .gitignore
      create  app/configs/aws_config.rb
Would you like to generate a aws.yml file? (Y/n) y
      create  config/aws.yml

Rails 6 deprecated autoloading in configuration, so we need to do that ourselves. Now configs required at the boot time should be stored outside of the app/ folder (in config/configs by default).

Checklist