integrallis / stripe_event

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

Ruby >= 2.7 deprecation warning #129

Closed nfm closed 4 years ago

nfm commented 4 years ago

Since upgrading Ruby to 2.7.0, I'm getting a deprecation warning when stripe_event is required. Here's some background reading on this deprecation.

vendor/bundle/ruby/2.7.0/gems/stripe_event-2.3.0/lib/stripe_event.rb:21: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead

Here's the relevant line:

    def subscribe(name, callable = Proc.new)

It looks like all has the same method signature:

    def all(callable = Proc.new)

I'm not sure what the best fix is, happy to dig in and submit a PR but thought I'd at least open an issue so this is tracked somewhere :heart: