Sha256: 37d6c38c8d7118d204f4a823bc2388dd8abdf3aabe2f402c3aa0b1f614360ffb

Contents?: true

Size: 1.84 KB

Versions: 12

Compression:

Stored size: 1.84 KB

Contents

require 'exception_notification/rails'
<% if options.sidekiq? %>
require 'exception_notification/sidekiq'
<% end %>
<% if options.resque? %>
require 'resque/failure/multiple'
require 'resque/failure/redis'
require 'exception_notification/resque'

Resque::Failure::Multiple.classes = [Resque::Failure::Redis, ExceptionNotification::Resque]
Resque::Failure.backend = Resque::Failure::Multiple
<% end %>

ExceptionNotification.configure do |config|
  # Ignore additional exception types.
  # ActiveRecord::RecordNotFound, AbstractController::ActionNotFound and ActionController::RoutingError are already added.
  # config.ignored_exceptions += %w{ActionView::TemplateError CustomError}

  # Adds a condition to decide when an exception must be ignored or not.
  # The ignore_if method can be invoked multiple times to add extra conditions.
  # config.ignore_if do |exception, options|
  #   not Rails.env.production?
  # end

  # Notifiers =================================================================

  # Email notifier sends notifications by email.
  config.add_notifier :email, {
    :email_prefix         => "[ERROR] ",
    :sender_address       => %{"Notifier" <notifier@example.com>},
    :exception_recipients => %w{exceptions@example.com}
  }

  # Campfire notifier sends notifications to your Campfire room. Requires 'tinder' gem.
  # config.add_notifier :campfire, {
  #   :subdomain => 'my_subdomain',
  #   :token => 'my_token',
  #   :room_name => 'my_room'
  # }

  # HipChat notifier sends notifications to your HipChat room. Requires 'hipchat' gem.
  # config.add_notifier :hipchat, {
  #   :api_token => 'my_token',
  #   :room_name => 'my_room'
  # }

  # Webhook notifier sends notifications over HTTP protocol. Requires 'httparty' gem.
  # config.add_notifier :webhook, {
  #   :url => 'http://example.com:5555/hubot/path',
  #   :http_method => :post
  # }

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
exception_notification-4.2.0 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.2.0.rc1 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification_more_info-1.0.1 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification_more_info-1.0.0 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.4 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.3 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.2 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.1 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.0 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.0.rc2 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.1.0.rc1 lib/generators/exception_notification/templates/exception_notification.rb
exception_notification-4.0.1 lib/generators/exception_notification/templates/exception_notification.rb