notify-on-error 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/application_controller.rb +13 -12
  2. metadata +3 -3
@@ -9,19 +9,20 @@ module NotifyOnError
9
9
  Rails.logger.error( "Exception found #{ex.exception}")
10
10
  Rails.logger.error( "Parameters #{params.inspect}")
11
11
  Rails.logger.error( ex.backtrace.join("\n") )
12
- unless NotifyOnError.notification_environments.map(&:to_s).include?( Rails.env )
13
- Rails.logger.error( "Supressing notification because of environment(#{Rails.env})" )
14
- return
15
- end
16
-
17
- case NotifyOnError.notification_method
18
- when :action_mailer
19
- Rails.logger.error( "Notify via ActionMailer" )
20
- ErrorMailer.exception_email(ex).deliver
12
+ if NotifyOnError.notification_environments.map(&:to_s).include?( Rails.env )
13
+ case NotifyOnError.notification_method
14
+ when :action_mailer
15
+ Rails.logger.error( "Notify via ActionMailer" )
16
+ ErrorMailer.exception_email(ex).deliver
17
+ else
18
+ Rails.logger.error( "Unrecognized notification method(#{NotifyOnError.notification_method})" )
19
+ end #case
21
20
  else
22
- Rails.logger.error( "Unrecognized notification method(#{NotifyOnError.notification_method})" )
23
- end
24
- end
21
+ Rails.logger.error( "Suppressing notification because of environment(#{Rails.env})" )
22
+ end
23
+
24
+ render :status => 500
25
+ end #rescue
25
26
  end
26
27
 
27
28
  module InstanceMethods
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Santa Clara
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-12 00:00:00 -04:00
17
+ date: 2011-08-16 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20