honeybadger-io / honeybadger-ruby

Ruby gem for reporting errors to honeybadger.io
https://docs.honeybadger.io/lib/ruby/
MIT License
251 stars 145 forks source link

fix: don't run middleware in Sinatra when not configured #629

Closed tadast closed 3 weeks ago

tadast commented 3 weeks ago

While #549 has removed middleware loading for Rails unless configured, it has also removed the code that prevented the middleware from executing in other frameworks unless configured i.e. return @app.call(env) unless config[:FLAG].

A similar change to rails initializer in #549 is now also required for Sinatra (perhaps the same for Hanami?), because currently it loads and executes the feedback and user informer middleware even when they are not configured.

tadast commented 3 weeks ago

Not sure why the tests are failing, they're failing for me on master too...

roelbondoc commented 3 weeks ago

Not sure why the tests are failing, they're failing for me on master too...

@tadast thanks for this. I've updated master to fix those broken tests. If you are able, could you merge in the latest changes from our master branch into yours? Once the tests pass we can merge this in.

tadast commented 3 weeks ago

Nice one, looking green now @roelbondoc Thanks