Skip to content

CI: Add Ruby 4.0 to CI Matrix#1547

Open
unochin wants to merge 1 commit intopaper-trail-gem:masterfrom
unochin:ci-ruby-4.0
Open

CI: Add Ruby 4.0 to CI Matrix#1547
unochin wants to merge 1 commit intopaper-trail-gem:masterfrom
unochin:ci-ruby-4.0

Conversation

@unochin
Copy link
Copy Markdown

@unochin unochin commented Feb 5, 2026

This Pull Request adds Ruby 4.0 to the CI matrix.

It also includes the following changes:

  • Relax the sqlite3 development dependency to avoid Gemfile/gemspec conflict
  • Bump actions/checkout from 4 to 6
  • Document PaperTrail 17 compatibility in README
  • Fix RuboCop Layout/HeredocIndentation offenses

Background for sqlite3 dependency change

When running bundle exec appraisal install on Ruby 4.0, Bundler fails with the following error due to conflicting sqlite3 version constraints declared in the gemspec and the Appraisal Gemfiles:

[!] There was an error parsing `rails_8.0.gemfile`: The sqlite3 dependency has conflicting requirements in Gemfile (>= 2.1) and gemspec (~> 1.4). Bundler cannot continue.

 #  from /path/to/paper_trail/gemfiles/rails_8.0.gemfile:8
 #  -------------------------------------------
 #  
 >  gemspec path: "../"
 #  -------------------------------------------

Relaxing the sqlite3 development dependency resolves this conflict and allows Appraisal to run successfully on Ruby 4.0.

Background for RuboCop lint errors

CI failed due to RuboCop lint errors after the RuboCop version was updated:
https://github.com/paper-trail-gem/paper_trail/actions/runs/21697428441/job/62570566123?pr=1547
The CI log reported the following autocorrectable Layout/HeredocIndentation offenses:

Offenses:

lib/paper_trail.rb:30:1: C: [Correctable] Layout/HeredocIndentation: Use 2 spaces for indentation in a heredoc by using <<~ instead of <<-.
    PaperTrail.timestamp_field= has been removed, without replacement. It is no ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

Therefore, I fixed them by running bundle exec rubocop -a lib spec.

Check the following boxes:

  • Wrote good commit messages.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new
    code introduces user-observable changes.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.

- Replace Ruby 3.4 with Ruby 4.0 in CI
- Relax sqlite3 development dependency to avoid Gemfile/gemspec conflict
- Bump actions/checkout from 4 to 6
- Document PaperTrail 17 compatibility in README
- Fix RuboCop Layout/HeredocIndentation offenses
@unochin unochin marked this pull request as ready for review February 5, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant