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

Latest Solidus, Rails 7 and Ruby 3+ support #204

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

MrTin
Copy link

@MrTin MrTin commented Sep 5, 2022

Started work on getting this to work with Rails 7 and Ruby 3+ -- opening this PR for collaboration.

I'm not user of Solidus or this extension, I was just downloading to play around with it and then went into a rabbit hole of fixing whatever was broken -- good weekend challenge 😅

I got mutations and queries working and updating relevant pieces of the code to work. I am however still hitting a few errors with integration tests and I suspect that it might have to do with changes to Solidus and the errors are more so for the tests than actually broken functionality.

Happy to help out here and fix the remaining problems if I can get some guidance on the changes you like to see and what goes where.

Changes

  • add explicit **kwargs to methods failing
  • add hack to set Rails config.cache_classes = false in test.rb
  • change statesRequired to true for expectations
  • add mount_engine to install_generator.rb

TODO

  • better solution for added hack to disable cache_classes as it's true by default in the dummy rails app
  • fix remaining broken tests
  • add libvips-dev as circleci dependency

Note: with Rails 7.1 config.cache_classes is changed to enable_reloading (see commit)

Errors coming from Solidus core(?)

Spree::PaymentMethod::BogusCreditCard

      Spree::PaymentMethod::UnsupportedPaymentMethod:
        Found invalid payment type 'Spree::PaymentMethod::BogusCreditCard'.
        This may happen after switching payment service provider, when payment methods reference old types that are not supported any more.
        If that is the case, consider running 'rake payment_method:deprecate_unsupported_payment_methods' to fix the issue.

Factories?

  3) apply_coupon_code when current order isn't completed and the current ability is authorized and the given coupon code is applicable
     Failure/Error: handler = Spree::PromotionHandler::Coupon.new(current_order).apply

     ActiveRecord::SubclassNotFound:
       Invalid single-table inheritance type: Spree::Calculator::FlatRate is not a subclass of Spree::Calculator

@stale
Copy link

stale bot commented Nov 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant