diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6872fe13ea..b35c85e16a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -702,19 +702,6 @@ Style/PreferredHashMethods: Exclude: - 'app/controllers/api/v0/shipments_controller.rb' -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Methods. -Style/RedundantArgument: - Exclude: - - 'engines/dfc_provider/app/services/authorization_control.rb' - -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Style/RedundantAssignment: - Exclude: - - 'spec/models/database_spec.rb' - # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: AutoCorrect, AllowComments. diff --git a/engines/dfc_provider/app/services/authorization_control.rb b/engines/dfc_provider/app/services/authorization_control.rb index 879eab7980..a68db2dc6e 100644 --- a/engines/dfc_provider/app/services/authorization_control.rb +++ b/engines/dfc_provider/app/services/authorization_control.rb @@ -47,7 +47,7 @@ class AuthorizationControl end def access_token - @request.headers['Authorization'].to_s.split(' ').last + @request.headers['Authorization'].to_s.split.last end def ofn_api_token diff --git a/spec/models/database_spec.rb b/spec/models/database_spec.rb index 609f275646..2994085c97 100644 --- a/spec/models/database_spec.rb +++ b/spec/models/database_spec.rb @@ -102,7 +102,7 @@ RSpec.describe "Database" do orphaned_records_query = generate_orphaned_records_query(model_class, foreign_key_table_name, foreign_key_column) - migration = <<~MIGRATION + <<~MIGRATION # Orphaned records can be found before running this migration with the following SQL: #{orphaned_records_query} @@ -113,8 +113,6 @@ RSpec.describe "Database" do end end MIGRATION - - migration end def generate_orphaned_records_query(model_class, foreign_key_table_name, foreign_key_column)