aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands/credentials_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Do not add master key when `RAILS_MASTER_KEY` env specified (#31922)Yuji Yaginuma2018-02-081-0/+12
| | | Fixes #31917
* Raise an error only when `require_master_key` is specifiedyuuji.yaginuma2017-12-181-6/+20
| | | | | | | | | To prevent errors from being raise in environments where credentials is unnecessary. Context: https://github.com/rails/rails/issues/31283#issuecomment-348801489 Fixes #31283
* Do not overwrite by default if credentials already existsyuuji.yaginuma2017-11-301-0/+8
| | | | Fixes #31286
* Add CLI to manage encrypted files/configs.Wojciech Wnętrzak2017-11-151-1/+4
| | | | | | | | | | | | | | | | | | To edit/show encrypted file: ``` bin/rails encrypted:edit config/staging_tokens.yml.enc bin/rails encrypted:edit config/staging_tokens.yml.enc --key config/staging.key bin/rails encrypted:show config/staging_tokens.yml.enc ``` Also provides a backing Rails.application.encrypted API for Ruby access: ```ruby Rails.application.encrypted("config/staging_tokens.yml.enc").read Rails.application.encrypted("config/staging_tokens.yml.enc").config Rails.application.encrypted("config/staging_tokens.yml.enc", key: "config/staging.key") ```
* Add tests for credentials commandyuuji.yaginuma2017-09-151-0/+19
|
* Make master key added to gitignore the same value as when creating appplicationyuuji.yaginuma2017-09-141-0/+30
For gitignore generated by `rails new`, key with a leading slash is specified. https://github.com/rails/rails/blob/69f976b859cae7f9d050152103da018b7f5dda6d/railties/lib/rails/generators/rails/app/templates/gitignore#L11 Therefore, when executing `credentials:edit`, also need leading slack. In order to avoid such a difference, fixed to use same method for `rails new` and `credentials:edit`.