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

Update rubocop-govuk requirement from ~> 3.17.1 to ~> 4.0.0 #215

Merged
merged 5 commits into from
Jun 8, 2021

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 2, 2021

Updates the requirements on rubocop-govuk to permit the latest version.

Changelog

Sourced from rubocop-govuk's changelog.

4.0.0

  • Update rubocop to 1.15.0
  • Update rubocop-ast to 1.6.0
  • Update rubocop-rails to 2.10.0
  • Update rubocop-rspec to 2.3.0

4.0.0.pre.1

  • Released as a pre-release to try surface any issues before wider rollout, use alphagov/rubocop-govuk#129 to record any problems
  • BREAKING: Upgraded from Rubocop 0.x to 1.x which introduces lots of new cops
  • Update rubocop to 1.10.0
  • Update rubocop-ast to 1.4.0
  • Update rubocop-rails to 2.9.1
  • Update rubocop-rspec to 2.2.0
  • Make stable dependencies (>= 1.0) less strict on patch version
  • Disable SuggestExtensions to stop Rubocop suggesting additional extensions at runtime
  • Explicitly set target Ruby version to >= 2.6 in gemspec
  • Downgrade local Ruby version to 2.6.6 to capture lowest supported Ruby version
  • Fix namespace change of Capybara/FeatureMethods
  • Disable Naming/VariableNumbers

4.0.0.pre.pre.1

  • Mistakenly named release, same as 4.0.0.pre.1

3.17.2

  • Rename Blacklist to ForbiddenMethods to fix rubocop-rails warnings

3.17.1

  • Pin rubocop-ast to 0.8.0

3.17.0

  • Enable Rails/SaveBang
  • Enable Style/DateTime
  • Enforce strict Time.zone.now
  • Bump rubocop to 0.87.1
  • Bump rubocop-rspec to 1.42.0

3.16.0

  • Bump and lock rubocop-rails to 2.6.0

... (truncated)

Commits
  • 0f689f1 Merge pull request #143 from alphagov/rubocop-4
  • b19ba31 Release version 4 of rubocop-govuk
  • c4d484d Bump rubocop related gems
  • b2affe3 Merge pull request #136 from alphagov/dependabot/add-v2-config-file
  • 0085dca Upgrade to GitHub-native Dependabot
  • ce65577 Merge pull request #131 from alphagov/better-version-number
  • be6bad2 Rename release of 4.0.0.pre-1 to 4.0.0.pre.1
  • f4e7d55 Merge pull request #130 from alphagov/release-4.0.0.pre-1
  • 4bf3a99 Release as 4.0.0.pre-1
  • 0bbc40a Merge pull request #127 from alphagov/dependabot/bundler/rubocop-gte-1.7-and-...
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [rubocop-govuk](https://github.com/alphagov/rubocop-govuk) to permit the latest version.
- [Release notes](https://github.com/alphagov/rubocop-govuk/releases)
- [Changelog](https://github.com/alphagov/rubocop-govuk/blob/main/CHANGELOG.md)
- [Commits](alphagov/rubocop-govuk@v3.17.1...v4.0.0)

---
updated-dependencies:
- dependency-name: rubocop-govuk
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 2, 2021
kevindew added 2 commits June 8, 2021 12:51
This is a new cop that is part of rubocop-govuk 4 that requires you to
specify the minimum Ruby version a gem supports. This cop makes a lot of
sense for gem distribution and clarity over which Ruby version is supported
for a gem.
@kevindew kevindew force-pushed the dependabot/bundler/rubocop-govuk-tw-4.0.0 branch from fbd856b to 2a45840 Compare June 8, 2021 12:34
kevindew added 2 commits June 8, 2021 18:09
A recent change to govuk_publishing_components is to set display none
for certain styles in print contexts [1]. These unfortunately broke a
number of tests in this gem as they added extra class elements that are
not in the markup of our assertions.

I've resolved this for attachments by truncating what we assert on so
only the first part of the class name is checked. This seems to work but
is naturally a bit fragile.

For the Start button elements I've temporarily added in the missing
class so that the tests pass. However I think it's a little too fragile
to have govuk_publishing_components HTML included verbatim so I intend
to clean this up on the next commit.

[1]: alphagov/govuk_publishing_components@6fe73e6
These tests were quite fragile to any changes in
govuk_publishing_components as they expected the HTML from that gem to
be identical to assertions.

To try reduce fragility I have added a new assert selector method that can
match a CSS selector. This then allows us to reduce the amount of things
we assert on to reduce the coupling with the gem.

In doing this I noticed that a few of the tests are basically repeats of
earlier tests so removed them. I also simplified the register to vote
test to not include the start button SVG to make that a little less
fragile, I did this because I couldn't think of a nice quick way to
assert on everything it is doing.
@kevindew kevindew force-pushed the dependabot/bundler/rubocop-govuk-tw-4.0.0 branch from a80497e to f9948ac Compare June 8, 2021 17:14
@kevindew kevindew merged commit 8a4a134 into main Jun 8, 2021
@kevindew kevindew deleted the dependabot/bundler/rubocop-govuk-tw-4.0.0 branch June 8, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants