diff --git a/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0-test.patch b/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..393556f8a2dcf55122784df33866ab1634951622 --- /dev/null +++ b/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0-test.patch @@ -0,0 +1,47 @@ +From 545a9908e8f661aa391b5c8e418a5204b1eba7f7 Mon Sep 17 00:00:00 2001 +From: Jonathan Hefner +Date: Sun, 16 Oct 2022 14:13:46 -0500 +Subject: [PATCH] Bump Puma to v6.0.0 + +The `Gemfile` was updated in #46106 to allow Puma 6. Puma v6.0.0 was +released on 2022-10-14. This commit updates `Gemfile.lock` to reflect +the new version. + +This commit also updates the Puma version constraint used in generated +apps to allow Puma 6. +--- + railties/test/generators/app_generator_test.rb | 2 +- + railties/test/generators/shared_generator_tests.rb | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb +index d45bfbc718294..5cb78c450fc88 100644 +--- a/railties/test/generators/app_generator_test.rb ++++ b/railties/test/generators/app_generator_test.rb +@@ -608,7 +608,7 @@ def test_config_jdbc_database_when_no_option_given + + def test_generator_defaults_to_puma_version + run_generator [destination_root] +- assert_gem "puma", '"~> 5.0"' ++ assert_gem "puma", /"\W+ \d/ + end + + def test_action_cable_redis_gems +diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb +index bb75c93381841..a09ec4307b1d7 100644 +--- a/railties/test/generators/shared_generator_tests.rb ++++ b/railties/test/generators/shared_generator_tests.rb +@@ -389,7 +389,12 @@ def assert_not_option(option) + end + + def assert_gem(name, constraint = nil) +- constraint_pattern = /, #{Regexp.escape constraint}/ if constraint ++ constraint_pattern = ++ if constraint.is_a?(String) ++ /, #{Regexp.escape constraint}/ ++ elsif constraint ++ /, #{constraint}/ ++ end + assert_file "Gemfile", %r/^\s*gem ["']#{name}["']#{constraint_pattern}/ + end + diff --git a/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0.patch b/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0.patch new file mode 100644 index 0000000000000000000000000000000000000000..d9585e8cbbced70846f7781e40c43ee1e986ba10 --- /dev/null +++ b/rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0.patch @@ -0,0 +1,28 @@ +From 545a9908e8f661aa391b5c8e418a5204b1eba7f7 Mon Sep 17 00:00:00 2001 +From: Jonathan Hefner +Date: Sun, 16 Oct 2022 14:13:46 -0500 +Subject: [PATCH] Bump Puma to v6.0.0 + +The `Gemfile` was updated in #46106 to allow Puma 6. Puma v6.0.0 was +released on 2022-10-14. This commit updates `Gemfile.lock` to reflect +the new version. + +This commit also updates the Puma version constraint used in generated +apps to allow Puma 6. +--- + 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 8e4e9d483d50c..4044c58c02fb7 100644 +--- a/railties/lib/rails/generators/app_base.rb ++++ b/railties/lib/rails/generators/app_base.rb +@@ -169,7 +169,7 @@ def database_gemfile_entry # :doc: + end + + def web_server_gemfile_entry # :doc: +- GemfileEntry.new "puma", "~> 5.0", "Use the Puma web server [https://github.com/puma/puma]" ++ GemfileEntry.new "puma", ">= 5.0", "Use the Puma web server [https://github.com/puma/puma]" + end + + def asset_pipeline_gemfile_entry diff --git a/rubygem-railties.spec b/rubygem-railties.spec index 7a536e2b97f7ea8942aaf3be0453b72ab50761de..d883d6269d272ad26ed5236dde8ef7776c89fe57 100644 --- a/rubygem-railties.spec +++ b/rubygem-railties.spec @@ -4,7 +4,7 @@ Name: rubygem-%{gem_name} Version: 7.0.7 -Release: 3 +Release: 4 Summary: Tools for creating, working with, and running Rails applications License: MIT URL: http://rubyonrails.org @@ -24,6 +24,8 @@ Patch1: rubygem-railties-7.0.2.3-Remove-the-multi-call-form-of-asse Patch2: CVE-2023-38037.patch # https://github.com/rails/rails/pull/50724 Patch3: rubygem-railties-7.1.4-Fix-failing-test-due-to-the-relative-path-output-of-minitest.patch +Patch4: rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0.patch +Patch5: rubygem-railties-7.1.0-Bump-Puma-to-v6-0-0-test.patch Recommends: ruby(irb) Suggests: %{_bindir}/sqlite3 @@ -59,10 +61,12 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b1 -b2 %patch 2 -p2 +%patch 4 -p2 pushd %{_builddir} %patch 1 -p2 %patch 3 -p2 +%patch 5 -p2 popd %build gem build ../%{gem_name}-%{version}.gemspec @@ -213,6 +217,9 @@ popd %doc %{gem_instdir}/README.rdoc %changelog +* Wed Jul 23 2025 yaoxin <1024769339@qq.com> - 7.0.7-4 +- Relax Rails generators to support Puma 6+ + * Thu Feb 27 2025 jiangxinyu - 7.0.7-3 - Fix FTBFS due to Minitest 5.21.0+ incompatibility