2014-04-11 12:32:15 +02:00
|
|
|
HoptoadNotifier.configure do |config|
|
|
|
|
|
# Change this to some sensible data for your errbit instance
|
2016-03-22 18:14:40 +01:00
|
|
|
config.api_key = ENV['OSEM_ERRBIT_APIKEY'] || Rails.application.secrets.errbit_key || ''
|
|
|
|
|
config.host = ENV['OSEM_ERRBIT_HOST']
|
2014-04-11 12:32:15 +02:00
|
|
|
if config.api_key.blank? || config.host.blank?
|
2014-05-12 18:32:26 +02:00
|
|
|
config.development_environments = 'production development test'
|
2014-04-11 12:32:15 +02:00
|
|
|
else
|
2014-05-12 18:32:26 +02:00
|
|
|
config.development_environments = 'development test'
|
2014-04-11 12:32:15 +02:00
|
|
|
end
|
|
|
|
|
|
2014-07-17 10:19:13 +02:00
|
|
|
config.ignore_only = %w{
|
2014-07-23 15:51:35 +02:00
|
|
|
ActiveRecord::RecordNotFound
|
|
|
|
|
ActionController::InvalidAuthenticityToken
|
|
|
|
|
ActionController::UnknownAction
|
|
|
|
|
AbstractController::ActionNotFound
|
|
|
|
|
ActionView::MissingTemplate
|
|
|
|
|
ActionController::UnknownFormat
|
2014-04-11 12:32:15 +02:00
|
|
|
}
|
2014-07-17 10:19:13 +02:00
|
|
|
|
2014-04-11 12:32:15 +02:00
|
|
|
config.ignore_by_filter do |exception_data|
|
|
|
|
|
ret=false
|
2014-05-12 18:32:26 +02:00
|
|
|
if exception_data[:error_class] == 'ActionController::RoutingError'
|
2014-04-11 12:32:15 +02:00
|
|
|
message = exception_data[:error_message]
|
|
|
|
|
ret=true if message =~ %r{\[GET\]}
|
|
|
|
|
end
|
|
|
|
|
ret
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|