-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use #ruby2_keywords for correct delegation on Ruby <= 2.6, 2.7 and 3 #2132
Conversation
spec/grape/middleware/stack_spec.rb
Outdated
@@ -35,8 +35,7 @@ def initialize(&block) | |||
expect { subject.use StackSpec::BarMiddleware, false, my_arg: 42 } | |||
.to change { subject.size }.by(1) | |||
expect(subject.last).to eq(StackSpec::BarMiddleware) | |||
expect(subject.last.args).to eq([false]) | |||
expect(subject.last.opts).to eq(my_arg: 42) | |||
expect(subject.last.args).to eq([false, {my_arg: 42}]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop will complain, add some spaces in { }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix.
BTW, I'm getting lots of error from RuboCop, I'm not sure why that is:
An error occurred while Layout/LineLength cop was inspecting /home/eregon/code/grape/lib/grape/middleware/formatter.rb:100:10.
To see the complete backtrace run rubocop -d.
An error occurred while Layout/LineLength cop was inspecting /home/eregon/code/grape/lib/grape/middleware/formatter.rb:102:17.
To see the complete backtrace run rubocop -d.
An error occurred while Layout/LineLength cop was inspecting /home/eregon/code/grape/lib/grape/middleware/formatter.rb:117:12.
To see the complete backtrace run rubocop -d.
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange, dunno why rubocop is having trouble.
Nice work. Btw I tend to amend CHANGELOG updates and keep things squashed, it's prettier ;) |
35e6698
to
8cd284b
Compare
TravisCI is taking ages to run, do you have plans to migrate to GitHub Actions? (/~https://github.com/ruby/setup-ruby) |
I would definitely take a PR. I've done this before, but not sure how to migrate Danger (PR linter). |
@dblock Now it's green, could you merge this PR? :) |
More context on #2123 (comment)
This also happens to fix the CI on
truffleruby-head
.