Skip to content

Added support for Rails 8#2

Open
saurabhudaniya200 wants to merge 2 commits intomasterfrom
rails_8_upgrade
Open

Added support for Rails 8#2
saurabhudaniya200 wants to merge 2 commits intomasterfrom
rails_8_upgrade

Conversation

@saurabhudaniya200
Copy link
Copy Markdown

Added support for Rails 8 so that this can be used with Kale

Copy link
Copy Markdown

Copilot AI left a 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 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.0 to >= 8.1
  • Replaced deprecated Rails methods (to_s(:db)to_formatted_s(:db), tablesdata_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.

Comment thread lib/sliding_partition/job.rb Outdated

def perform
class Job < base
def perform(*)
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
def perform(*)
def perform(*_args)

Copilot uses AI. Check for mistakes.
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