Upgrade rubocop and rubocop-rspec
Context
Closes #36 (closed)
Rubocop and rubocop-rspec are outdated, and they prevent us using new Rubocop cops (e.g. gitlab-org/gitlab#356738 (comment 952865877) or #34 (closed) or #35 (closed)).
We should follow the upgrade guides when updating both those gems:
What does this MR do?
- Upgrades Rubocop gem from
0.91.1to1.30.1 - Upgrades rubocop-rspec gem from
1.44.1to2.11.1 - Changes the codebase so that we have green tests (there were a lot of changes to be made)
- Added a playground folder with a rails app that has this gem installed. It also has some Rubocop offenses in order to test the gem locally.
How to test it locally?
- Method 1: Run the specs
- Method 2: Check the directions in the README about the playground folder.
Review suggestion
Go commit by commit:
- Commits prefixed with
[RuboCop]are the result of strictly following sections of the Rubocop upgrade guide. - Commits prefixed with
[rubocop-rspec]are the result of strictly following sections of the rubocop-rspec upgrade guide. - The rest of the commits make the test suite and the
rubocopcommand green.
Edited by David Dieulivol