Skip to content
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

Deprecation Warning on 2.7 #678

Closed
maxwell opened this issue Mar 2, 2021 · 4 comments
Closed

Deprecation Warning on 2.7 #678

maxwell opened this issue Mar 2, 2021 · 4 comments

Comments

@maxwell
Copy link

maxwell commented Mar 2, 2021

/Users/maxwell/.rbenv/versions/2.7.1/lib/ruby/2.7.0/forwardable.rb:235: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/maxwell/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/database_cleaner-core-2.0.1/lib/database_cleaner/cleaners.rb:11: warning: The called method `[]' is defined here

Worth noting, we perhaps are doing some non-standard access to handle having multiple databases.

    DatabaseCleaner[:active_record, { db: Extracts::Version }].clean_with :truncation
    DatabaseCleaner[:active_record, { db: Extracts::ApplicationRecord }].clean_with :truncation

    DatabaseCleaner[:active_record, { db: ApplicationRecord }].clean_with :truncation
@swiknaba
Copy link

swiknaba commented Mar 3, 2021

seems like the same issues described here: #677 (lib/database_cleaner/cleaners.rb:11 is where an options hash is passed in the initialization of the cleaner class which has to be refactored for Ruby 3, thus it logs a warning on Ruby 2.7.1).

@botandrose
Copy link
Contributor

@maxwell @swiknaba I'm unable to reproduce this warning on 2.7.2, or as an error in 3.0.0. Can you help me with instructions, or better yet, add a test to expose this?

@etagwerker
Copy link
Member

@maxwell I can't reproduce this with 2.7.2 either. Please reopen if you can provide more details. Thanks!

@swiknaba
Copy link

2.7.2 turned off these warnings: https://bugs.ruby-lang.org/issues/17000 so this has to be tested on 2.7.1 and 3.
Did you test if it actually works on 3.0 @etagwerker?

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

No branches or pull requests

4 participants