Added support for Rails 8#2
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the sliding_partition gem to support Rails 8, removing dependencies on older Rails versions and updating deprecated ActiveRecord methods. The changes modernize the codebase by removing obsolete development dependencies, updating Ruby version requirements, and replacing deprecated Rails API calls with their current equivalents.
Key Changes:
- Updated ActiveRecord dependency from
<= 6.0.0to>= 8.1 - Replaced deprecated Rails methods (
to_s(:db)→to_formatted_s(:db),tables→data_sources,starts_with?→start_with?) - Removed obsolete development dependencies (pry-state, awesome_print, gemsmith, guard-related gems)
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sliding_partition.gemspec | Updated ActiveRecord dependency to Rails 8+ and removed obsolete development dependencies |
| lib/sliding_partition/partition_ddl_changer.rb | Replaced deprecated to_s(:db), tables, and starts_with? methods with Rails 8 equivalents |
| spec/lib/sliding_partition/sliding_partition_spec.rb | Updated to_s(:db) to to_formatted_s(:db) in test helper |
| lib/sliding_partition/job.rb | Made Job class compatible with environments lacking ApplicationJob |
| lib/sliding_partition/railtie.rb | Removed conditional ActiveJob loading initializer |
| lib/sliding_partition.rb | Added direct require for job file |
| spec/spec_helper.rb | Removed requires for removed development dependencies |
| lib/sliding_partition/identity.rb | Bumped version from 0.3.1 to 0.4.0 |
| .ruby-version | Updated Ruby version from 2.4.1 to 3.4.4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| def perform | ||
| class Job < base | ||
| def perform(*) |
There was a problem hiding this comment.
The splat operator (*) accepts arguments but they are unused in the method body. Consider either removing the parameter if no arguments are expected, or explicitly naming the parameter (e.g., *args) if forward compatibility with arguments is intended.
| def perform(*) | |
| def perform(*_args) |
Added support for Rails 8 so that this can be used with Kale