From 7217898afb2d36734a057b8a14f755c07be810c9 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Thu, 1 Oct 2026 01:51:36 +0000 Subject: [PATCH 1/3] New RuboCop corrections --- lib/bootstrap_form.rb | 3 +-- lib/bootstrap_form/inputs/collection_select.rb | 3 +-- lib/bootstrap_form/inputs/grouped_collection_select.rb | 3 +-- lib/bootstrap_form/inputs/inputs_collection.rb | 3 +-- test/test_helper.rb | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/bootstrap_form.rb b/lib/bootstrap_form.rb index 5109147cf..f98b1b7d3 100644 --- a/lib/bootstrap_form.rb +++ b/lib/bootstrap_form.rb @@ -32,11 +32,10 @@ def deprecator end mattr_accessor :field_error_proc - # rubocop:disable Style/ClassVars + # rubocop:disable-next Style/ClassVars @@field_error_proc = proc do |html_tag, _instance_tag| html_tag end - # rubocop:enable Style/ClassVars end require "bootstrap_form/engine" if defined?(Rails) diff --git a/lib/bootstrap_form/inputs/collection_select.rb b/lib/bootstrap_form/inputs/collection_select.rb index c43091ebc..38ad4bc10 100644 --- a/lib/bootstrap_form/inputs/collection_select.rb +++ b/lib/bootstrap_form/inputs/collection_select.rb @@ -8,7 +8,7 @@ module CollectionSelect included do # Disabling Metrics/ParameterLists because the upstream Rails method has the same parameters - # rubocop:disable Metrics/ParameterLists + # rubocop:disable-next Metrics/ParameterLists def collection_select_with_bootstrap(method, collection, value_method, text_method, options={}, html_options={}) html_options = html_options.reverse_merge(control_class: "form-select") form_group_builder(method, options, html_options) do @@ -17,7 +17,6 @@ def collection_select_with_bootstrap(method, collection, value_method, text_meth end end end - # rubocop:enable Metrics/ParameterLists bootstrap_alias :collection_select end diff --git a/lib/bootstrap_form/inputs/grouped_collection_select.rb b/lib/bootstrap_form/inputs/grouped_collection_select.rb index ab80d8417..e0ba99481 100644 --- a/lib/bootstrap_form/inputs/grouped_collection_select.rb +++ b/lib/bootstrap_form/inputs/grouped_collection_select.rb @@ -8,7 +8,7 @@ module GroupedCollectionSelect included do # Disabling Metrics/ParameterLists because the upstream Rails method has the same parameters - # rubocop:disable Metrics/ParameterLists + # rubocop:disable-next Metrics/ParameterLists def grouped_collection_select_with_bootstrap(method, collection, group_method, group_label_method, option_key_method, option_value_method, options={}, html_options={}) @@ -21,7 +21,6 @@ def grouped_collection_select_with_bootstrap(method, collection, group_method, end end end - # rubocop:enable Metrics/ParameterLists bootstrap_alias :grouped_collection_select end diff --git a/lib/bootstrap_form/inputs/inputs_collection.rb b/lib/bootstrap_form/inputs/inputs_collection.rb index 9d742255f..b1a571493 100644 --- a/lib/bootstrap_form/inputs/inputs_collection.rb +++ b/lib/bootstrap_form/inputs/inputs_collection.rb @@ -32,7 +32,7 @@ def group_label_class(field_layout) end # FIXME: Find a way to reduce the parameter list size - # rubocop:disable Metrics/ParameterLists + # rubocop:disable-next Metrics/ParameterLists def form_group_collection_input_options(options, text, obj, index, input_value, collection) input_options = options.merge(label: text.respond_to?(:call) ? text.call(obj) : obj.send(text)) if (checked = input_options[:checked]) @@ -46,7 +46,6 @@ def form_group_collection_input_options(options, text, obj, index, input_value, input_options.except!(:class) input_options end - # rubocop:enable Metrics/ParameterLists def form_group_collection_input_checked?(checked, obj, input_value) checked == input_value || Array(checked).try(:include?, input_value) || diff --git a/test/test_helper.rb b/test/test_helper.rb index da0547aa3..aa9c3c473 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,7 @@ ENV["RAILS_ENV"] ||= "test" -puts "BUNDLE_GEMFILE: #{ENV.fetch('BUNDLE_GEMFILE', nil)}" # rubocop:disable Rails/Output +puts "BUNDLE_GEMFILE: #{ENV.fetch('BUNDLE_GEMFILE', nil)}" require "warning" mail_gem_path = Gem::Specification.find_by_name("mail").full_gem_path From f13592ecffc506664cd9a8365d25458b39ace1c2 Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Thu, 1 Oct 2026 01:52:07 +0000 Subject: [PATCH 2/3] Add Ruby 4.0 to matrix --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e7bc65548..0a1b1a252 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [ '3.4', '3.3', '3.2', 'ruby-head' ] + ruby-version: [ '4.0', '3.4', '3.3', '3.2', 'ruby-head' ] gemfile: [ '8.1', '8.0', '7.2', 'edge' ] exclude: - ruby-version: 3.2 From 2d034f9d8c5e7252b7b30b414a72d907ca3a793e Mon Sep 17 00:00:00 2001 From: Larry Reid Date: Thu, 1 Oct 2026 02:06:45 +0000 Subject: [PATCH 3/3] Hold json gem at 2.21 --- gemfiles/8.0.gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/gemfiles/8.0.gemfile b/gemfiles/8.0.gemfile index 32cf900d3..adbc130f4 100644 --- a/gemfiles/8.0.gemfile +++ b/gemfiles/8.0.gemfile @@ -8,3 +8,4 @@ gem "mutex_m" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") gem "propshaft" gem "rails", "~> 8.0.1" gem "sqlite3" +gem "json", "~> 2.21"