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

Use #ruby2_keywords for correct delegation on Ruby <= 2.6, 2.7 and 3 #2132

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

eregon
Copy link
Contributor

@eregon eregon commented Nov 19, 2020

@@ -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}])
Copy link
Member

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 { }.

Copy link
Contributor Author

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.
...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

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.

@dblock
Copy link
Member

dblock commented Nov 19, 2020

Nice work. Btw I tend to amend CHANGELOG updates and keep things squashed, it's prettier ;)

@eregon
Copy link
Contributor Author

eregon commented Nov 20, 2020

TravisCI is taking ages to run, do you have plans to migrate to GitHub Actions? (https://github.com/ruby/setup-ruby)

@dblock
Copy link
Member

dblock commented Nov 20, 2020

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).

@eregon
Copy link
Contributor Author

eregon commented Nov 20, 2020

@dblock Now it's green, could you merge this PR? :)

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