Skip to content

Commit cad2196

Browse files
committed
Revert "RuboCop: target the current Ruby version rather than old 2.7 (rails#54692)"
RuboCop does use the current Ruby version by default, but just can't deduce it itself in certain situations, like in a `test/dummy` app within a plugin that relies on a `.ruby-version` from the parent directory. This reverts commit 7705019.
1 parent 7705019 commit cad2196

File tree

4 files changed

+0
-13
lines changed

4 files changed

+0
-13
lines changed

railties/CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
* RuboCop targets the Ruby version you're using rather than the 2.7 default.
2-
3-
*Jeremy Daer*
4-
51
* Add a `SessionTestHelper` module with `sign_in_as(user)` and `sign_out` test helpers when
62
running `rails g authentication`. Simplifies authentication in integration tests.
73

railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Omakase Ruby styling for Rails
22
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
33

4-
AllCops:
5-
TargetRubyVersion: <%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || RUBY_ENGINE_VERSION %>
6-
74
# Overwrite or add rules to create your own house style
85
#
96
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`

railties/lib/rails/generators/rails/plugin/templates/rubocop.yml.tt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Omakase Ruby styling for Rails
22
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
33

4-
AllCops:
5-
TargetRubyVersion: <%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || RUBY_ENGINE_VERSION %>
6-
74
# Overwrite or add rules to create your own house style
85
#
96
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`

railties/test/generators/app_generator_test.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,6 @@ def test_inclusion_of_rubocop
614614
run_generator
615615
assert_gem "rubocop-rails-omakase"
616616
assert_file "config/environments/development.rb", %r|# Apply autocorrection by RuboCop to files generated by `bin/rails generate`\.|
617-
assert_file ".rubocop.yml" do |content|
618-
assert_match "TargetRubyVersion: #{ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || RUBY_ENGINE_VERSION}", content
619-
end
620617
end
621618

622619
def test_quiet_assets_in_development

0 commit comments

Comments
 (0)