Closed GustavoCaso closed 6 years ago
Tim regarding the building of full subscriber implementation I think it was because how dry-events gets the method by the subscriber class using the method
https://github.com/dry-rb/dry-events/blob/master/lib/dry/events/bus.rb#L55. I guess with that implementation the use of spy could not be possible. Maybe I'm wrong. Unfortunately, I'm not on the computer at the moment
@GustavoCaso Ah right, this makes sense, then :)
@timriley WDYT? Are you ok merging this one? I have one last concern should we include in this PR making broadcast value consistent?
Including the value in this one.
publish(:step_succeeded, step_name: step_name, args: args)
@GustavoCaso Yeah, I reckon go ahead and put the value: there
This PR replace the gem wisper that we currently use for subscribing functionality with the new
dry-events
library 🎉 🎉This change introduces two breaking changes in the library.
The subscriber class has to respond to the methods
on_step
,on_step_succedd
andon_step_failed
The subscriber method will receive an instance of
Dry::Events::Event
with all the information. This is a breaking change because they will have to access the data with the bracket notation[]
I didn't want to make any assumptions about what would be the best arguments for each event, since there is a PR of @timriley https://github.com/dry-rb/dry-transaction/pull/88 that cover that topic.