From e56fb9e4890435ef89b56ef5d1b9a8d0d46ab938 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 18 Dec 2023 04:32:02 -0500 Subject: [PATCH] Fix `Style/SymbolProc` cop (#28386) --- .rubocop_todo.yml | 7 ------- config/initializers/3_omniauth.rb | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d9b2ec814..4ddca804a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -478,13 +478,6 @@ Style/StringLiterals: - 'config/initializers/webauthn.rb' - 'config/routes.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments. -# AllowedMethods: define_method, mail, respond_to -Style/SymbolProc: - Exclude: - - 'config/initializers/3_omniauth.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowSafeAssignment. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex diff --git a/config/initializers/3_omniauth.rb b/config/initializers/3_omniauth.rb index d316c3b73..aa8ba1a05 100644 --- a/config/initializers/3_omniauth.rb +++ b/config/initializers/3_omniauth.rb @@ -79,7 +79,7 @@ Devise.setup do |config| oidc_options[:client_auth_method] = ENV['OIDC_CLIENT_AUTH_METHOD'] if ENV['OIDC_CLIENT_AUTH_METHOD'] # OPTIONAL (default: basic) scope_string = ENV['OIDC_SCOPE'] if ENV['OIDC_SCOPE'] # NEED scopes = scope_string.split(',') - oidc_options[:scope] = scopes.map { |x| x.to_sym } + oidc_options[:scope] = scopes.map(&:to_sym) oidc_options[:response_type] = ENV['OIDC_RESPONSE_TYPE'] if ENV['OIDC_RESPONSE_TYPE'] # OPTIONAL (default: code) oidc_options[:response_mode] = ENV['OIDC_RESPONSE_MODE'] if ENV['OIDC_RESPONSE_MODE'] # OPTIONAL (default: query) oidc_options[:display] = ENV['OIDC_DISPLAY'] if ENV['OIDC_DISPLAY'] # OPTIONAL (default: page)