Skip to content

Conversation

@mensfeld
Copy link
Collaborator

@mensfeld mensfeld commented Feb 15, 2025

This PR adds Rails 8 to the test suite and continues the cleanup + updates readme

Summary by CodeRabbit

  • New Features

    • Expanded compatibility to include the latest framework version, integrating enhanced testing support for Rails 8.0 and Ruby 3.4.
  • Documentation

    • Updated the system requirements to mandate Ruby 3.0 or greater.
  • Chores

    • Streamlined build and test configurations by removing legacy version support and optimizing settings for improved stability.

@mensfeld mensfeld self-assigned this Feb 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Feb 15, 2025

Walkthrough

The changes update the CI and project configuration for Ruby and Rails version compatibility. The workflow matrix in .github/workflows/specs.yml now includes Rails 8.0 with Ruby 3.4 and the corresponding Gemfile. The Ruby version has been updated in both .rubocop.yml (from 2.4 to 3.4) and .ruby-version (set to 3.4.2). Appraisal entries have been modified, removing Rails 6.0 and adding entries for Rails 7.2 and 8.0. Documentation in CHANGELOG.md and README.md has been adjusted accordingly, and a new Gemfile for Rails 8.0 has been introduced.

Changes

File(s) Change Summary
.github/workflows/specs.yml Expanded the rails_specs job matrix to include Rails '8.0' with Ruby '3.4' and an associated Gemfile entry.
.rubocop.yml, .ruby-version Updated the Ruby target from 2.4 to 3.4 and specified Ruby version 3.4.2.
Appraisals Removed appraisal for Rails 6.0; added appraisals for Rails 7.2 and 8.0 with corresponding activejob test groups.
CHANGELOG.md, README.md Modified documentation: Added an enhancement to bring Ruby 3.4 into CI, removed Rails 7.2 compatibility detail in CHANGELOG; Updated README requirement from Ruby 2.7 or greater to Ruby 3.0 or greater.
gemfiles/rails_8_0.gemfile Introduced a new Gemfile for Rails 8.0 specifying dependencies for test (activejob, httparty, multi_xml, simplecov) and development (appraisal, pry-byebug, rubocop) groups.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant CI as CI Workflow
    participant Matrix as Rails Specs Job
    participant Test as Test Runner
    participant Gemfile as Rails 8.0 Gemfile

    Dev->>CI: Push commit with configuration updates
    CI->>Matrix: Trigger rails_specs job with updated Rails matrix
    Matrix->>Test: Execute tests for Rails [6.1, 7.0, 7.1, 7.2, 8.0]
    alt Version is 8.0
        Matrix->>Gemfile: Load Ruby 3.4 & gemfiles/rails_8_0.gemfile 
    end
    Test->>CI: Return test results
Loading

Possibly related PRs

Suggested reviewers

  • phstc

Poem

I'm a little rabbit with hops so bright,
Updating configs in the pale moonlight.
Rails and Ruby now leap in tune,
CI workflows singing a fresh, new croon.
With every change, I bounce with cheer –
Hopping into a future that's crystal clear!
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mensfeld mensfeld marked this pull request as ready for review February 15, 2025 11:13
@mensfeld mensfeld requested a review from phstc February 15, 2025 11:13
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
gemfiles/rails_8_0.gemfile (3)

3-3: String Literal Style Consistency in Test Group
Static analysis (RuboCop) recommends using single-quoted strings when interpolation or special symbols are not required. For example, you could update the test group as follows:

- source "https://rubygems.org"
+ source 'https://rubygems.org'

- gem "activejob", "~> 8.0"
+ gem 'activejob', '~> 8.0'

- gem "httparty"
+ gem 'httparty'

- gem "multi_xml"
+ gem 'multi_xml'

- gem "simplecov"
+ gem 'simplecov'

This will improve style consistency in the file.

Also applies to: 6-9

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 3-3: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


12-16: String Literal Style Consistency in Development Group
Similarly, in the development group it’s preferable to use single-quoted strings when no interpolation is needed. For instance:

- gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
+ gem 'appraisal', git: 'https://github.com/thoughtbot/appraisal.git'

- gem "pry-byebug"
+ gem 'pry-byebug'

- gem "rubocop"
+ gem 'rubocop'

Adopting this style across the file will help adhere to RuboCop guidelines.

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 14-14: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 15-15: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


18-18: Gemspec Declaration Consistency
For the gemspect declaration, consider a similar style update for consistency:

- gemspec path: "../"
+ gemspec path: '../'

This small change aligns with the overall string literal style recommendations.

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 18-18: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec57111 and 214ecb2.

📒 Files selected for processing (7)
  • .github/workflows/specs.yml (2 hunks)
  • .rubocop.yml (1 hunks)
  • .ruby-version (1 hunks)
  • Appraisals (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • gemfiles/rails_8_0.gemfile (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .ruby-version
🧰 Additional context used
🪛 RuboCop (1.69.1)
gemfiles/rails_8_0.gemfile

[convention] 3-3: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 7-7: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 8-8: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 9-9: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 14-14: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 15-15: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 18-18: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)

🔇 Additional comments (8)
Appraisals (1)

19-23: LGTM! Rails version updates look good.

The additions of Rails 7.2 and 8.0 appraisals follow the established pattern and use appropriate version constraints. The removal of Rails 6.0 support helps with the cleanup objective.

Also applies to: 25-29

.github/workflows/specs.yml (1)

44-44: LGTM! CI matrix updates look good.

The addition of Rails 8.0 to the test matrix with Ruby 3.4 is well-structured and follows the established pattern of Rails-Ruby version pairing.

Also applies to: 58-60

.rubocop.yml (1)

4-4:

Details

✅ Verification successful

Verify RuboCop compatibility with Ruby 3.4.

The target Ruby version has been updated significantly from 2.4 to 3.4. This might introduce new cops or change existing cop behaviors.


🌐 Web query:

What is the latest version of RuboCop that supports Ruby 3.4?

💡 Result:

RuboCop maintains full compatibility with Ruby 3.4 in its latest stable versions as of February 2025[1][8]. Key details:

Runtime Support

  • All modern RuboCop versions (including v1.70) officially support running on Ruby 3.4[1][8]
  • Requires MRI Ruby ≥2.7 or JRuby ≥9.4 as base runtime[1]

Code Analysis

  • For parsing Ruby 3.4 syntax, configure:
ParserEngine: parser_prism
TargetRubyVersion: 3.4

This enables analysis using Prism parser (Ruby 3.4's default parser)[1][5]

Compatibility Notes

  • Earlier RuboCop versions ≥1.62 added experimental Prism support[1]
  • Version 1.70 specifically enhanced LSP integration and environment variable handling for target Ruby versions[8]
  • Automatic detection works if project uses .ruby-version or Gemfile.lock specifying 3.x[5]

The latest RuboCop versions actively track new Ruby releases, with v1.x series maintaining compatibility through parser updates and configuration options[1][5][8].

Citations:


RuboCop Config Update – Ruby 3.4 Compatibility Verified

The updated target Ruby version (TargetRubyVersion: 3.4) in .rubocop.yml is fully supported by the latest stable RuboCop releases (e.g., v1.70 and beyond). This change aligns with current RuboCop compatibility requirements.

  • Ensure the CI environment is running RuboCop v1.70+ to take full advantage of Ruby 3.4 support.
  • Although the jump from 2.4 to 3.4 could introduce new or modified cops, existing tests should help catch any issues.
README.md (1)

23-23: LGTM! Ruby version requirement update is appropriate.

The minimum Ruby version requirement has been updated to align with Rails 8.0 support and CI changes.

CHANGELOG.md (2)

3-5: Removed Rails 7.2 Compatibility Enhancement
The removal of the "Enhancement: Add enqueue_after_transaction_commit? for Rails 7.2 compatibility" entry appears intentional. Please double-check that any documentation or release notes referring to Rails 7.2 support have been updated accordingly.


6-7: Added Ruby 3.4 CI Enhancement
The addition of the "Enhancement: Bring Ruby 3.4 into the CI" entry ensures that Ruby 3.4 is now explicitly part of the CI process. Verify that all related CI configuration files and documentation (e.g. README updates) are in sync with this change.

gemfiles/rails_8_0.gemfile (2)

1-10: Test Group Structure and Dependency Declarations
The new Gemfile generated by Appraisal correctly defines the test group dependencies for Rails 8.0, including the required gems such as ActiveJob, HTTParty, Multi_XML, and SimpleCov. Overall, the structure is solid.

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 3-3: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 7-7: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 8-8: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 9-9: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


1-19: Overall New Gemfile Evaluation
The new Gemfile is well-organized and integrates the necessary dependency groups for testing and development with Rails 8.0. Ensure that the CI workflow (e.g. in .github/workflows/specs.yml) correctly references this Gemfile and that corresponding documentation (such as in the README and RuboCop configuration) reflects the changes in Ruby and Rails versions.

🧰 Tools
🪛 RuboCop (1.69.1)

[convention] 3-3: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 6-6: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 7-7: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 8-8: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 9-9: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 13-13: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 14-14: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 15-15: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)


[convention] 18-18: Prefer single-quoted strings when you don't need string interpolation or special symbols.

(Style/StringLiterals)

@mensfeld mensfeld merged commit eef8111 into main Feb 17, 2025
21 checks passed
@mensfeld mensfeld deleted the add-rails-8-and-cleanup branch February 17, 2025 09:00
@coderabbitai coderabbitai bot mentioned this pull request Jul 3, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 2, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 26, 2025
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.

2 participants