aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/secrets_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix false positive test related to wrong app root path.Wojciech Wnętrzak2017-07-211-11/+11
| | | | | | Without setting root config, `config.paths["config/secrets"]` located in https://github.com/rails/rails/blob/84eb498f84ebc5d1be0b0db6f7bca9da3d679ca6/railties/lib/rails/application.rb#L390 always returned empty list.
* Treat secrets as binaryyuuji.yaginuma2017-07-091-0/+34
| | | | | | | | | | | | | | | | | Until Rails 5.1.1 secrets was treated as binary inside Rails. https://github.com/rails/rails/blob/v5.1.1/railties/lib/rails/secrets.rb#L59 https://github.com/rails/rails/blob/v5.1.1/railties/lib/rails/secrets.rb#L63 However, it is treated as String in Rails 5.1.2(changed by 157db872103429e8782b62d1cb5d1d91337177a7). https://github.com/rails/rails/blob/v5.1.2/railties/lib/rails/secrets.rb#L104 https://github.com/rails/rails/blob/v5.1.2/railties/lib/rails/secrets.rb#L108 As a result, when upgrading from Rails 5.1.1 to 5.1.2, to write the value treated as binary using `File.write`, causing an error. In order to avoid `UndefinedConversionError`, fixed it to treat it as binary like 5.1.1. Fixes #29696
* Do not update `secrets.yml.enc` when secretes do not changeyuuji.yaginuma2017-07-071-0/+18
| | | | | | | | | | | Currently, if open a file with `secrets:edit` command, `secrets.yml.enc` will be changed even if its contents do not change. Therefore, even if only want to check secrets, the difference will come out. This is a little inconvenient. As a fix to the above problem, when content does not change, `secrets.yml.ecn` is fixed so that it is not changed.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Let run_secrets_generator handle chdir.Kasper Timm Hansen2017-04-161-3/+1
|
* Use the config value directly when call `secrets`yuuji.yaginuma2017-04-161-8/+26
| | | | | | | | | | | Currently, `read_encrypted_secrets` is set with initializer. Therefore if refer to `secrets` in config, `read_encrypted_secrets` is false, so can not get the value of `secrets.yml.enc`. In order to be able to refer to secrets in config, modified to refer to `config.read_encrypted_secrets` when calling `secrets`. Fixes #28618.
* Move key packing into encryptor.Kasper Timm Hansen2017-03-021-3/+2
|
* Default Secrets to AES-128-GCM, using ActiveSupport::MessageEncryptorStephen Touset2017-03-011-2/+3
| | | | Fixes #28135.
* Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-231-0/+108
|
* Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-231-108/+0
|
* Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-231-0/+108