From 3e30b1ca8fe7f086d48759951930fc54243efa98 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Wed, 17 May 2023 23:33:40 +0000 Subject: [PATCH 1/3] :police_car: regenerate rubocop todo --- .rubocop_todo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2d540c9..d856da0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 180` -# on 2023-04-20 23:33:11 UTC using RuboCop version 1.50.2. +# on 2023-05-17 23:33:40 UTC using RuboCop version 1.51.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new From 8fce2a71805048687d2c1a8f359fb126bbfdc592 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Wed, 17 May 2023 23:33:46 +0000 Subject: [PATCH 2/3] :police_car: Style/ExpandPathArguments --- .rubocop_todo.yml | 6 ------ .../dispatch_rider/install/install_generator.rb | 2 +- .../dispatch_rider/job/dispatch_job_generator.rb | 8 ++++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d856da0..31df6ad 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -415,12 +415,6 @@ Style/ClassVars: Exclude: - 'lib/dispatch-rider/publisher/base.rb' -# Offense count: 5 -# This cop supports safe autocorrection (--autocorrect). -Style/ExpandPathArguments: - Exclude: - - 'lib/generators/dispatch_rider/install/install_generator.rb' - - 'lib/generators/dispatch_rider/job/dispatch_job_generator.rb' # Offense count: 26 # This cop supports safe autocorrection (--autocorrect). diff --git a/lib/generators/dispatch_rider/install/install_generator.rb b/lib/generators/dispatch_rider/install/install_generator.rb index f141879..9ca7946 100644 --- a/lib/generators/dispatch_rider/install/install_generator.rb +++ b/lib/generators/dispatch_rider/install/install_generator.rb @@ -2,7 +2,7 @@ module DispatchRider class InstallGenerator < ::Rails::Generators::Base - source_root File.expand_path("../templates", __FILE__) + source_root File.expand_path('templates', __dir__) def create_scripts copy_file "script/dispatch_rider", "script/dispatch_rider" diff --git a/lib/generators/dispatch_rider/job/dispatch_job_generator.rb b/lib/generators/dispatch_rider/job/dispatch_job_generator.rb index 7c1c15a..45d8e74 100644 --- a/lib/generators/dispatch_rider/job/dispatch_job_generator.rb +++ b/lib/generators/dispatch_rider/job/dispatch_job_generator.rb @@ -2,12 +2,12 @@ class DispatchJob < Rails::Generators::Base class Publisher < Rails::Generators::Base - source_root File.expand_path('../templates/publisher', __FILE__) + source_root File.expand_path('templates/publisher', __dir__) argument :handler_name, type: :string, required: true argument :publisher_name, type: :string, required: true class Rspec < Rails::Generators::Base - source_root File.expand_path('../templates/publisher', __FILE__) + source_root File.expand_path('templates/publisher', __dir__) argument :handler_name, type: :string, required: true argument :publisher_name, type: :string, required: true @@ -24,11 +24,11 @@ def generate_publisher end class Handler < Rails::Generators::Base - source_root File.expand_path('../templates/handler', __FILE__) + source_root File.expand_path('templates/handler', __dir__) argument :handler_name, type: :string, required: true class Rspec < Rails::Generators::Base - source_root File.expand_path('../templates/handler', __FILE__) + source_root File.expand_path('templates/handler', __dir__) argument :handler_name, type: :string, required: true def generate_handler_spec From 5d5d80cb9c990345fd017b9e329b3c7ddc14b433 Mon Sep 17 00:00:00 2001 From: Rubocop Challenger Date: Wed, 17 May 2023 23:33:53 +0000 Subject: [PATCH 3/3] :police_car: regenerate rubocop todo --- .rubocop_todo.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 31df6ad..36da533 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 180` -# on 2023-05-17 23:33:40 UTC using RuboCop version 1.51.0. +# on 2023-05-17 23:33:53 UTC using RuboCop version 1.51.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -415,7 +415,6 @@ Style/ClassVars: Exclude: - 'lib/dispatch-rider/publisher/base.rb' - # Offense count: 26 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.