From c236ff686c6fa987924b8eefeec93c2abcc07843 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 31 Aug 2021 22:57:34 +0200 Subject: [PATCH] No need to have special accomodations for a github version in dev/edge/main (#43139) --- .../generators/rails/app/templates/Gemfile.tt | 5 +--- .../test/generators/app_generator_test.rb | 27 ------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt index ae935d8739b..223b7ff97c8 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt @@ -54,11 +54,8 @@ end group :development do <%- unless options.api? || options.skip_dev_gems? -%> # Access an interactive console on exception pages or by calling "console" anywhere in the code. - <%- if options.dev? || options.edge? || options.main? -%> - gem "web-console", github: "rails/web-console" - <%- else -%> gem "web-console", ">= 4.1.0" - <%- end -%> + # Display speed badge on every html page with SQL times and flame graphs. # Note: Interferes with etag cache testing. Can be configured to work on production: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md # gem "rack-mini-profiler", "~> 2.0" diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index ab1436156de..9987add54aa 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -688,33 +688,6 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_gem "web-console" end - def test_web_console_with_dev_option - run_generator [destination_root, "--dev", "--skip-bundle"] - - assert_file "Gemfile" do |content| - assert_match(/gem "web-console",\s+github: "rails\/web-console"/, content) - assert_no_match(/\Agem "web-console", ">= 4\.1\.0"\z/, content) - end - end - - def test_web_console_with_edge_option - run_generator [destination_root, "--edge"] - - assert_file "Gemfile" do |content| - assert_match(/gem "web-console",\s+github: "rails\/web-console"/, content) - assert_no_match(/\Agem "web-console", ">= 4\.1\.0"\z/, content) - end - end - - def test_web_console_with_main_option - run_generator [destination_root, "--main"] - - assert_file "Gemfile" do |content| - assert_match(/gem "web-console",\s+github: "rails\/web-console"/, content) - assert_no_match(/\Agem "web-console", ">= 4\.1\.0"\z/, content) - end - end - def test_generation_runs_bundle_install generator([destination_root]) run_generator_instance