Repository navigation
Support Ruby 3.2–4.0 and Rails 6.1–8.1 - #56
Merged
Merged
Conversation
- Switch from git source to released gem refinerycms 4.1.0 - Add mutex_m, base64, bigdecimal, observer for Ruby 3.4 stdlib extractions - Fix File.exists? -> File.exist? (removed in Ruby 3.2) - Add require 'logger' to Rakefile for Ruby 3.4
- Cover Rails 6.1 (legacy, Ruby 3.2–3.3) and 7.2–8.1 (modern, Ruby 3.2–4.0) in one matrix with excludes, mirroring refinery/refinerycms - Gemfile uses refinerycms git main for Rails 7.2+ and 4.1.0 for Rails 6.1 - Add sqlite3 to modern matrix; exclude it for Rails 6.1 (version conflict) - Exclude Ruby 3.4/4.0 with Rails 6.1 (not compatible) - mutex_m needed for Ruby 3.4 with Rails 6/7 (extracted from stdlib) - actions/checkout@v6, drop max-parallel cap
rspec-core 3.13 applies config.extend before config.include, so including Devise::Test::ControllerHelpers from ControllerMacros.extended ran before rspec-rails had added `setup` to the example group.
UsersController has no show action. Rails 7.1+ raises on callbacks whose :only lists a missing action (raise_on_missing_callback_actions), which broke every admin users request in development and test.
json 3 rejects the quirks_mode option that Rails 6.1 passes to JSON.generate, which broke every request in the 6.1 feature specs.
Points Rails 7.2+ at refinery/refinerycms#3540 (b2d9fed) so the password reset specs prove the fix. Return to branch: "main" once it merges.
ActiveSupport up to 8.0 passes quirks_mode to JSON.generate, which json 3 rejects.
The released 4.1.0 renders validation errors without the attribute name, which breaks the password reset specs. Core main supports Rails 6.1+, so use it everywhere.
parndt
added a commit
to refinery/refinerycms
that referenced
this pull request
Nov 9, 2026
When #3518 moved to the Rails 7 errors API, both branches of `refinery/admin/_error_messages` started rendering `error.message`. The `include_object_name` branch used to render `full_messages`, so forms now show "can't be blank" instead of "Title can't be blank". 4.1.0 shipped with this. `include_object_name: true` is used by `crudify`, the pages and images admin, and the engine generator's `_form` template. The generator's spec template expects `"Title can't be blank"`, so newly generated extensions fail their own feature specs. It also breaks two password-reset specs in refinerycms-authentication-devise (refinery/refinerycms-authentication-devise#56). ## Change - Render `error.full_message` in the `include_object_name` branch - Add a pages admin system spec that saves a page with a blank title and expects "Title can't be blank". It fails without the change.
refinerycms resolves decorators 2.1, which supports Rails 7.2+.
The RubyGems trusted publisher is scoped to it, and the environment only allows v* tags to deploy.
Pushing a v* tag builds the gem with `gem build` and publishes it to RubyGems.org through trusted publishing, so no API key is stored.
Released decorators caps railties below 7.2, so the modern Rails matrix cannot resolve. refinerycms main uses the same branch.
parndt
force-pushed
the
rails-8-compat
branch
from
November 10, 2026 02:37
934fde2 to
d70103e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings the extension up to date with refinerycms
mainand gets the CI matrix green across Ruby 3.2–4.0 and Rails 6.1, 7.2, 8.0 and 8.1, on sqlite, MySQL and Postgres.The Gemfile now tracks refinerycms
mainrather thanmaster, and takes the Rails version fromRAILS_VERSION. On Rails 8.0 and earlier,jsonstays below 3, because ActiveSupport still passesquirks_modetoJSON.generateand json 3 rejects it. For Ruby 3.4, older Rails getsmutex_mback, and the Rakefile requiresloggerand usesFile.exist?.Two fixes were needed for newer Rails and rspec. The admin
UsersControllerhas noshowaction, butcrudifyregistered a find callback for it, which Rails 7.1+ refuses; passingexclude_from_find: :showsorts that out. In the specs, rspec-core 3.13 appliesconfig.extendbeforeconfig.include, so includingDevise::Test::ControllerHelpersfromControllerMacros.extendedran before rspec-rails had definedsetup. It's now included throughconfig.includeinstead.The password-reset specs were also failing because core's
_error_messagespartial dropped the attribute name, showing "is invalid" rather than "Reset password token is invalid". That was fixed in refinery/refinerycms#3540, which has now merged.Finally, there's a trusted-publishing release workflow, so pushing a
v*tag builds the gem and publishes it to RubyGems.org. It runs in thereleaseenvironment, which onlyv*tags can deploy to.Closes #51