diff options
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 2 | ||||
-rw-r--r-- | activesupport/test/core_ext/regexp_ext_test.rb | 24 | ||||
-rw-r--r-- | guides/source/routing.md | 10 | ||||
-rw-r--r-- | railties/lib/rails/app_updater.rb | 1 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 13 |
5 files changed, 19 insertions, 31 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index ffc3d42592..39cdecb9e4 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true -require "concurrent/map" require "action_view/dependency_tracker" -require "monitor" module ActionView class Digestor diff --git a/activesupport/test/core_ext/regexp_ext_test.rb b/activesupport/test/core_ext/regexp_ext_test.rb index 5737bdafda..7d18297b64 100644 --- a/activesupport/test/core_ext/regexp_ext_test.rb +++ b/activesupport/test/core_ext/regexp_ext_test.rb @@ -9,28 +9,4 @@ class RegexpExtAccessTests < ActiveSupport::TestCase assert_equal false, //.multiline? assert_equal false, /(?m:)/.multiline? end - - # Based on https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb. - def test_match_p - /back(...)/ =~ "backref" - # must match here, but not in a separate method, e.g., assert_send, - # to check if $~ is affected or not. - assert_equal false, //.match?(nil) - assert_equal true, //.match?("") - assert_equal true, /.../.match?(:abc) - assert_raise(TypeError) { /.../.match?(Object.new) } - assert_equal true, /b/.match?("abc") - assert_equal true, /b/.match?("abc", 1) - assert_equal true, /../.match?("abc", 1) - assert_equal true, /../.match?("abc", -2) - assert_equal false, /../.match?("abc", -4) - assert_equal false, /../.match?("abc", 4) - assert_equal true, /\z/.match?("") - assert_equal true, /\z/.match?("abc") - assert_equal true, /R.../.match?("Ruby") - assert_equal false, /R.../.match?("Ruby", 1) - assert_equal false, /P.../.match?("Ruby") - assert_equal "backref", $& - assert_equal "ref", $1 - end end diff --git a/guides/source/routing.md b/guides/source/routing.md index 7a83fee617..9fd8f6e963 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -1139,10 +1139,10 @@ resources :videos, param: :identifier ``` ``` - videos GET /videos(.:format) videos#index - POST /videos(.:format) videos#create - new_videos GET /videos/new(.:format) videos#new -edit_videos GET /videos/:identifier/edit(.:format) videos#edit + videos GET /videos(.:format) videos#index + POST /videos(.:format) videos#create + new_video GET /videos/new(.:format) videos#new +edit_video GET /videos/:identifier/edit(.:format) videos#edit ``` ```ruby @@ -1160,7 +1160,7 @@ class Video < ApplicationRecord end video = Video.find_by(identifier: "Roman-Holiday") -edit_videos_path(video) # => "/videos/Roman-Holiday" +edit_video_path(video) # => "/videos/Roman-Holiday/edit" ``` Inspecting and Testing Routes diff --git a/railties/lib/rails/app_updater.rb b/railties/lib/rails/app_updater.rb index a076d082d5..5e2ea93c5e 100644 --- a/railties/lib/rails/app_updater.rb +++ b/railties/lib/rails/app_updater.rb @@ -27,6 +27,7 @@ module Rails options[:skip_action_cable] = !defined?(ActionCable::Engine) options[:skip_sprockets] = !defined?(Sprockets::Railtie) options[:skip_puma] = !defined?(Puma) + options[:skip_bootsnap] = !defined?(Bootsnap) options end end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 938d545219..bcfbcdfd80 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -323,6 +323,19 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_app_update_does_not_generate_bootsnap_contents_when_skip_bootsnap_is_given + app_root = File.join(destination_root, "myapp") + run_generator [app_root, "--skip-bootsnap"] + + FileUtils.cd(app_root) do + quietly { system("bin/rails app:update") } + end + + assert_file "#{app_root}/config/boot.rb" do |content| + assert_no_match(/require 'bootsnap\/setup'/, content) + end + end + def test_gem_for_active_storage run_generator assert_file "Gemfile", /^# gem 'image_processing'/ |