From 3db5ee998052890666230c79b7a1e1e316ca6d3a Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 07:35:09 +0900 Subject: [PATCH 01/15] Add rubocop to new rails app generator This setups a basic rubocop config for new rails apps using the `rubocop-rails-omakase` gem: https://github.com/rails/rubocop-rails-omakase It can be skipped with the `--skip-rubocop` flag. --- railties/lib/rails/generators/app_base.rb | 13 +++++++++ .../generators/rails/app/app_generator.rb | 11 ++++++++ .../rails/app/templates/.rubocop.yml.tt | 2 ++ .../generators/rails/app/templates/Gemfile.tt | 5 ++++ .../app/templates/config/application.rb.tt | 2 +- .../generators/rails/app/templates/rubocop.tt | 27 +++++++++++++++++++ .../test/application_system_test_case.rb.tt | 2 +- .../test/generators/app_generator_test.rb | 15 +++++++++++ 8 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt create mode 100644 railties/lib/rails/generators/rails/app/templates/rubocop.tt diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index fb8572ad97776..f9ca0bfa12326 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -100,6 +100,9 @@ def self.add_shared_options_for(name) class_option :skip_dev_gems, type: :boolean, default: nil, desc: "Skip development gems (e.g., web-console)" + class_option :skip_rubocop, type: :boolean, default: nil, + desc: "Skip rubocop-rails-omakase gem" + class_option :dev, type: :boolean, default: nil, desc: "Set up the #{name} with Gemfile pointing to your Rails checkout" @@ -379,6 +382,10 @@ def skip_propshaft? skip_asset_pipeline? || options[:asset_pipeline] != "propshaft" end + def skip_rubocop? + options[:skip_rubocop] + end + class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out) def initialize(name, version, comment, options = {}, commented_out = false) @@ -710,6 +717,12 @@ def run_css end end + def run_rubocop + return if skip_rubocop? || !bundle_install? + + run "rubocop" + end + def add_bundler_platforms if bundle_install? # The vast majority of Rails apps will be deployed on `x86_64-linux`. diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 32e5cf7b577a9..2102689cbd6eb 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -82,6 +82,11 @@ def dockerfiles chmod "bin/docker-entrypoint", 0755 & ~File.umask, verbose: false end + def rubocop + template ".rubocop.yml" + template "rubocop", "bin/rubocop" + end + def version_control if !options[:skip_git] && !options[:pretend] run git_init_command, capture: options[:quiet], abort_on_failure: false @@ -367,6 +372,11 @@ def create_dockerfiles build(:dockerfiles) end + def create_rubocop_file + return if skip_rubocop? + build(:rubocop) + end + def create_config_files build(:config) end @@ -544,6 +554,7 @@ def finish_template public_task :run_javascript public_task :run_hotwire public_task :run_css + public_task :run_rubocop def run_after_bundle_callbacks @after_bundle_callbacks.each(&:call) diff --git a/railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt b/railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt new file mode 100644 index 0000000000000..3bcd272cdf9db --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt @@ -0,0 +1,2 @@ +# Omakase Ruby styling for Rails +inherit_gem: { rubocop-rails-omakase: rubocop.yml } \ No newline at end of file diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt index 4d16d252dc367..8ee7c286fbfb2 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt @@ -47,6 +47,11 @@ group :development do # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] # gem "rack-mini-profiler" +<%- end -%> +<%- unless options.skip_rubocop? -%> + # Omakase Ruby styling for Rails applications [https://github.com/rails/rubocop-rails-omakase/tree/main] + gem "rubocop-rails-omakase", require: false + <%- end -%> # Speed up commands on slow machines / big apps [https://github.com/rails/spring] # gem "spring" diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt index 6d059aa757d74..e0eda6e324428 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt @@ -18,7 +18,7 @@ module <%= app_const_base %> # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w(assets tasks)) + config.autoload_lib(ignore: %w[assets tasks]) # Configuration for the application, engines, and railties goes here. # diff --git a/railties/lib/rails/generators/rails/app/templates/rubocop.tt b/railties/lib/rails/generators/rails/app/templates/rubocop.tt new file mode 100644 index 0000000000000..369a05bedb568 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/rubocop.tt @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rubocop' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rubocop", "rubocop") diff --git a/railties/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt b/railties/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt index d19212abd5ced..d7e6bba8af7ba 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt @@ -1,5 +1,5 @@ require "test_helper" class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - driven_by :selenium, using: :chrome, screen_size: [1400, 1400] + driven_by :selenium, using: :chrome, screen_size: [ 1400, 1400 ] end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 09e01bf4208af..7acbe43335748 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -8,6 +8,7 @@ .gitattributes .gitignore .dockerignore + .rubocop.yml .ruby-version README.md Gemfile @@ -39,6 +40,7 @@ bin/docker-entrypoint bin/rails bin/rake + bin/rubocop bin/setup config/application.rb config/boot.rb @@ -623,6 +625,19 @@ def test_inclusion_of_a_debugger end end + def test_inclusion_of_rubocop + run_generator + assert_gem "rubocop" + end + + def test_rubocop_is_skipped_if_required + run_generator [destination_root, "--skip-rubocop"] + + assert_no_gem "rubocop" + assert_no_file "bin/rubocop" + assert_no_file ".rubocop.yml" + end + def test_usage_read_from_file assert_called(File, :read, returns: "USAGE FROM FILE") do assert_equal "USAGE FROM FILE", Rails::Generators::AppGenerator.desc From 8f81b8c1792b7ef4ee1df842599baf60df2f7c0c Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 08:01:24 +0900 Subject: [PATCH 02/15] Fix rubocop binstub to avoid loading configs from parent directories Based on rubygems/rubygems#6915 This occurs especially when generating a new rails app within a rails checkout: https://github.com/rails/rails/actions/runs/7360317953/job/20036287021#step:4:171 --- .../generators/rails/app/templates/rubocop.tt | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/rubocop.tt b/railties/lib/rails/generators/rails/app/templates/rubocop.tt index 369a05bedb568..96f5acb3b117c 100644 --- a/railties/lib/rails/generators/rails/app/templates/rubocop.tt +++ b/railties/lib/rails/generators/rails/app/templates/rubocop.tt @@ -1,27 +1,12 @@ #!/usr/bin/env ruby # frozen_string_literal: true -# -# This file was generated by Bundler. -# -# The application 'rubocop' is installed as part of a gem, and -# this file is here to facilitate running it. -# - ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - require "rubygems" require "bundler/setup" +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + load Gem.bin_path("rubocop", "rubocop") From 894cdec06921a51966e09bbf3d6421437359e724 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 17:19:01 +0900 Subject: [PATCH 03/15] Move rubocop binstub to bin and make it optional This way we get the permissions and shebang for free. --- railties/lib/rails/generators/rails/app/app_generator.rb | 4 ++-- .../generators/rails/app/templates/{ => bin}/rubocop.tt | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) rename railties/lib/rails/generators/rails/app/templates/{ => bin}/rubocop.tt (67%) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 2102689cbd6eb..9cf3dc437f088 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -84,7 +84,6 @@ def dockerfiles def rubocop template ".rubocop.yml" - template "rubocop", "bin/rubocop" end def version_control @@ -103,7 +102,8 @@ def app end def bin - directory "bin" do |content| + options = skip_rubocop? ? { exclude_pattern: /rubocop/ } : {} + directory "bin", **options do |content| "#{shebang}\n" + content end chmod "bin", 0755 & ~File.umask, verbose: false diff --git a/railties/lib/rails/generators/rails/app/templates/rubocop.tt b/railties/lib/rails/generators/rails/app/templates/bin/rubocop.tt similarity index 67% rename from railties/lib/rails/generators/rails/app/templates/rubocop.tt rename to railties/lib/rails/generators/rails/app/templates/bin/rubocop.tt index 96f5acb3b117c..81f71879712d1 100644 --- a/railties/lib/rails/generators/rails/app/templates/rubocop.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/rubocop.tt @@ -1,8 +1,3 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) - require "rubygems" require "bundler/setup" From a7f56d1a1aabf661abb1f4a07e5e5f47cce6d16a Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 17:30:19 +0900 Subject: [PATCH 04/15] This fixes the issue with recursively searching for .rubocop.yml config Since we were calling the rubocop command before, and not the patched binstub. --- railties/lib/rails/generators/app_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index f9ca0bfa12326..0112deb227e1b 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -720,7 +720,7 @@ def run_css def run_rubocop return if skip_rubocop? || !bundle_install? - run "rubocop" + run "bin/rubocop" end def add_bundler_platforms From 97192777c20946c1596629c46a10b971c1a64e38 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 17:55:03 +0900 Subject: [PATCH 05/15] whoops --- railties/test/generators/app_generator_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 7acbe43335748..ebaeccd7aa75a 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -627,7 +627,7 @@ def test_inclusion_of_a_debugger def test_inclusion_of_rubocop run_generator - assert_gem "rubocop" + assert_gem "rubocop-rails-omakase" end def test_rubocop_is_skipped_if_required From 40f2c4eadc75406c52d23c84210ceb29b3258ef6 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 18:25:44 +0900 Subject: [PATCH 06/15] Try to skip running rubocop if app:update --- railties/lib/rails/generators/app_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 0112deb227e1b..abf9da032c965 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -718,7 +718,7 @@ def run_css end def run_rubocop - return if skip_rubocop? || !bundle_install? + return if skip_rubocop? || !bundle_install? || options[:update] run "bin/rubocop" end From c3c4fcd7115b7acc09b245eca34b17d814baad42 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 30 Dec 2023 19:12:31 +0900 Subject: [PATCH 07/15] debug --- railties/lib/rails/generators/app_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index abf9da032c965..040038e06be37 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -718,7 +718,7 @@ def run_css end def run_rubocop - return if skip_rubocop? || !bundle_install? || options[:update] + return if skip_rubocop? run "bin/rubocop" end From 488976efacd74c2b6c37e8d6c5d61338844227e2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 17:08:03 +0100 Subject: [PATCH 08/15] Follow style of other dot template files --- railties/lib/rails/generators/rails/app/app_generator.rb | 2 +- .../rails/app/templates/{.rubocop.yml.tt => rubocop.yml.tt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename railties/lib/rails/generators/rails/app/templates/{.rubocop.yml.tt => rubocop.yml.tt} (100%) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 9cf3dc437f088..b2b4e1dd1286c 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -83,7 +83,7 @@ def dockerfiles end def rubocop - template ".rubocop.yml" + template "rubocop.yml", ".rubocop.yml" end def version_control diff --git a/railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt b/railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt similarity index 100% rename from railties/lib/rails/generators/rails/app/templates/.rubocop.yml.tt rename to railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt From cb538032404c4becc17259d1f4e67f7493315793 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 20:32:17 +0100 Subject: [PATCH 09/15] Suggest example for house style --- .../rails/generators/rails/app/templates/rubocop.yml.tt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt b/railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt index 3bcd272cdf9db..f9d86d4a54802 100644 --- a/railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt +++ b/railties/lib/rails/generators/rails/app/templates/rubocop.yml.tt @@ -1,2 +1,8 @@ # Omakase Ruby styling for Rails -inherit_gem: { rubocop-rails-omakase: rubocop.yml } \ No newline at end of file +inherit_gem: { rubocop-rails-omakase: rubocop.yml } + +# Overwrite or add rules to create your own house style +# +# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` +# Layout/SpaceInsideArrayLiteralBrackets: +# Enabled: false From 6da2356ba25962063308310210b310c4bf5280b5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 20:33:15 +0100 Subject: [PATCH 10/15] Fix comment --- railties/lib/rails/generators/rails/app/templates/Gemfile.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt index 8ee7c286fbfb2..1a603fd9226a8 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt @@ -49,7 +49,7 @@ group :development do <%- end -%> <%- unless options.skip_rubocop? -%> - # Omakase Ruby styling for Rails applications [https://github.com/rails/rubocop-rails-omakase/tree/main] + # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] gem "rubocop-rails-omakase", require: false <%- end -%> From d59777af3cbc16a16cea3a3714d9a02e22431aa0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 20:36:15 +0100 Subject: [PATCH 11/15] We don't need to run it as part of setup --- railties/lib/rails/generators/app_base.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 040038e06be37..beafd28f86c45 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -717,12 +717,6 @@ def run_css end end - def run_rubocop - return if skip_rubocop? - - run "bin/rubocop" - end - def add_bundler_platforms if bundle_install? # The vast majority of Rails apps will be deployed on `x86_64-linux`. From f840b5ec3831a07b06cce454ee6cd3dcf798f090 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 20:37:30 +0100 Subject: [PATCH 12/15] Better description --- railties/lib/rails/generators/app_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index beafd28f86c45..e4e14406d6fe1 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -101,7 +101,7 @@ def self.add_shared_options_for(name) desc: "Skip development gems (e.g., web-console)" class_option :skip_rubocop, type: :boolean, default: nil, - desc: "Skip rubocop-rails-omakase gem" + desc: "Skip RuboCop setup" class_option :dev, type: :boolean, default: nil, desc: "Set up the #{name} with Gemfile pointing to your Rails checkout" From 6c25342bcc87a0b0239ede97cf2ad4c3ede91429 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 20:38:15 +0100 Subject: [PATCH 13/15] Not needed --- railties/lib/rails/generators/rails/app/app_generator.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index b2b4e1dd1286c..977a7e8d5db0a 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -554,7 +554,6 @@ def finish_template public_task :run_javascript public_task :run_hotwire public_task :run_css - public_task :run_rubocop def run_after_bundle_callbacks @after_bundle_callbacks.each(&:call) From 0f0687155196678a1bd25b0a1e084d35bc737145 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 21:00:47 +0100 Subject: [PATCH 14/15] List first, so it's not mixed in under an uncommented item --- .../rails/generators/rails/app/templates/Gemfile.tt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt index 1a603fd9226a8..fe5bc553c5519 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt @@ -40,6 +40,11 @@ end <% end -%> group :development do +<%- unless options.skip_rubocop? -%> + # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] + gem "rubocop-rails-omakase", require: false + +<%- end -%> <%- unless options.api? || options.skip_dev_gems? -%> # Use console on exceptions pages [https://github.com/rails/web-console] gem "web-console" @@ -47,11 +52,6 @@ group :development do # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] # gem "rack-mini-profiler" -<%- end -%> -<%- unless options.skip_rubocop? -%> - # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] - gem "rubocop-rails-omakase", require: false - <%- end -%> # Speed up commands on slow machines / big apps [https://github.com/rails/spring] # gem "spring" From 239611b0bad864bd4efc157debd67146c8af7092 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 30 Dec 2023 21:04:35 +0100 Subject: [PATCH 15/15] Add changelog entry --- railties/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 33456fe4f5082..2fcd6359a65d1 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Add RuboCop with rules from rubocop-rails-omakase by default. Skip with --skip-rubocop. + + *DHH* and *zzak* + * Use `bin/rails runner --skip-executor` option to not wrap the runner script with an Executor.