0.0
Low commit activity in last 3 years
No release in over a year
Engine for mailgun hooks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

MailgunCatcher

Catch mailgun events and report to bugsnag

Usage

Add this line to your application's Gemfile:

gem 'mailgun_catcher'

And then execute:

$ bundle

Add to routes:

mount MailgunCatcher::Engine, at: "/mailgun_catcher"

To configure an exact path for the webhooks controller create an initializer (mailgun_catcher.rb) with the following content:

MailgunCatcher::Engine.config.webhooks_path = 'custom_path'

This will allow you change the default webhook route from /webhooks to /custom_path.

Configure webhook on mailgun:

Notifiers

Library supports event dispatching via notifier. Notifier is any object that responds to notify message. By default, events are notified on Bugsnag service, but you can provide your own notifier implementation by configuring MailgunCatcher.config.notifier.

Configuring custom notifier

class MailgunNotifier
  def notify(event)
    puts event
  end
end

register custom notifier implementation through initializer

MailgunCatcher.setup do |config|
  config.notifiers = ["MailgunCatcher::Notifier::Bugsnag", "MailgunNotifier"]
end

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.