Sha256: a3d19d37aa887156b82a585932e2d1856024e90faa55d653f437294efe565727

Contents?: true

Size: 604 Bytes

Versions: 15

Compression:

Stored size: 604 Bytes

Contents

require 'mailman'

module Bugsnag
  class Mailman
    def call(mail)
      begin

        Bugsnag.set_request_data :mailman_msg, mail.to_s

        yield
      rescue Exception => ex
        raise ex if [Interrupt, SystemExit, SignalException].include? ex.class
        Bugsnag.auto_notify(ex)
        raise
      ensure
        Bugsnag.clear_request_data
      end
    end
  end
end


if Mailman.config.respond_to?(:middleware)
  Mailman.config.middleware.add ::Bugsnag::Mailman
end

Bugsnag.configuration.internal_middleware.use(Bugsnag::Middleware::Mailman)
Bugsnag.configuration.app_type = "mailman"

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
bugsnag-4.2.1 lib/bugsnag/mailman.rb
bugsnag-4.2.0 lib/bugsnag/mailman.rb
bugsnag-4.1.0 lib/bugsnag/mailman.rb
bugsnag-4.0.2 lib/bugsnag/mailman.rb
bugsnag-4.0.1 lib/bugsnag/mailman.rb
bugsnag-4.0.0 lib/bugsnag/mailman.rb
bugsnag-3.0.0 lib/bugsnag/mailman.rb
bugsnag-2.8.13 lib/bugsnag/mailman.rb
bugsnag-maglev--2.8.12 lib/bugsnag/mailman.rb
bugsnag-2.8.12 lib/bugsnag/mailman.rb
bugsnag-2.8.11 lib/bugsnag/mailman.rb
bugsnag-2.8.10 lib/bugsnag/mailman.rb
bugsnag-2.8.9 lib/bugsnag/mailman.rb
bugsnag-2.8.8 lib/bugsnag/mailman.rb
bugsnag-2.8.7 lib/bugsnag/mailman.rb