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

Refactor the class method validation logic #39

Merged
merged 1 commit into from
Aug 2, 2019
Merged

Conversation

anuragshopify
Copy link
Contributor

@anuragshopify anuragshopify commented Jul 30, 2019

This is in regards to - #37

This PR moves the method signature checks (i.e assert_implements_methods!) to the job initialization step.

This method is really looking at definition level stuff i.e whether the
job class has the necessary methods and the method declarations are
correct. As such, I think having this sort of check in the constructor
makes more sense.
This also updates all the tests accordingly.

If this isn't the case/there's a case for not having it in the
constructor we can just use a boolean to not re-check the signatures on
every invocation of perform.

Gemfile Outdated Show resolved Hide resolved
@GustavoCaso
Copy link
Contributor

Thanks for working on this ❤️

I left a message for you to review.

This method is really looking at definition level stuff i.e whether the
job class has the necessary methods and the method declarations are
correct. As such, I think having this sort of check in the constructor
meakes more sense.
This also updates all the tests accordingly.

If this isn't the case/there's a case for not having it in the
constructor we can just use a boolean to not re-check the signatures on
every invocation of `perform`.
@GustavoCaso GustavoCaso merged commit 891bc4f into master Aug 2, 2019
@GustavoCaso GustavoCaso deleted the validation branch August 2, 2019 14:33
@GustavoCaso GustavoCaso temporarily deployed to rubygems August 20, 2019 18:18 Inactive
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.

2 participants