osem-fcy/config/initializers/hoptoad.rb

30 lines
925 B
Ruby
Raw Normal View History

2014-04-11 12:32:15 +02:00
HoptoadNotifier.configure do |config|
# Change this to some sensible data for your errbit instance
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?
config.development_environments = 'production development test'
2014-04-11 12:32:15 +02:00
else
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
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