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

Reworking OrcidValidator #4251

Merged
merged 1 commit into from Feb 2, 2020
Merged

Reworking OrcidValidator #4251

merged 1 commit into from Feb 2, 2020

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Feb 2, 2020

Earlier today, I was looking at Rubocop and doing some chores (see pull
request #4250) to see if I could remove some exclusions and even update
elements of Rubocop.

I tried bumping .rubocop.yml's TargetRubyVersion from 2.3 to
2.4. I got a Performance/RegexpMatch violation, encouraging me to
use match? instead of match and/or =~. I spent some time shifting
from Regular Expressions to string matches (see PR #4250).

That left one violation; The one that is fixed in this pull request.

In addition to reworking to use match?, I reworked to be more
explicit about what the original match method was intended for;
Namely extracting an orcid from the given string.

@samvera/hyrax-code-reviewers

Earlier today, I was looking at Rubocop and doing some chores (see pull
request #4250) to see if I could remove some exclusions and even update
elements of Rubocop.

I tried bumping `.rubocop.yml`'s `TargetRubyVersion` from `2.3` to
`2.4`. I got a `Performance/RegexpMatch` violation, encouraging me to
use `match?` instead of `match` and/or `=~`. I spent some time shifting
from Regular Expressions to string matches (see PR #4250).

That left one violation; The one that is fixed in this pull request.

In addition to reworking to use `match?`, I reworked to be more
explicit about what the original `match` method was intended for;
Namely extracting an orcid from the given string.
@jeremyf jeremyf merged commit 3f85d39 into master Feb 2, 2020
@jeremyf jeremyf deleted the reworking-orcid-methods branch February 2, 2020 19:36
jeremyf added a commit that referenced this pull request Feb 2, 2020
Given that Ruby 2.3 is past EOL, and 2.4 is approaching EOL, I'm bumping
the targeted version to olded non-EOL ruby version. Note, Hyrax's
gemspec already states that you must use Ruby 2.4 or greater.

This should be a non-breaking change as the following PRs addressed the
Rubocop violations:

* #4250 (and associated SHAs)
  * 12bec9b
  * 571d3d6
  * 9ce198c
* #4251 (and associated SHA)
  * 988a8e3
no-reply pushed a commit that referenced this pull request Feb 2, 2020
Given that Ruby 2.3 is past EOL, and 2.4 is approaching EOL, I'm bumping
the targeted version to olded non-EOL ruby version. Note, Hyrax's
gemspec already states that you must use Ruby 2.4 or greater.

This should be a non-breaking change as the following PRs addressed the
Rubocop violations:

* #4250 (and associated SHAs)
  * 12bec9b
  * 571d3d6
  * 9ce198c
* #4251 (and associated SHA)
  * 988a8e3
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.

None yet

2 participants