bundle update rubocop --conservative (#50515)

Also perform two autocorrects with `bundle exec rubocop -A`:

- fixes a new case of [`Style/RedundantReturn`][1]
- fixes a new case of [`Performance/StringInclude`][2]

[1]: 146b1c2e3389bc70ea0b54abf7843fc1d6c8cd5f
[2]: 3158bbb9f6454dce64dd0b4e2a548351d014c48f

Co-authored-by: David Heinemeier Hansson <david@basecamp.com>
This commit is contained in:
Hartley McGuire 2024-01-02 06:49:36 -05:00 committed by GitHub
parent 66615ac514
commit 90da071bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

@ -445,8 +445,7 @@ GEM
retriable (3.1.2)
rexml (3.2.6)
rouge (4.2.0)
rubocop (1.57.0)
base64 (~> 0.1.1)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
@ -454,10 +453,10 @@ 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.29.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-md (1.2.0)
rubocop (>= 1.0)
@ -465,9 +464,9 @@ GEM
rubocop (>= 1.39, < 2.0)
rubocop-packaging (0.5.2)
rubocop (>= 1.33, < 2.0)
rubocop-performance (1.16.0)
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)
rubocop-rails (2.18.0)
activesupport (>= 4.2.0)
rack (>= 1.1)

@ -1694,7 +1694,7 @@ def test_route_with_subdomain_and_constraints_must_receive_params
set.draw do
get "page/:name" => "pages#show", :constraints => lambda { |request|
name_param = request.params[:name]
return true
true
}
end
assert_equal({ controller: "pages", action: "show", name: "mypage" },

@ -784,7 +784,7 @@ def link_to_remote_options?(options)
end
def add_method_to_attributes!(html_options, method)
if method_not_get_method?(method) && !html_options["rel"]&.match?(/nofollow/)
if method_not_get_method?(method) && !html_options["rel"]&.include?("nofollow")
if html_options["rel"].blank?
html_options["rel"] = "nofollow"
else