From 1f15402a942f9c829b95008bcf82240f17b24ccf Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Sat, 21 Nov 2026 21:38:22 -0500 Subject: [PATCH] Promote Rails 8.1 to current, dual-boot with Rails main - Gemfile: 8.1 current, rails/rails main next (8.2.0.alpha) - rspec-rails from GitHub main on the next side (7.1.1 raises a FrozenError in view specs on Rails main) - Collapse the 8.1 NextRails.next? branches (next side wins) - CI: the Gemfile.next job no longer blocks the build Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/main.yml | 2 + Gemfile | 10 +- Gemfile.lock | 114 ++++++++++++----------- Gemfile.next.lock | 185 +++++++++++++++++++++---------------- config/application.rb | 6 -- config/database.yml | 4 - 6 files changed, 171 insertions(+), 150 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6c89a5..a625b9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,8 @@ jobs: test: name: Test (${{ matrix.gemfile }}) runs-on: ubuntu-latest + # Rails main moves daily, so a red Gemfile.next job is a heads up, not a blocker + continue-on-error: ${{ matrix.gemfile == 'Gemfile.next' }} strategy: fail-fast: false matrix: diff --git a/Gemfile b/Gemfile index c5671dd..ac2f88a 100644 --- a/Gemfile +++ b/Gemfile @@ -11,9 +11,9 @@ gem "next_rails" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" if next? - gem "rails", "~> 8.1.0" + gem "rails", github: "rails/rails", branch: "main" else - gem "rails", "~> 8.0.0" + gem "rails", "~> 8.1.0" end # Application Dependencies @@ -79,7 +79,11 @@ group :test do gem "capybara", ">= 2.15" gem "selenium-webdriver" gem "webdrivers" - gem "rspec-rails" + if next? + gem "rspec-rails", github: "rspec/rspec-rails", branch: "main" + else + gem "rspec-rails" + end end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 36b12d9..df0b939 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,31 @@ GEM remote: https://rubygems.org/ specs: - actioncable (8.0.5.2) - actionpack (= 8.0.5.2) - activesupport (= 8.0.5.2) + action_text-trix (2.1.19) + railties + actioncable (8.1.4.1) + actionpack (= 8.1.4.1) + activesupport (= 8.1.4.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.5.2) - actionpack (= 8.0.5.2) - activejob (= 8.0.5.2) - activerecord (= 8.0.5.2) - activestorage (= 8.0.5.2) - activesupport (= 8.0.5.2) + actionmailbox (8.1.4.1) + actionpack (= 8.1.4.1) + activejob (= 8.1.4.1) + activerecord (= 8.1.4.1) + activestorage (= 8.1.4.1) + activesupport (= 8.1.4.1) mail (>= 2.8.0) - actionmailer (8.0.5.2) - actionpack (= 8.0.5.2) - actionview (= 8.0.5.2) - activejob (= 8.0.5.2) - activesupport (= 8.0.5.2) + actionmailer (8.1.4.1) + actionpack (= 8.1.4.1) + actionview (= 8.1.4.1) + activejob (= 8.1.4.1) + activesupport (= 8.1.4.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.5.2) - actionview (= 8.0.5.2) - activesupport (= 8.0.5.2) + actionpack (8.1.4.1) + actionview (= 8.1.4.1) + activesupport (= 8.1.4.1) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -31,42 +33,43 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.5.2) - actionpack (= 8.0.5.2) - activerecord (= 8.0.5.2) - activestorage (= 8.0.5.2) - activesupport (= 8.0.5.2) + actiontext (8.1.4.1) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.4.1) + activerecord (= 8.1.4.1) + activestorage (= 8.1.4.1) + activesupport (= 8.1.4.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.5.2) - activesupport (= 8.0.5.2) + actionview (8.1.4.1) + activesupport (= 8.1.4.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6, >= 1.7.2) - activejob (8.0.5.2) - activesupport (= 8.0.5.2) + activejob (8.1.4.1) + activesupport (= 8.1.4.1) globalid (>= 0.3.6) - activemodel (8.0.5.2) - activesupport (= 8.0.5.2) - activerecord (8.0.5.2) - activemodel (= 8.0.5.2) - activesupport (= 8.0.5.2) + activemodel (8.1.4.1) + activesupport (= 8.1.4.1) + activerecord (8.1.4.1) + activemodel (= 8.1.4.1) + activesupport (= 8.1.4.1) timeout (>= 0.4.0) - activestorage (8.0.5.2) - actionpack (= 8.0.5.2) - activejob (= 8.0.5.2) - activerecord (= 8.0.5.2) - activesupport (= 8.0.5.2) + activestorage (8.1.4.1) + actionpack (= 8.1.4.1) + activejob (= 8.1.4.1) + activerecord (= 8.1.4.1) + activesupport (= 8.1.4.1) marcel (~> 1.0) - activesupport (8.0.5.2) + activesupport (8.1.4.1) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) @@ -81,7 +84,6 @@ GEM version_gem (~> 1.1, >= 1.1.16) base64 (0.3.0) bcrypt (3.1.22) - benchmark (0.5.0) bigdecimal (4.1.3) bindex (0.8.1) bootsnap (1.13.0) @@ -329,20 +331,20 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (8.0.5.2) - actioncable (= 8.0.5.2) - actionmailbox (= 8.0.5.2) - actionmailer (= 8.0.5.2) - actionpack (= 8.0.5.2) - actiontext (= 8.0.5.2) - actionview (= 8.0.5.2) - activejob (= 8.0.5.2) - activemodel (= 8.0.5.2) - activerecord (= 8.0.5.2) - activestorage (= 8.0.5.2) - activesupport (= 8.0.5.2) + rails (8.1.4.1) + actioncable (= 8.1.4.1) + actionmailbox (= 8.1.4.1) + actionmailer (= 8.1.4.1) + actionpack (= 8.1.4.1) + actiontext (= 8.1.4.1) + actionview (= 8.1.4.1) + activejob (= 8.1.4.1) + activemodel (= 8.1.4.1) + activerecord (= 8.1.4.1) + activestorage (= 8.1.4.1) + activesupport (= 8.1.4.1) bundler (>= 1.15.0) - railties (= 8.0.5.2) + railties (= 8.1.4.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -354,9 +356,9 @@ GEM rails-html-sanitizer (1.7.2) loofah (~> 2.25, >= 2.25.3) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.0.5.2) - actionpack (= 8.0.5.2) - activesupport (= 8.0.5.2) + railties (8.1.4.1) + actionpack (= 8.1.4.1) + activesupport (= 8.1.4.1) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -532,7 +534,7 @@ DEPENDENCIES pg (~> 1.1) propshaft puma (~> 8.1) - rails (~> 8.0.0) + rails (~> 8.1.0) rails-controller-testing reek rspec-rails diff --git a/Gemfile.next.lock b/Gemfile.next.lock index df0b939..36eb299 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1,68 +1,68 @@ -GEM - remote: https://rubygems.org/ +GIT + remote: https://github.com/rails/rails.git + revision: 6ef561e024725a2a49284e3e5bcc124d52c0b5ba + branch: main specs: - action_text-trix (2.1.19) - railties - actioncable (8.1.4.1) - actionpack (= 8.1.4.1) - activesupport (= 8.1.4.1) + actioncable (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.1.4.1) - actionpack (= 8.1.4.1) - activejob (= 8.1.4.1) - activerecord (= 8.1.4.1) - activestorage (= 8.1.4.1) - activesupport (= 8.1.4.1) + actionmailbox (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) mail (>= 2.8.0) - actionmailer (8.1.4.1) - actionpack (= 8.1.4.1) - actionview (= 8.1.4.1) - activejob (= 8.1.4.1) - activesupport (= 8.1.4.1) + actionmailer (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + actionview (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.1.4.1) - actionview (= 8.1.4.1) - activesupport (= 8.1.4.1) + actionpack (8.2.0.alpha) + actionview (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) + rails-html-sanitizer (~> 1.7) useragent (~> 0.16) - actiontext (8.1.4.1) - action_text-trix (~> 2.1.15) - actionpack (= 8.1.4.1) - activerecord (= 8.1.4.1) - activestorage (= 8.1.4.1) - activesupport (= 8.1.4.1) + actiontext (8.2.0.alpha) + action_text-trix (~> 2.1.16) + actionpack (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.1.4.1) - activesupport (= 8.1.4.1) + actionview (8.2.0.alpha) + activesupport (= 8.2.0.alpha) builder (~> 3.1) erubi (~> 1.11) + herb (>= 0.10) rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6, >= 1.7.2) - activejob (8.1.4.1) - activesupport (= 8.1.4.1) - globalid (>= 0.3.6) - activemodel (8.1.4.1) - activesupport (= 8.1.4.1) - activerecord (8.1.4.1) - activemodel (= 8.1.4.1) - activesupport (= 8.1.4.1) + rails-html-sanitizer (~> 1.7, >= 1.7.2) + activejob (8.2.0.alpha) + activesupport (= 8.2.0.alpha) + globalid (>= 1.4.0) + activemodel (8.2.0.alpha) + activesupport (= 8.2.0.alpha) + activerecord (8.2.0.alpha) + activemodel (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) timeout (>= 0.4.0) - activestorage (8.1.4.1) - actionpack (= 8.1.4.1) - activejob (= 8.1.4.1) - activerecord (= 8.1.4.1) - activesupport (= 8.1.4.1) - marcel (~> 1.0) - activesupport (8.1.4.1) + activestorage (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + marcel (~> 2.0) + activesupport (8.2.0.alpha) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -72,9 +72,54 @@ GEM json logger (>= 1.4.2) minitest (>= 5.1) + psych (>= 4) + ractor-dispatch (>= 0.3.0) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) + rails (8.2.0.alpha) + actioncable (= 8.2.0.alpha) + actionmailbox (= 8.2.0.alpha) + actionmailer (= 8.2.0.alpha) + actionpack (= 8.2.0.alpha) + actiontext (= 8.2.0.alpha) + actionview (= 8.2.0.alpha) + activejob (= 8.2.0.alpha) + activemodel (= 8.2.0.alpha) + activerecord (= 8.2.0.alpha) + activestorage (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + bundler (>= 1.15.0) + railties (= 8.2.0.alpha) + railties (8.2.0.alpha) + actionpack (= 8.2.0.alpha) + activesupport (= 8.2.0.alpha) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + +GIT + remote: https://github.com/rspec/rspec-rails.git + revision: de70f90735dcd1f64687cd0c1ffa76f01e52fa66 + branch: main + specs: + rspec-rails (8.2.0.pre) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) + rspec-core (>= 3.13.0, < 5.0.0) + rspec-expectations (>= 3.13.0, < 5.0.0) + rspec-mocks (>= 3.13.0, < 5.0.0) + rspec-support (>= 3.13.0, < 5.0.0) + +GEM + remote: https://rubygems.org/ + specs: + action_text-trix (2.1.19) + railties addressable (2.8.1) public_suffix (>= 2.0.2, < 6.0) anonymous_loader (0.1.5) @@ -166,6 +211,10 @@ GEM rspec (>= 2.99.0, < 4.0) hashie (5.2.0) logger + herb (0.11.2-aarch64-linux-gnu) + herb (0.11.2-arm64-darwin) + herb (0.11.2-x86_64-darwin) + herb (0.11.2-x86_64-linux-gnu) http-cookie (1.0.5) domain_name (~> 0.5) httparty (0.20.0) @@ -182,7 +231,7 @@ GEM reline (>= 0.4.2) jsbundling-rails (1.0.3) railties (>= 6.0.0) - json (2.6.2) + json (2.21.2) jwt (3.3.0) base64 kwalify (0.7.2) @@ -200,7 +249,7 @@ GEM net-imap net-pop net-smtp - marcel (1.2.1) + marcel (2.1.0) matrix (0.4.2) mechanize (2.8.5) addressable (~> 2.8) @@ -316,6 +365,9 @@ GEM pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) + psych (5.5.0) + date + stringio public_suffix (5.0.0) puma (8.1.2) nio4r (~> 2.0) @@ -331,20 +383,7 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (8.1.4.1) - actioncable (= 8.1.4.1) - actionmailbox (= 8.1.4.1) - actionmailer (= 8.1.4.1) - actionpack (= 8.1.4.1) - actiontext (= 8.1.4.1) - actionview (= 8.1.4.1) - activejob (= 8.1.4.1) - activemodel (= 8.1.4.1) - activerecord (= 8.1.4.1) - activestorage (= 8.1.4.1) - activesupport (= 8.1.4.1) - bundler (>= 1.15.0) - railties (= 8.1.4.1) + ractor-dispatch (0.3.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -356,15 +395,6 @@ GEM rails-html-sanitizer (1.7.2) loofah (~> 2.25, >= 2.25.3) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.4.1) - actionpack (= 8.1.4.1) - activesupport (= 8.1.4.1) - irb (~> 1.13) - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) - zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.4.2) rb-fsevent (0.11.2) @@ -404,14 +434,6 @@ GEM rspec-mocks (3.13.9) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.1.1) - actionpack (>= 7.0) - activesupport (>= 7.0) - railties (>= 7.0) - rspec-core (~> 3.13) - rspec-expectations (~> 3.13) - rspec-mocks (~> 3.13) - rspec-support (~> 3.13) rspec-support (3.13.8) rubocop (1.35.1) json (~> 2.3) @@ -461,6 +483,7 @@ GEM rubocop-performance (= 1.14.3) stimulus-rails (1.1.0) railties (>= 6.0.0) + stringio (3.2.0) tailwindcss-rails (2.0.16-aarch64-linux) railties (>= 6.0.0) tailwindcss-rails (2.0.16-arm64-darwin) @@ -534,10 +557,10 @@ DEPENDENCIES pg (~> 1.1) propshaft puma (~> 8.1) - rails (~> 8.1.0) + rails! rails-controller-testing reek - rspec-rails + rspec-rails! rubocop-rails rubocop-rspec selenium-webdriver diff --git a/config/application.rb b/config/application.rb index 5b53087..2e31b7d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,12 +23,6 @@ class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 - # Rails 8.0 deprecates `true`; `:zone` keeps the 7.0 default's intent. - # Rails 8.1 deprecates the setting itself. - unless NextRails.next? - config.active_support.to_time_preserves_timezone = :zone - end - # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files diff --git a/config/database.yml b/config/database.yml index 4c32125..901fb52 100644 --- a/config/database.yml +++ b/config/database.yml @@ -19,11 +19,7 @@ default: &default encoding: unicode # For details on connection pooling, see Rails configuration guide # https://guides.rubyonrails.org/configuring.html#database-pooling - <% if NextRails.next? %> max_connections: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - <% else %> - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - <% end %> port: <%= ENV.fetch("POSTGRES_PORT", 5432 )%> host: <%= ENV.fetch("POSTGRES_HOST", "localhost") %> username: postgres