From 6ae727fc967a2644736fec6620428822133740be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 10:22:25 -0700 Subject: [PATCH] Bump standard from 1.32.1 to 1.33.0 (#1949) * Bump standard from 1.32.1 to 1.33.0 Bumps [standard](https://github.com/standardrb/standard) from 1.32.1 to 1.33.0. - [Release notes](https://github.com/standardrb/standard/releases) - [Changelog](https://github.com/standardrb/standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/standardrb/standard/compare/v1.32.1...v1.33.0) --- updated-dependencies: - dependency-name: standard dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * standardrb --fix --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joel Hawksley --- Gemfile.lock | 22 +++++++++++----------- lib/view_component/base.rb | 4 ++-- lib/view_component/compiler.rb | 4 ++-- lib/view_component/slotable.rb | 12 ++++++------ test/test_helper.rb | 4 ++-- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 782974675..9be3a638b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -173,7 +173,7 @@ GEM nokogiri (1.15.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.23.0) + parallel (1.24.0) parser (3.2.2.4) ast (~> 2.4.1) racc @@ -242,7 +242,7 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.12.0) - rubocop (1.57.2) + rubocop (1.59.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -250,16 +250,16 @@ GEM rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-md (1.2.2) rubocop (>= 1.0) - rubocop-performance (1.19.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + rubocop-performance (1.20.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) selenium-webdriver (4.9.0) @@ -287,18 +287,18 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - standard (1.32.1) + standard (1.33.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.57.2) + rubocop (~> 1.59.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.2) + standard-performance (~> 1.3) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.2.1) + standard-performance (1.3.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.19.1) + rubocop-performance (~> 1.20.1) stringio (3.1.0) temple (0.10.3) terminal-table (3.0.2) diff --git a/lib/view_component/base.rb b/lib/view_component/base.rb index 74e52758f..048184e8b 100644 --- a/lib/view_component/base.rb +++ b/lib/view_component/base.rb @@ -617,7 +617,7 @@ def collection_parameter # @private def collection_counter_parameter - "#{collection_parameter}_counter".to_sym + :"#{collection_parameter}_counter" end # @private @@ -627,7 +627,7 @@ def counter_argument_present? # @private def collection_iteration_parameter - "#{collection_parameter}_iteration".to_sym + :"#{collection_parameter}_iteration" end # @private diff --git a/lib/view_component/compiler.rb b/lib/view_component/compiler.rb index b30c3a6b6..7295f532b 100644 --- a/lib/view_component/compiler.rb +++ b/lib/view_component/compiler.rb @@ -56,7 +56,7 @@ def call RUBY # rubocop:enable Style/EvalWithLocation - component_class.define_method("_call_#{safe_class_name}", component_class.instance_method(:call)) + component_class.define_method(:"_call_#{safe_class_name}", component_class.instance_method(:call)) component_class.silence_redefinition_of_method("render_template_for") component_class.class_eval <<-RUBY, __FILE__, __LINE__ + 1 @@ -101,7 +101,7 @@ def define_render_template_for "elsif variant.to_sym == :'#{variant}'\n #{safe_name}" end.join("\n") - component_class.define_method("_call_#{safe_class_name}", component_class.instance_method(:call)) + component_class.define_method(:"_call_#{safe_class_name}", component_class.instance_method(:call)) body = <<-RUBY if variant.nil? diff --git a/lib/view_component/slotable.rb b/lib/view_component/slotable.rb index bec4e9356..32ff831ce 100644 --- a/lib/view_component/slotable.rb +++ b/lib/view_component/slotable.rb @@ -93,11 +93,11 @@ def renders_one(slot_name, callable = nil) get_slot(slot_name) end - define_method "#{slot_name}?" do + define_method :"#{slot_name}?" do get_slot(slot_name).present? end - define_method "with_#{slot_name}_content" do |content| + define_method :"with_#{slot_name}_content" do |content| send(setter_method_name) { content.to_s } self @@ -160,7 +160,7 @@ def renders_many(slot_name, callable = nil) end ruby2_keywords(setter_method_name) if respond_to?(:ruby2_keywords, true) - define_method "with_#{singular_name}_content" do |content| + define_method :"with_#{singular_name}_content" do |content| send(setter_method_name) { content.to_s } self @@ -180,7 +180,7 @@ def renders_many(slot_name, callable = nil) get_slot(slot_name) end - define_method "#{slot_name}?" do + define_method :"#{slot_name}?" do get_slot(slot_name).present? end @@ -211,7 +211,7 @@ def register_polymorphic_slot(slot_name, types, collection:) get_slot(slot_name) end - define_method("#{slot_name}?") do + define_method(:"#{slot_name}?") do get_slot(slot_name).present? end @@ -246,7 +246,7 @@ def register_polymorphic_slot(slot_name, types, collection:) end ruby2_keywords(setter_method_name) if respond_to?(:ruby2_keywords, true) - define_method "with_#{poly_slot_name}_content" do |content| + define_method :"with_#{poly_slot_name}_content" do |content| send(setter_method_name) { content.to_s } self diff --git a/test/test_helper.rb b/test/test_helper.rb index aa7a61584..9af2a43f8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -55,10 +55,10 @@ def self.warn(message) def with_config_option(option_name, new_value, config_entrypoint: Rails.application.config.view_component) old_value = config_entrypoint.public_send(option_name) - config_entrypoint.public_send("#{option_name}=", new_value) + config_entrypoint.public_send(:"#{option_name}=", new_value) yield ensure - config_entrypoint.public_send("#{option_name}=", old_value) + config_entrypoint.public_send(:"#{option_name}=", old_value) end # Sets custom preview paths in tests.