No need to have special accomodations for a github version in dev/edge/main (#43139)

This commit is contained in:
David Heinemeier Hansson 2021-08-31 22:57:34 +02:00 committed by GitHub
parent b4ccee7a8a
commit c236ff686c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 31 deletions

View File

@ -54,11 +54,8 @@ end
group :development do group :development do
<%- unless options.api? || options.skip_dev_gems? -%> <%- unless options.api? || options.skip_dev_gems? -%>
# Access an interactive console on exception pages or by calling "console" anywhere in the code. # 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" gem "web-console", ">= 4.1.0"
<%- end -%>
# Display speed badge on every html page with SQL times and flame graphs. # 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 # 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" # gem "rack-mini-profiler", "~> 2.0"

View File

@ -688,33 +688,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_gem "web-console" assert_gem "web-console"
end 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 def test_generation_runs_bundle_install
generator([destination_root]) generator([destination_root])
run_generator_instance run_generator_instance