-
Notifications
You must be signed in to change notification settings - Fork 289
Add Rails 8 into test suite and do further cleanup #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the CI and project configuration for Ruby and Rails version compatibility. The workflow matrix in Changes
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
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📒 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.4This 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-versionorGemfile.lockspecifying 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:
- 1: https://docs.rubocop.org/rubocop/compatibility.html
- 2: https://docs.rubocop.org/rubocop/1.23/compatibility.html
- 3: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/UriRegexp
- 4: https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/
- 5: https://docs.rubocop.org/rubocop/configuration.html
- 6: rubocop/rubocop#13617
- 7: https://rubygems.org/gems/rubocop-discourse/versions/3.4.0?locale=en
- 8: https://github.com/rubocop/rubocop/releases
- 9: https://www.ironin.it/blog/ruby-3.4-release-tech-and-business-impact.html
- 10: https://www.honeybadger.io/blog/linting-formatting-ruby/
RuboCop Config Update – Ruby 3.4 Compatibility Verified
The updated target Ruby version (
TargetRubyVersion: 3.4) in.rubocop.ymlis 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)
This PR adds Rails 8 to the test suite and continues the cleanup + updates readme
Summary by CodeRabbit
New Features
Documentation
Chores