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

Move shared BaseExecution concerns into the base class. #1009

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

dixpac
Copy link
Contributor

@dixpac dixpac commented Jul 15, 2023

Parent/base class for Job and Execution is BaseExecution, both of these child classes include same concerns: Lockable, Filterable, Reportable.

This commit moves inclusion of these concerns to the base class BaseExecution

Parent/base class for `Job and Execution` is `BaseExecution`, both of
these child classes include same concerns: `Lockable, Filterable, Reportable`.

This commit moves inclusion of these concerns to the base class
`BaseExecution`
Comment on lines +8 to +10
include Filterable
include Lockable
include Reportable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would love if I could group this; include Filterable, Lockable, Reportable
but rubocop is not allowing it :)

Copy link
Owner

Choose a reason for hiding this comment

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

Seems like a standard style; Rails uses it too. My digging surfaced this, but not the best explanation :-)

rubocop/ruby-style-guide#622

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree definitely not worth changing this rule, it just looked nicer in this particular situation to me :)

I think this rule is on by default because of:

  1. Git diffing
  2. Error tracing - line number, if there are multiple mixins on 1 line could be harder to trace

@bensheldon bensheldon added the refactor Code changes that do not introduce new features label Jul 17, 2023
@bensheldon
Copy link
Owner

This looks good. Thank you! btw, there's going to be some major refactoring in GoodJob v4 that will do away with the BaseExecution. There will just be Job and Execution (currently called DiscreteExecution).

@bensheldon bensheldon merged commit e39e234 into bensheldon:main Jul 18, 2023
@dixpac
Copy link
Contributor Author

dixpac commented Jul 18, 2023

there's going to be some major refactoring in GoodJob v4 that will do away with the BaseExecution. There will just be Job and Execution (currently called DiscreteExecution)

I'm willing to work on this, if you haven't done it already :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code changes that do not introduce new features
Projects
Development

Successfully merging this pull request may close these issues.

2 participants