osem-fcy/config/initializers/hoptoad.rb

25 lines
703 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 = Rails.application.secrets.errbit_key || ''
config.host = CONFIG['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
config.ignore_only = %w{
Some::ExceptionName
}
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