From 78266bf4a85feea0a6e5c6191fc0def26a1a5278 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 9 Apr 2023 22:37:34 -0400 Subject: [PATCH] Autofix Rubocop Style/RedundantConstantBase --- .rubocop_todo.yml | 6 ------ config/environments/production.rb | 4 ++-- config/initializers/sidekiq.rb | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fb3a928d343..00edf21528e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -111,12 +111,6 @@ Style/PreferredHashMethods: Exclude: - 'config/initializers/paperclip.rb' -# This cop supports safe autocorrection (--autocorrect). -Style/RedundantConstantBase: - Exclude: - - 'config/environments/production.rb' - - 'config/initializers/sidekiq.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: WordRegex. # SupportedStyles: percent, brackets diff --git a/config/environments/production.rb b/config/environments/production.rb index b42f78b14ea..7249ebbb33b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -80,7 +80,7 @@ Rails.application.configure do config.active_support.report_deprecations = false # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new + config.log_formatter = Logger::Formatter.new # Better log formatting config.lograge.enabled = true @@ -95,7 +95,7 @@ Rails.application.configure do # Log to STDOUT by default config.logger = ActiveSupport::Logger.new($stdout) - .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .tap { |logger| logger.formatter = Logger::Formatter.new } .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Do not dump schema after migrations. diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 53b02edc402..64e7e56db61 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -41,7 +41,7 @@ Sidekiq.configure_client do |config| end end -Sidekiq.logger.level = ::Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s) +Sidekiq.logger.level = Logger.const_get(ENV.fetch('RAILS_LOG_LEVEL', 'info').upcase.to_s) SidekiqUniqueJobs.configure do |config| config.enabled = !Rails.env.test?