Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gemfiles/8.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 1 addition & 2 deletions lib/bootstrap_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 1 addition & 2 deletions lib/bootstrap_form/inputs/collection_select.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/bootstrap_form/inputs/grouped_collection_select.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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={})
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/bootstrap_form/inputs/inputs_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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) ||
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading