From eb5fea40a404e829f00552859ae1b206728d99d7 Mon Sep 17 00:00:00 2001 From: Bart de Water Date: Sat, 28 Jul 2018 17:37:17 -0400 Subject: Enable Start/EndWith and RegexpMatch cops In cases where the MatchData object is not used, this provides a speed-up: https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end --- railties/lib/rails/commands/secrets/secrets_command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/commands/secrets/secrets_command.rb') diff --git a/railties/lib/rails/commands/secrets/secrets_command.rb b/railties/lib/rails/commands/secrets/secrets_command.rb index 3d2c2cc7c6..2eebc0f35f 100644 --- a/railties/lib/rails/commands/secrets/secrets_command.rb +++ b/railties/lib/rails/commands/secrets/secrets_command.rb @@ -42,7 +42,7 @@ module Rails rescue Rails::Secrets::MissingKeyError => error say error.message rescue Errno::ENOENT => error - if error.message =~ /secrets\.yml\.enc/ + if /secrets\.yml\.enc/.match?(error.message) deprecate_in_favor_of_credentials_and_exit else raise -- cgit v1.2.3