solidus_graphql_api
solidus_graphql_api copied to clipboard
Latest Solidus, Rails 7 and Ruby 3+ support
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 = falsein test.rb - change
statesRequiredtotruefor expectations - add
mount_enginetoinstall_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
- [x] add
libvips-devas 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
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.