diff options
author | Edouard CHIN <edouard.chin@shopify.com> | 2019-07-26 15:56:49 +0200 |
---|---|---|
committer | Edouard CHIN <edouard.chin@shopify.com> | 2019-07-26 16:28:51 +0200 |
commit | 5a4acf7ac42c44a17a645e8d3682fd0cc145428d (patch) | |
tree | 9fc5f9cbd4eb7c2fa540ee931d304dea9666476d /railties/test/isolation | |
parent | ec7aa03c984a0daeead4f71c7189d241139a6770 (diff) | |
download | rails-5a4acf7ac42c44a17a645e8d3682fd0cc145428d.tar.gz rails-5a4acf7ac42c44a17a645e8d3682fd0cc145428d.tar.bz2 rails-5a4acf7ac42c44a17a645e8d3682fd0cc145428d.zip |
Prettify diff generated by git for encripted file:
- @sinsoku had the idea and started implementing it few months ago
but sadly didn't finish it.
This PR is taking over his work.
The credentials feature has changed a lot since @sinsoku opened hi
PR, it was easier to just restart from scratch instead of checking
out his branch.
Sinsoku will get all the credit he deserves for this idea :)
TL;DR on that that feature is to make the `git diff` or `git log`
of encrypted files to be readable.
The previous implementation was only setting up the git required
configuration for the first time Rails was bootstraped, so I decided
to instead provide the user a choice to opt-in for readable diff
credential whenever a user types the `bin/rails credentials:edit`
command.
The question won't be asked in the future the user has already
answered or if the user already opted in.
Co-authored-by: Takumi Shotoku <insoku.listy@gmail.com>
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 0fe62df8ba..6077ba3ee7 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -301,7 +301,7 @@ module TestHelpers # stderr:: true to pass STDERR output straight to the "real" STDERR. # By default, the STDERR and STDOUT of the process will be # combined in the returned string. - def rails(*args, allow_failure: false, stderr: false) + def rails(*args, allow_failure: false, stderr: false, stdin: File::NULL) args = args.flatten fork = true @@ -328,7 +328,7 @@ module TestHelpers out_read.close err_read.close if err_read - $stdin.reopen(File::NULL, "r") + $stdin.reopen(stdin, "r") $stdout.reopen(out_write) $stderr.reopen(err_write) |