integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
841 stars 107 forks source link

Can I use stripe_event in multiple gems? #52

Closed yas4891 closed 9 years ago

yas4891 commented 9 years ago

I want to replace the webhook management in koudoku (https://github.com/andrewculver/koudoku/) with stripe_event, but also use stripe_event in other gems that depend on koudoku (stripe_invoice and koudoku_coupons).

Is this possible? Can I have multiple initializers that subscribe to stripe_event events or will they replace each other?

peterkeen commented 9 years ago

Yep, many subscribers can all receive the same event. stripe_event uses ActiveSupport::Notifications under the hood.

yas4891 commented 9 years ago

@peterkeen Would I have to add stripe_event routes to each gem/engine or can I just implement that in koudoku and have the others pick it up?