Permalink
Browse files

Adding Exception notifications.

  • Loading branch information...
1 parent b3506b2 commit ed55ad0d1596865e58fd6c4c6b1b385dd7694ff2 Kale Worsley committed May 3, 2012
Showing with 12 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +5 −0 config/config.yml.example
  3. +6 −0 config/environment.rb
View
@@ -45,6 +45,7 @@ gem "ts-delayed-delta", "1.1.1", :require => "thinking_sphinx/deltas/de
gem "tzinfo", "0.3.30"
gem "will_paginate", "2.3.15"
gem "xml-simple", "1.0.12", :require => "xmlsimple", :path => 'vendor/gems/xml-simple-1.0.12'
+gem "exception_notification", "~> 2.3.3.0"
gem "foreman"
gem "machinist", "1.0.6"
@@ -68,6 +68,11 @@ base: &base
#http://www.flickr.com/services/api/keys/apply/
FLICKR_API_KEY: 09af09af09af09af09af09af09af09af
FLICKR_SHARED_SECRET: 09af09af09af09af
+ exception_notifications: true
+ exception_recipients:
+ - dev1@example.com
+ - dev2@example.com
+ - dev3@example.com
development:
<<: *base
View
@@ -151,3 +151,9 @@
# Set the priority time zones for the time zone select lists
PRIORITY_ZONES = ActiveSupport::TimeZone.all.find_all { |z| z.name =~ %r{#{INAT_CONFIG['general']['priority_zones'].join('|')}} }
+# Exception notifications
+if INAT_CONFIG['exception_notifications']
+ ExceptionNotification::Notifier.exception_recipients = INAT_CONFIG['exception_recipients']
+ ExceptionNotification::Notifier.sender_address = %("#{SITE_NAME} Application Error" <#{INAT_CONFIG['noreply_email']}>)
+ ExceptionNotification::Notifier.email_prefix = "[#{SITE_NAME} Error] "
+end

0 comments on commit ed55ad0

Please sign in to comment.