Skip to content

Conversation

@DanielePalombo
Copy link

@DanielePalombo DanielePalombo commented Jun 16, 2025

Summary by CodeRabbit

  • New Features
    • Added support for newer Ruby (3.3, 3.4) and Rails (7.1, 7.2, 8.0) versions in testing and appraisal configurations.
    • Introduced new gemfiles for Rails 7.1, 7.2, and 8.0 environments.
  • Chores
    • Updated dependency requirements to target newer Rails versions and added standard library dependencies.
    • Removed test group gems from Gemfiles.
    • Modernized test code to use current Ruby methods for file existence checks.

@coderabbitai
Copy link

coderabbitai bot commented Jun 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The updates modernize the project's Ruby and Rails compatibility by adjusting CI matrices, appraisal files, and gem dependencies for newer versions. Several new gemfiles for Rails 7.1, 7.2, and 8.0 were introduced, and test group gems were removed from some gemfiles. The gemspec was enhanced with new runtime and development dependencies. A deprecated Ruby method in tests was replaced.

Changes

File(s) Change Summary
.github/workflows/main.yml Updated CI matrix to test Ruby 3.3/3.4 with Rails 7.1, 7.2, and 8.0; removed older versions.
Appraisals Updated appraisals to target Rails 7.0, 7.1, 7.2, and 8.0 instead of older versions.
Gemfile, gemfiles/rails_7.0.gemfile Removed test group gems (test-unit, pry, pry-byebug).
gemfiles/rails_7.1.gemfile, gemfiles/rails_7.2.gemfile, Added new gemfiles for Rails 7.1, 7.2, and 8.0 with updated dependencies and no test group gems.
gemfiles/rails_8.0.gemfile
deface.gemspec Increased Rails dependency versions; added runtime dependencies (base64, bigdecimal, mutex_m, drb); added dev dependencies (test-unit, pry-byebug).
spec/deface/precompiler_spec.rb Replaced deprecated File.exists? with File.exist? in test.

Possibly related PRs

  • Upgrade ruby/rails #242: Also updates the GitHub Actions workflow matrix to test newer Ruby and Rails versions, closely related in modifying CI configurations.

Poem

In the warren, gems now shine anew,
Rails and Ruby versions leap and grew.
With mutex and concurrent friends in tow,
The CI matrix hops where new winds blow.
A test now checks as rabbits do—
“Is it here?” with methods true!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 17b8aab and 280a2f4.

📒 Files selected for processing (6)
  • Gemfile (0 hunks)
  • deface.gemspec (1 hunks)
  • gemfiles/rails_7.0.gemfile (0 hunks)
  • gemfiles/rails_7.1.gemfile (1 hunks)
  • gemfiles/rails_7.2.gemfile (1 hunks)
  • gemfiles/rails_8.0.gemfile (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

File.exists? has been replaced by File.exist? since ruby 3.2.0
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: 2

🧹 Nitpick comments (7)
deface.gemspec (1)

42-42: Maintain alphabetical order to satisfy RuboCop

RuboCop flags the new drb dependency ordering. Move it before polyglot:

 spec.add_dependency('rainbow', '>= 2.1.0')
-spec.add_dependency('polyglot')
 spec.add_dependency('drb')
+spec.add_dependency('polyglot')
gemfiles/rails_7.1.gemfile (2)

5-8: Alphabetise gems to silence Bundler/OrderedGems

-gem "concurrent-ruby"
-gem "mutex_m"
-gem "actionview", "~> 7.1.0"
+gem "actionview",    "~> 7.1.0"
+gem "concurrent-ruby"
+gem "mutex_m"

10-14: Keep test-group gems alphabetised as well

-  gem "test-unit"
   gem "pry"
   gem "pry-byebug"
+  gem "test-unit"
gemfiles/rails_8.0.gemfile (2)

5-8: Enforce alphabetical ordering of top-level gems
RuboCop flags the order—actionview and railties should precede concurrent-ruby and mutex_m.

- gem "concurrent-ruby"
- gem "mutex_m"
- gem "actionview", "~> 8.0.0"
- gem "railties", "~> 8.0.0"
+ gem "actionview", "~> 8.0.0"
+ gem "concurrent-ruby"
+ gem "mutex_m"
+ gem "railties", "~> 8.0.0"

10-14: Alphabetize gems in the :test group
RuboCop suggests pry and pry-byebug come before test-unit.

- group :test do
-   gem "test-unit"
-   gem "pry"
-   gem "pry-byebug"
- end
+ group :test do
+   gem "pry"
+   gem "pry-byebug"
+   gem "test-unit"
+ end
gemfiles/rails_7.2.gemfile (2)

5-8: Enforce alphabetical ordering of top-level gems
RuboCop flags that actionview and railties should precede concurrent-ruby and mutex_m.

- gem "concurrent-ruby"
- gem "mutex_m"
- gem "actionview", "~> 7.2.0"
- gem "railties", "~> 7.2.0"
+ gem "actionview", "~> 7.2.0"
+ gem "concurrent-ruby"
+ gem "mutex_m"
+ gem "railties", "~> 7.2.0"

10-14: Alphabetize gems in the :test group
To satisfy Bundler’s ordered-gems rule, pry and pry-byebug should come before test-unit.

- group :test do
-   gem "test-unit"
-   gem "pry"
-   gem "pry-byebug"
- end
+ group :test do
+   gem "pry"
+   gem "pry-byebug"
+   gem "test-unit"
+ end
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf18df and d505c24.

📒 Files selected for processing (9)
  • .github/workflows/main.yml (1 hunks)
  • Appraisals (1 hunks)
  • Gemfile (1 hunks)
  • deface.gemspec (2 hunks)
  • gemfiles/rails_7.0.gemfile (1 hunks)
  • gemfiles/rails_7.1.gemfile (1 hunks)
  • gemfiles/rails_7.2.gemfile (1 hunks)
  • gemfiles/rails_8.0.gemfile (1 hunks)
  • spec/deface/precompiler_spec.rb (1 hunks)
🧰 Additional context used
🪛 RuboCop (1.75.5)
deface.gemspec

[convention] 42-42: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency drb should appear before polyglot.

(Gemspec/OrderedDependencies)


[warning] 54-54: Do not use RUBY_VERSION in gemspec file.

(Gemspec/RubyVersionGlobalsUsage)

gemfiles/rails_7.1.gemfile

[convention] 7-7: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem actionview should appear before mutex_m.

(Bundler/OrderedGems)


[convention] 12-12: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem pry should appear before test-unit.

(Bundler/OrderedGems)

gemfiles/rails_7.2.gemfile

[convention] 7-7: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem actionview should appear before mutex_m.

(Bundler/OrderedGems)


[convention] 12-12: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem pry should appear before test-unit.

(Bundler/OrderedGems)

gemfiles/rails_8.0.gemfile

[convention] 7-7: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem actionview should appear before mutex_m.

(Bundler/OrderedGems)


[convention] 12-12: Gems should be sorted in an alphabetical order within their section of the Gemfile. Gem pry should appear before test-unit.

(Bundler/OrderedGems)

🔇 Additional comments (9)
Gemfile (1)

3-4: Validate necessity of new top-level runtime dependencies

Adding concurrent-ruby and mutex_m as unconditional runtime gems increases every consumer’s install set.
Please double-check that Deface itself (not just the test suite or a forthcoming feature branch) really requires these libraries at runtime; if they are only needed for a specific Rails version or an optional feature, consider moving them under an appropriate group or declaring them as soft dependencies in the gemspec.

gemfiles/rails_7.0.gemfile (1)

5-6: Confirm that extra gems are truly required for Rails 7.0

Same concern as in the main Gemfile – if concurrent-ruby / mutex_m are not mandatory for Deface on Rails 7.0, the extra install cost can be avoided by scoping them (e.g. via appraisal-only groups).

spec/deface/precompiler_spec.rb (1)

34-34: Good catch replacing deprecated File.exists?

The switch to File.exist? removes Ruby 3.x deprecation warnings – looks correct.

.github/workflows/main.yml (2)

17-20: Include Rails 8.0 combos in CI matrix
The matrix now tests Ruby 3.4 and 3.3 with Rails 8.0, aligning with the new rails_8.0.gemfile.


24-27: Include Rails 7.2 combos in CI matrix
Ruby 3.4 and 3.3 are now paired with Rails 7.2, matching the introduced rails_7.2.gemfile.

Appraisals (4)

6-6: Update Rails 7.0 appraisal version constraint
The appraisal for rails-7.0 is now locked to ~> 7.0.0, matching the new Rails support matrix.


10-15: Introduce Rails 7.1 appraisal
Added appraise 'rails-7.1' with ~> 7.1.0 constraint to cover the new gemfile.


19-24: Introduce Rails 7.2 appraisal
Added appraise 'rails-7.2' scoped to ~> 7.2.0, consistent with the CI and gemfile.


28-33: Introduce Rails 8.0 appraisal
Added appraise 'rails-8.0' with ~> 8.0.0, covering the latest Rails variant.

Comment on lines +29 to +30
- ruby: "3.3"
gemfile: "rails_7.1"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Missing gemfile for Rails 7.1 CI combo
You’ve added a CI job for gemfile: "rails_7.1", but there’s no corresponding gemfiles/rails_7.1.gemfile in the changes. Please ensure that file is present or remove the combo to avoid CI failures.

🤖 Prompt for AI Agents
In .github/workflows/main.yml at lines 29 to 30, you added a CI job for gemfile
"rails_7.1" but did not include the corresponding gemfiles/rails_7.1.gemfile
file. To fix this, either add the missing rails_7.1.gemfile to the gemfiles
directory with the appropriate dependencies or remove the rails_7.1 gemfile
entry from the CI workflow to prevent failures.

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 (2)
deface.gemspec (2)

38-44: Sort runtime dependencies alphabetically.

RuboCop’s Gemspec/OrderedDependencies flagged that the runtime dependencies aren’t in alphabetical order. Reorder these spec.add_dependency lines within the runtime section:

-spec.add_dependency('base64')
-spec.add_dependency('bigdecimal')
-spec.add_dependency('mutex_m')
-spec.add_dependency('nokogiri', '>= 1.6')
-spec.add_dependency('rainbow', '>= 2.1.0')
-spec.add_dependency('polyglot')
-spec.add_dependency('drb')
+spec.add_dependency('base64')
+spec.add_dependency('bigdecimal')
+spec.add_dependency('drb')
+spec.add_dependency('mutex_m')
+spec.add_dependency('nokogiri', '>= 1.6')
+spec.add_dependency('polyglot')
+spec.add_dependency('rainbow', '>= 2.1.0')

55-56: Alphabetize development dependencies.

RuboCop flagged that pry-byebug should come before test-unit. Swap these lines to maintain alphabetical order:

-spec.add_development_dependency('test-unit')
-spec.add_development_dependency('pry-byebug')
+spec.add_development_dependency('pry-byebug')
+spec.add_development_dependency('test-unit')
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d505c24 and 1805d1f.

📒 Files selected for processing (6)
  • Gemfile (0 hunks)
  • deface.gemspec (2 hunks)
  • gemfiles/rails_7.0.gemfile (0 hunks)
  • gemfiles/rails_7.1.gemfile (1 hunks)
  • gemfiles/rails_7.2.gemfile (1 hunks)
  • gemfiles/rails_8.0.gemfile (1 hunks)
💤 Files with no reviewable changes (2)
  • gemfiles/rails_7.0.gemfile
  • Gemfile
✅ Files skipped from review due to trivial changes (1)
  • gemfiles/rails_8.0.gemfile
🚧 Files skipped from review as they are similar to previous changes (2)
  • gemfiles/rails_7.1.gemfile
  • gemfiles/rails_7.2.gemfile
🧰 Additional context used
🪛 RuboCop (1.75.5)
deface.gemspec

[convention] 43-43: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency polyglot should appear before rainbow.

(Gemspec/OrderedDependencies)


[convention] 44-44: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency drb should appear before polyglot.

(Gemspec/OrderedDependencies)


[convention] 56-56: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency pry-byebug should appear before test-unit.

(Gemspec/OrderedDependencies)

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 (1)
deface.gemspec (1)

51-57: Reorder development dependencies
Alphabetical ordering is prescribed by RuboCop: pry must come before pry-byebug.

-spec.add_development_dependency('pry-byebug')
-spec.add_development_dependency('pry')
+spec.add_development_dependency('pry')
+spec.add_development_dependency('pry-byebug')
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1805d1f and 17b8aab.

📒 Files selected for processing (6)
  • Gemfile (0 hunks)
  • deface.gemspec (1 hunks)
  • gemfiles/rails_7.0.gemfile (0 hunks)
  • gemfiles/rails_7.1.gemfile (1 hunks)
  • gemfiles/rails_7.2.gemfile (1 hunks)
  • gemfiles/rails_8.0.gemfile (1 hunks)
💤 Files with no reviewable changes (2)
  • Gemfile
  • gemfiles/rails_7.0.gemfile
🚧 Files skipped from review as they are similar to previous changes (3)
  • gemfiles/rails_8.0.gemfile
  • gemfiles/rails_7.2.gemfile
  • gemfiles/rails_7.1.gemfile
🧰 Additional context used
🪛 RuboCop (1.75.5)
deface.gemspec

[convention] 53-53: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency pry should appear before pry-byebug.

(Gemspec/OrderedDependencies)

🔇 Additional comments (2)
deface.gemspec (2)

36-38: Update Rails dependencies for 7.0+
The loop correctly bumps both actionview and railties to >= 7.0, aligning the gemspec with the new CI and appraisal configurations.


39-45: Introduce new runtime dependencies
The addition and ordering of base64, bigdecimal, drb, mutex_m, nokogiri, polyglot, and rainbow match expectations for required stdlib and external gems.

Copy link
Collaborator

@elia elia left a comment

Choose a reason for hiding this comment

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

Cutting off old versions will probably require a major release

@elia elia merged commit 874bd32 into spree:master Jun 16, 2025
5 checks passed
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