From 8d47ba893a714a52183b57be83eb38bcb7ffef57 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 19 Apr 2024 16:32:26 -0400 Subject: [PATCH] Fix `Style/PercentLiteralDelimiters` cop (#30006) --- .rubocop_todo.yml | 7 ------- config/deploy.rb | 4 ++-- config/initializers/doorkeeper.rb | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9ca7ba6f1..ac65c1589 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -197,13 +197,6 @@ Style/OptionalBooleanParameter: - 'app/workers/unfollow_follow_worker.rb' - 'lib/mastodon/redis_config.rb' -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: PreferredDelimiters. -Style/PercentLiteralDelimiters: - Exclude: - - 'config/deploy.rb' - - 'config/initializers/doorkeeper.rb' - # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: short, verbose diff --git a/config/deploy.rb b/config/deploy.rb index 75bfcc26f..28c838770 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -13,8 +13,8 @@ set :migration_role, :app append :linked_files, '.env.production', 'public/robots.txt' append :linked_dirs, 'vendor/bundle', 'node_modules', 'public/system' -SYSTEMD_SERVICES = %i[sidekiq streaming web].freeze -SERVICE_ACTIONS = %i[reload restart status].freeze +SYSTEMD_SERVICES = %i(sidekiq streaming web).freeze +SERVICE_ACTIONS = %i(reload restart status).freeze namespace :systemd do SYSTEMD_SERVICES.each do |service| diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index f9d47a205..428e47391 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -150,7 +150,7 @@ Doorkeeper.configure do # # You can use this option in order to forbid URI's with 'javascript' scheme # for example. - forbid_redirect_uri { |uri| %w[data vbscript javascript].include?(uri.scheme.to_s.downcase) } + forbid_redirect_uri { |uri| %w(data vbscript javascript).include?(uri.scheme.to_s.downcase) } # Specify what grant flows are enabled in array of Strings. The valid # strings and the flows they enable are: