-
Notifications
You must be signed in to change notification settings - Fork 12
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 extension for new Omnes event 🚌 #193
Conversation
app/subscribers/super_good/solidus_taxjar/spree/reporting_subscriber.rb
Outdated
Show resolved
Hide resolved
app/subscribers/super_good/solidus_taxjar/spree/reporting_subscriber.rb
Outdated
Show resolved
Hide resolved
6d7fe01
to
ccafe94
Compare
61e13a6
to
e9cb906
Compare
app/overrides/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb
Show resolved
Hide resolved
Converting this to a draft as me and @Noah-Silvera discovered an issue with the |
936116e
to
25902c5
Compare
5862053
to
f0725ff
Compare
f0725ff
to
1b1e171
Compare
1b1e171
to
941a7fd
Compare
The specs here were specific to the legacy implementation of the event system, and therefore no longer pass on the `master` branch of Solidus where we now use a [new implementation of the event bus](solidusio/solidus#4342). This change attempts to refactor the tests to focus on observing the side-effects of the object under test which should be independent of the underlying implementation. This test is valuable regardless of what version of Solidus we are running against as our extension relies on the event being published when a specific action happens and that the payload contains the necessary object. Co-authored-by: Andrew Stewart <andrew@super.gd>
This change attempts to introduce a backwards compatible way for registering and publishing events on the new Omnes event bus introduced in Solidus. A few of the issues this change resolves are * auto-loading of subscribers is not a feature of the event bus anymore and we need to explicitly register subscribers with the event bus * firing of events in tests was done in a manner not forward compatible with the new event bus, so we now leverage the compatibility layer provided by `solidus_support` * custom events now need to be registered in an initializer and use symbol for the event name instead of strings
We are now using the compatibility layer for the event system which was introduced in 0.9.0.
This change uses the compatibility layer provided by `solidus_support` to fire the `shipment_shipped` event we have introduced in this extension in a way that works with the new `Omnes` event bus. This will ensure that this continues to work with versions of Solidus >= 3.2.0. Co-authored-by: Noah Silvera <noah@super.gd>
Documents the fact that we now require a newer version of `solidus_support` which in turn requires a newer Rails version.
941a7fd
to
4de6296
Compare
@Noah-Silvera, @benjaminwil and I confirmed the issue with Solidus 3.2 is present upstream as well so not related to the changes merged here. I will work on manually setting up a working sandbox on that version of Solidus so we can verify the new behaviour introduced here. |
What is the goal of this PR?
Get tests passing against Solidus
master
.Update the way we use the Solidus event bus to be forwards compatible with the new Omens bus implementation that is now default in Solidus "=> 3.2.0.alpha" - solidusio/solidus#4342
Additional information on updating to the new event bus implementation - solidusio/solidus#4380
How do you manually test these changes?
master
Merge Checklist