Fixes #35300 - Pass keyword arguments correctly
In Ruby 3.0 keyword arguments are handled separate from positional arguments. This uses kwargs and passes it along.
It is likely very incomplete, but this is what I found easily when I started Rails 7.0 on Ruby 3.1 and clicked through the UI. I believe these changes are all Ruby 2.7 compatible.
Issues: #35300
Looks like we'll need to raise the Rubocop target version to Ruby 2.7 for this.
This needs to be updated: https://github.com/theforeman/foreman/blob/f28bc34cc749886b80f8b0f909438118368c6040/bundler.d/test.rb#L24
But first we need to release a version that has 2.7 as the target, which is set in https://github.com/theforeman/theforeman-rubocop/blob/main/rules/ruby_target.yml.
@ekohl is this ready for review or still waiting for Ruby 2.7 PR in theforeman-rubocop?
This needs some work. This was passing on Ruby 3.1 but it fails on Ruby 2.7. Setting back to draft.
At least this passes RuboCop now without an update. Let's see if the other tests are also green. Please review carefully.
All green. Please review again.
however on
3.0.4I'm not able to run rails, startup is failing with following error:
Yes, #9230 is needed for that. While the tests don't pass, you can use those changes to at least get the non-graphql parts to start up again.
Thanks @ekohl !