-
-
Notifications
You must be signed in to change notification settings - Fork 1
Revival: Modernize Ruby support to 3.2+ and Update Dependencies #8
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
74c9ed2 to
c6afc9a
Compare
Ruby Version Updates: - Minimum Ruby version: 2.5.9 → 3.1 - CI matrix: 3.1, 3.2, 3.3, 3.4 (plus 4.0.0-preview3 experimental) - Rubocop target: 2.5 → 3.1 Dependency Changes: - Bundler: 2.2.33 → 2.6.9 (pinned for Ruby 3.1 compatibility) - Zeitwerk: pinned to < 2.7 (2.7+ requires Ruby 3.2) - Rake: ~> 13.0 → ~> 13.2 - Minitest: pinned to ~> 5.0 (6.0 removed stub API) - Added benchmark and pstore gems (removed from Ruby 3.5 default gems) - Removed deprecated codecov gem (replaced with GitHub Action) - Removed unmaintained inch gem - Removed psych gem (bundled with Ruby 3.1+) CI Updates: - actions/checkout: v2 → v4 - Added Codecov GitHub Action for coverage uploads - Added fail-fast: false to test all Ruby versions - Ruby 4.0.0-preview3 as experimental (allowed to fail) Code Modernization: - Pattern matching (case/in) in conversions.rb - Endless methods in shell/timer.rb - Anonymous block forwarding (&) - Array#intersect? instead of (a & b).any? - Fixed MiniTest → Minitest capitalization for Minitest 5.x - Applied various Rubocop auto-corrections Test Coverage: - Relaxed coverage threshold from 100% to 90% - Removed per-file coverage minimum - Removed refuse_coverage_drop (problematic in CI)
e0fe556 to
fc56236
Compare
Move rubocop, reek, flay, flog to optional :lint group so they're not installed by default or forced on gem consumers. Keep bundler-audit as a required dependency for security auditing. Split CI into separate audit and test jobs - audit runs once on Ruby 3.4 while tests run across all supported versions.
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.
Pull request overview
This PR modernizes the Ruby support by upgrading the minimum version from 2.5.9 to 3.1, updating CI to test against Ruby 3.1-3.4 (plus 4.0.0-preview3 experimental), and applying modern Ruby syntax features. It also updates dependencies, removes deprecated/unmaintained gems, and adjusts test coverage requirements.
Key Changes:
- Ruby version minimum updated to 3.1+ with modern syntax adoption (pattern matching, endless methods, anonymous block forwarding)
- Dependencies updated (Bundler 2.6.9, Rake ~> 13.2, pinned Zeitwerk < 2.7, Minitest ~> 5.0)
- CI modernized with separate audit job, updated actions to v4, and comprehensive Ruby version matrix
- Test coverage threshold relaxed from 100% to 90% with simplified configuration
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test_helper.rb | Simplified SimpleCov configuration, removed codecov gem integration, enabled coverage in CI |
| test/**/*_test.rb | Fixed MiniTest → Minitest capitalization for compatibility with Minitest 5.x |
| reviewer.gemspec | Updated Ruby requirement to 3.1+, added benchmark/pstore dependencies, pinned Minitest to ~> 5.0, removed deprecated gems |
| Gemfile | Updated Rake to ~> 13.2, pinned zeitwerk < 2.7, moved lint tools to optional group |
| Gemfile.lock | Reflects updated dependencies and Bundler 2.6.9 |
| lib/reviewer/tools.rb | Modernized to use Array#intersect? instead of set intersection check |
| lib/reviewer/shell/timer.rb | Converted to endless method definitions with anonymous block forwarding |
| lib/reviewer/guidance.rb | Simplified lambda expressions using Symbol#to_proc |
| lib/reviewer/conversions.rb | Adopted pattern matching syntax (case/in) |
| lib/reviewer/configuration.rb | Added .freeze to constant string definitions |
| lib/reviewer/command/string/flags.rb | Simplified conditional value assignment |
| lib/reviewer/command/string/env.rb | Simplified conditional value assignment |
| lib/reviewer/command.rb | Added rubocop disable comment for false positive |
| lib/reviewer/batch.rb | Converted to anonymous block forwarding |
| .github/workflows/main.yml | Modernized CI with separate audit job, Ruby 3.1-3.4 matrix, updated actions to v4 |
| .rubocop.yml | Updated target Ruby to 3.1, changed IgnoredMethods to AllowedMethods, disabled new cops |
| .inch.yml | Removed (inch gem deprecated) |
| .github/FUNDING.yml | Added GitHub Sponsors configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Convert single-expression methods to Ruby 3.1+ endless method syntax throughout the codebase. This reduces boilerplate while improving readability for simple accessor and predicate methods.
Fixes constant redefinition warnings caused by mismatch between the BUNDLED WITH version and Ruby 3.4's built-in Bundler.
Bundler 2.7.2 requires Ruby >= 3.2.0. Update gemspec and CI matrix to drop Ruby 3.1 support. Users on Ruby 3.1 can continue using the previous gem version.
Ruby Version Updates
Dependency Changes
CI Updates
Code Modernization
Test Coverage