Sha256: 39d4ace37ce8617ed826b5894428624d38294b25a9833779dcd3fad39a5d00b9

Contents?: true

Size: 381 Bytes

Versions: 14

Compression:

Stored size: 381 Bytes

Contents

# frozen_string_literal: true

module JunkDrawer
  class Notifier

    # Notifier strategy to send a notification to Honeybadger
    class HoneybadgerStrategy

      include Callable

      def call(message, **context)
        error = message.is_a?(Exception) ? message : NotifierError.new(message)
        Honeybadger.notify(error, context: context)
      end

    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
junk_drawer-2.1.2 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-2.1.1 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-2.1.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-2.0.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.8.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.7.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.6.3 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.6.2 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.6.1 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.6.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.5.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.4.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.3.0 lib/junk_drawer/notifier/honeybadger_strategy.rb
junk_drawer-1.2.1 lib/junk_drawer/notifier/honeybadger_strategy.rb