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 to remove deprecation warnings #22

Merged
merged 6 commits into from
Oct 9, 2018

Conversation

kennyadsl
Copy link
Member

After solidusio/solidus#2001 we need to change some stuff to remove deprecation warning and be compliant with the next solidus versions.

This PR also update some code to be rubocop and factor bot compliant.

@kennyadsl kennyadsl self-assigned this Oct 8, 2018
This will remove deprecation messages
prior to the new gateways design payment methods were inheriting
from Spree::Gateway and they needed to be instantiated by calling
`provider`. This commit makes it possible to support both versions.

It uses the new method added into 0.2.2 of solidus_support, this is
why the dependency has been updated.
@kennyadsl kennyadsl force-pushed the update-payment-parent-class branch from c9b0a6f to 1477850 Compare October 9, 2018 13:06
@kennyadsl kennyadsl requested a review from tvdeyen October 9, 2018 20:58
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Great. Thanks

@@ -1,12 +1,13 @@
module SolidusAffirm
class Gateway < Spree::Gateway
class Gateway < SolidusSupport.payment_method_parent_class
Copy link
Member

Choose a reason for hiding this comment

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

Some day it would be great to rename this class into what is actually is (a SolidusAffirm::PaymentMethod), but this would force existing stores to change data on their database and therefor should be done in a mayor release instead.

@kennyadsl kennyadsl merged commit 82a24ee into master Oct 9, 2018
@kennyadsl kennyadsl deleted the update-payment-parent-class branch October 9, 2018 21:17
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