Add Solidus 4 support#39
Conversation
1057d24 to
62461dd
Compare
|
Aware I still have a failure here |
62461dd to
fb1d3c9
Compare
147be7e to
ecfc13a
Compare
4787dab to
b833477
Compare
046fd7c to
45f59d6
Compare
45f59d6 to
3213c0f
Compare
3213c0f to
55f994a
Compare
| spec.require_paths = ["lib"] | ||
|
|
||
| spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 4'] | ||
| spec.add_dependency 'solidus_core', ['>= 4.0.0', '< 4.6'] |
There was a problem hiding this comment.
Can you add something in this commit about why we don't support 4.6/main?
| # Provides basic authentication functionality for testing parts of your engine | ||
| gem 'solidus_auth_devise' | ||
|
|
||
| gem 'state_machines', '0.6.0' |
There was a problem hiding this comment.
Can you reference the issue so we have some more context on what this is fixing?
There was a problem hiding this comment.
FYI this is the issue I mean solidusio/solidus#6326
|
A little more context needed in a couple places but this looks good as long as tests are passing locally. |
55f994a to
24aa010
Compare
|
I am happy to pull out the final commit for moving Ci -> github actions and PR it separately if it is preferred. @jarednorman I think I'll need you to update the repo to work with github actions. I took the test workflow from here but I won't know if it's working until the repo attempts to run it. |
|
@kjriga If you pull the GitHub Action commit out into its own PR, I'll merge that and it'll get the CI to start running. You'll have to fix any issues with it in a separate PR. |
149a0dd to
0b06fbd
Compare
|
I've just disabled the CircleCI builds, but it looks like the GitHub builds are busted. Edit: I see you are working on that in #42. |
We want to support Solidus 4 to 4.5. I stopped at 4.5 because there are changes in 4.6+ with some 'disable_builtin_emails' configuration that required more work, so I think a plan to move forward is to make the current gemspec only allow '>= 4.0.0', '< 4.6', and add some deprecation warnings about that feature becoming obsolete. Then have a new version that's '>= 4.6.0', '<5.0' that removes it all. I am doing this work specifically to bump another app that uses it to Solidus 4, and that is my priority at the moment.
- Update method name from order_finalized to send_confirmation_email - Change target class from Spree::MailerSubscriber to Spree::OrderMailerSubscriber - Remove version conditional since gem now only supports Solidus 4+
No longer required with Solidus 4+. The method it is overriding doesn't exist anymore.
- Add the requirement of open struct now that it isn't automatically included - Change expectations to account for changes with how state changes are handled in background jobs. solidusio/solidus@2a2df71 - Replace build_stubbed with just build, some objects were missing fields - Since we removed the requirement for solidus_frontend from this gem, we don't care about the reset password email sending so we can just stub it out
Similar to the confirm email, we need this to respect the 'disable_builtin_emails' value.
b44a1d6 to
c80f7aa
Compare
Now that we're only supporting Solidus v4.0-4.5 with these changes, we need to tweak our testing matrix. Also, we were missing some configuration in order for our Github action environment variables to be able to pull the correct versions of Rails and Solidus.
At some point in Rails 7.1+, the dummy app generation changed such that it no longer would fully setup the database for us. All of our other extensions seem to have avoided this issue because they all contain some migrations and run them as part of their install steps. So, even though we don't currently add any migrations from this extension, we're adding the step so that our CI can correctly setup the test database.
We're cutting off support for older versions of Solidus so we should do a major version bump. (Even if it appears we have never changed the version of this extension since inception.)
We're no longer using CircleCI for tests, so we should switch the badge to something more useful.
forkata
left a comment
There was a problem hiding this comment.
Great work on these changes @kjriga and @adammathys 🎉
This adds Solidus 4 support while maintaining backwards compatibility.
Specs are passing locally.