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

Extension maintenance #163

Conversation

kennyadsl
Copy link
Member

This PR makes two things:

Move rubocop performance cops

This is needed after rubocop/rubocop#5977.

We also need to update the required Ruby version to 2.3 to accommodate the rubocopgem update, required by rubocop-performance.

Add rubocop-rails cops

It provided some useful suggestions which have been fixed within this same PR.

Performance cops are deprecated, this is the new standard
way of including those cops.

Updating Rubocop, it also requires to update the target ruby
version.
Now that we require Ruby >= 2.3 we can safely use it.
And fix all the issues reported:

- use safe navigation instead of try
- avoid deprecated update_attributes
- avoid update_column
- avoid dynamic find_by_something
- use delegate when possible
- use Time with zone

I also had to exclude the Rails/Output cop from the seed file
since we need to use puts there.
@kennyadsl kennyadsl self-assigned this Jul 17, 2019
@kennyadsl kennyadsl changed the title Rubocop maintenance Extension maintenance Jul 18, 2019
@kennyadsl kennyadsl requested a review from a team July 18, 2019 11:58
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

Nice upgrade, @kennyadsl thank you 👍

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks for doing this @kennyadsl 👍

@spaghetticode spaghetticode merged commit 7a2703e into solidusio:master Aug 2, 2019
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

3 participants