Fix rubocop offenses

This commit is contained in:
Sebastian Serth
2022-12-09 13:11:46 +01:00
parent 5e784ef8cd
commit bf077ef478
4 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ Rails.application.configure do
config.active_support.deprecation = :notify config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed. # Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new config.log_formatter = Logger::Formatter.new
# Use a different logger for distributed setups. # Use a different logger for distributed setups.
# require 'syslog/logger' # require 'syslog/logger'

View File

@ -101,7 +101,7 @@ Rails.application.configure do
config.active_support.disallowed_deprecation_warnings = [] config.active_support.disallowed_deprecation_warnings = []
# Use default logging formatter so that PID and timestamp are not suppressed. # Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new config.log_formatter = Logger::Formatter.new
# Use a different logger for distributed setups. # Use a different logger for distributed setups.
# require 'syslog/logger' # require 'syslog/logger'

View File

@ -3,7 +3,7 @@
require 'code_ocean/config' require 'code_ocean/config'
require 'prometheus/record' require 'prometheus/record'
return unless CodeOcean::Config.new(:code_ocean).read[:prometheus_exporter][:enabled] && !defined?(::Rails::Console) return unless CodeOcean::Config.new(:code_ocean).read[:prometheus_exporter][:enabled] && !defined?(Rails::Console)
return if %w[db: assets:].any? {|task| Rake.application.top_level_tasks.to_s.include?(task) } return if %w[db: assets:].any? {|task| Rake.application.top_level_tasks.to_s.include?(task) }
# Add metric callbacks to all models # Add metric callbacks to all models

View File

@ -88,7 +88,7 @@ describe SessionsController do
it 'sets the specified locale' do it 'sets the specified locale' do
expect(controller).to receive(:switch_locale).and_call_original expect(controller).to receive(:switch_locale).and_call_original
i18n = class_double I18n, locale: locale i18n = class_double(I18n, locale:)
allow(I18n).to receive(:locale=).with(I18n.default_locale).and_call_original allow(I18n).to receive(:locale=).with(I18n.default_locale).and_call_original
allow(I18n).to receive(:locale=).with(locale).and_return(i18n) allow(I18n).to receive(:locale=).with(locale).and_return(i18n)
perform_request perform_request