-
Notifications
You must be signed in to change notification settings - Fork 485
Description
Have there been any efforts already on getting this gem ready for Ruby 3?
this kind of magic: https://github.com/DatabaseCleaner/database_cleaner/blob/master/lib/database_cleaner/cleaner.rb#L43
def strategy=(args)
strategy, *strategy_args = argswon't work in Ruby 3, I've seen quite some usage of this pattern.
Also, the redis and the active_record sub-gems use kwargs vs. options-hashes differently, see:
class Truncation < Base
def initialize(opts={}) class Deletion < Strategy
def initialize only: [], except: []which will make it harder to upgrade the database gem family.
So probably as a first step, we should harmonize all sub-gems to use the same way of passing options around, either as a hash or using keyword arguments. From there we can tinker further.
I've tried it quickly locally and run into too many issues to push a draft PR. I might find more time on one of the next weekends though. -> hence the question, if there is already any PR/fork that started working on Ruby 3 compatibility.
As always, thanks for the gems 🙂
=> Specs are passing for Postgresql, MySQL, SQLlite locally, however, when I use
DatabaseCleaner.strategy = :deletion, { except: %i[not_you also_not_you blubb] }in one of my projects, strategy= fails with the Ruby 3 kwargs/hash error.