From: Toshi MARUYAMA Date: Sat, 23 Nov 2019 14:28:25 +0000 (+0000) Subject: cleanup: rubocop: fix Style/MultilineIfModifier in test/mocks/open_id_authentication_... X-Git-Tag: 4.2.0~1434 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc2ee7693c79bd201043b22c24a353f816f8c748;p=redmine.git cleanup: rubocop: fix Style/MultilineIfModifier in test/mocks/open_id_authentication_mock.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19206 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index cb522dcc5..dbf07f338 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1255,7 +1255,6 @@ Style/MultilineIfModifier: - 'lib/redmine/helpers/gantt.rb' - 'lib/redmine/wiki_formatting.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - - 'test/mocks/open_id_authentication_mock.rb' Style/MultilineTernaryOperator: Exclude: diff --git a/test/mocks/open_id_authentication_mock.rb b/test/mocks/open_id_authentication_mock.rb index 59bd585c1..d2c04c4bc 100644 --- a/test/mocks/open_id_authentication_mock.rb +++ b/test/mocks/open_id_authentication_mock.rb @@ -21,14 +21,16 @@ module OpenIdAuthentication # Don't process registration fields unless it is requested. unless identity_url.include?('blank') || (options[:required].nil? && options[:optional].nil?) - - options[:required].each do |field| - extension_response_fields[field.to_s] = EXTENSION_FIELDS[field.to_s] - end unless options[:required].nil? - - options[:optional].each do |field| - extension_response_fields[field.to_s] = EXTENSION_FIELDS[field.to_s] - end unless options[:optional].nil? + unless options[:required].nil? + options[:required].each do |field| + extension_response_fields[field.to_s] = EXTENSION_FIELDS[field.to_s] + end + end + unless options[:optional].nil? + options[:optional].each do |field| + extension_response_fields[field.to_s] = EXTENSION_FIELDS[field.to_s] + end + end end yield Result[:successful], identity_url, extension_response_fields