From: Tom Hughes Date: Tue, 28 May 2024 16:39:33 +0000 (+0100) Subject: Fix new rubocop warnings X-Git-Tag: live~531 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d3d0da03286d7bf9dc06027f8edb802a3102bb0b Fix new rubocop warnings --- diff --git a/app/models/trace.rb b/app/models/trace.rb index d1f917571..20723b98d 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -81,7 +81,7 @@ class Trace < ApplicationRecord :content_type => content_type(attachable.path), :identify => false) else - super(attachable) + super end end diff --git a/config/initializers/abstract_adapter.rb b/config/initializers/abstract_adapter.rb index 2bc4f5e59..9d59656c7 100644 --- a/config/initializers/abstract_adapter.rb +++ b/config/initializers/abstract_adapter.rb @@ -6,7 +6,7 @@ if defined?(ActiveRecord::ConnectionAdaptors::AbstractAdapter) if e.is_a?(Timeout::Error) || e.is_a?(OSM::APITimeoutError) e else - super(e, sql) + super end end end diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index fdbf11a2c..e7b813b73 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -6,7 +6,7 @@ module OpenStreetMap class Cors < Rack::Cors def call(env) - status, headers, body = super(env) + status, headers, body = super headers["Cache-Control"] = "no-cache" if headers["Access-Control-Allow-Origin"] [status, headers, body] end diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index 266e41cbb..8f74c3cd3 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -18,7 +18,7 @@ module OpenStreetMap def store_translations(locale, data, options = {}) locale = ::I18n::Locale::Tag::Rfc4646.tag(locale).to_s - super(locale, data, options) + super end end diff --git a/config/initializers/mail_delivery_job.rb b/config/initializers/mail_delivery_job.rb index 4bab2000b..30b23d2dd 100644 --- a/config/initializers/mail_delivery_job.rb +++ b/config/initializers/mail_delivery_job.rb @@ -4,7 +4,7 @@ module OpenStreetMap def perform(mailer, mail_method, delivery_method, *args, **kwargs) kwargs = args.pop if kwargs.empty? && args.last.is_a?(Hash) - super(mailer, mail_method, delivery_method, *args, **kwargs) + super end end end diff --git a/config/initializers/oauth.rb b/config/initializers/oauth.rb index fbe4ad219..812e6610d 100644 --- a/config/initializers/oauth.rb +++ b/config/initializers/oauth.rb @@ -45,7 +45,7 @@ module OpenStreetMap status = options.delete(:status) || :ok head status, options else - super(options) + super end end @@ -61,7 +61,7 @@ module OpenStreetMap end end - super(controller) + super end end end diff --git a/config/initializers/router.rb b/config/initializers/router.rb index 4357a87f2..849aba2ad 100644 --- a/config/initializers/router.rb +++ b/config/initializers/router.rb @@ -5,7 +5,7 @@ module OpenStreetMap module Router module ForceEncoding def normalize_path(path) - super(path).force_encoding("UTF-8") + super.force_encoding("UTF-8") end end end diff --git a/config/initializers/rtlcss.rb b/config/initializers/rtlcss.rb index 11e4e0d5c..793c484fc 100644 --- a/config/initializers/rtlcss.rb +++ b/config/initializers/rtlcss.rb @@ -2,7 +2,7 @@ require "rtlcss" class RtlcssSCSSProcessor < SassC::Rails::ScssTemplate def self.call(input) - output = super(input) + output = super data = Rtlcss.flip_css(output[:data]) output.delete(:map) output.merge(:data => data) diff --git a/lib/osm.rb b/lib/osm.rb index 65eab6907..a0fcef8b9 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -8,7 +8,7 @@ module OSM # The base class for API Errors. class APIError < RuntimeError def initialize(message = "Generic API Error") - super(message) + super end def status