File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
commands/credentials/credentials_command Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ def enroll_project_in_credentials_diffing
13
13
gitattributes . write ( GITATTRIBUTES_ENTRY , mode : "a" )
14
14
15
15
say "Enrolled project in credentials file diffing!"
16
- say "Rails ensures the rails_credentials diff driver is set when running `#{ executable ( :edit ) } `. See `#{ executable ( :help ) } ` for more."
16
+ say ""
17
+ say "Rails will configure the Git diff driver for credentials when running `#{ executable ( :edit ) } `. See `#{ executable ( :help ) } ` for more information."
17
18
end
18
19
end
19
20
@@ -43,6 +44,7 @@ def diffing_driver_configured?
43
44
44
45
def configure_diffing_driver
45
46
system "git config diff.rails_credentials.textconv '#{ executable ( :diff ) } '"
47
+ say "Configured Git diff driver for credentials."
46
48
end
47
49
48
50
def gitattributes
Original file line number Diff line number Diff line change @@ -185,7 +185,9 @@ def credentials
185
185
def credentials_diff_enroll
186
186
return if options [ :skip_decrypted_diffs ] || options [ :skip_git ] || options [ :dummy_app ] || options [ :pretend ]
187
187
188
- rails_command "credentials:diff --enroll" , inline : true , shell : @generator . shell
188
+ @generator . shell . mute do
189
+ rails_command "credentials:diff --enroll" , inline : true , shell : @generator . shell
190
+ end
189
191
end
190
192
191
193
def database_yml
Original file line number Diff line number Diff line change @@ -237,11 +237,14 @@ class Rails::Command::CredentialsCommandTest < ActiveSupport::TestCase
237
237
238
238
test "running edit after enrolling in diffing sets diff driver" do
239
239
run_diff_command ( enroll : true )
240
- run_edit_command
240
+
241
+ assert_match %r/git diff driver/i , run_edit_command
241
242
242
243
Dir . chdir ( app_path ) do
243
244
assert_equal "bin/rails credentials:diff" , `git config --get 'diff.rails_credentials.textconv'` . strip
244
245
end
246
+
247
+ assert_no_match %r/git diff driver/i , run_edit_command
245
248
end
246
249
247
250
test "diff from git diff left file" do
You can’t perform that action at this time.
0 commit comments