auto_error 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c87a8b860b9e9e023754346b3b0c23ba498bdb8
|
4
|
+
data.tar.gz: 6cc5dd2ee9158765b117ed298d08e094dd2ddfd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea02f27b8cff880391cbc5f670e8fc1c786f9eb6cc7d1e8e9c486a06705f476e67acb5cac4fe9d742ac7dfa5790800bedc8e320bae4efbf84b802de5e34f800
|
7
|
+
data.tar.gz: 0eb4ab10eb716d09a3cf09c7ee6a05c89c0b62e73d9301e389a0bf0df323ff11f4533ddc8010ad1eb8bf7b8ab1359771c928e35b5fc3e7cbb4187a7a68a957e7
|
@@ -33,7 +33,8 @@ class AutoError::ErrorsController < AutoError::ApplicationController
|
|
33
33
|
AutoError::AppError.log!( env, @exception, where, data )
|
34
34
|
end
|
35
35
|
|
36
|
-
AutoError::Config.error_template_renderer
|
36
|
+
instance_exec( *[@status_code], &AutoError::Config.error_template_renderer )
|
37
|
+
|
37
38
|
rescue => explosion
|
38
39
|
Rails.logger.error "\nAutoError exploded while handling an exception: #{@exception.inspect}\nHere's the error: #{explosion.inspect}\n"
|
39
40
|
end
|
@@ -6,8 +6,8 @@ module AutoError
|
|
6
6
|
next if v.nil?
|
7
7
|
k = k.to_sym
|
8
8
|
if k != :params || AutoError::Config.data_handlers.has_key?(k)
|
9
|
-
handler = AutoError::Config.data_handlers[k]
|
10
|
-
processed =
|
9
|
+
handler = AutoError::Config.data_handlers[k]
|
10
|
+
processed = context.instance_exec( *[v], &handler )
|
11
11
|
elsif k == :params
|
12
12
|
processed = handle_params(v)
|
13
13
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
module AutoError
|
2
2
|
class AppError < ActiveRecord::Base
|
3
|
-
attr_accessible *%w{ controller action data klass message backtrace }
|
4
|
-
|
5
3
|
before_create :generate_group
|
6
4
|
|
7
5
|
serialize :data
|
@@ -48,14 +46,15 @@ module AutoError
|
|
48
46
|
|
49
47
|
def self.send_email!( env, exception, data )
|
50
48
|
options = env['exception_notifier.options'] || {}
|
51
|
-
options[:ignore_exceptions] ||= ExceptionNotifier.
|
49
|
+
options[:ignore_exceptions] ||= ExceptionNotifier.ignored_exceptions
|
52
50
|
options[:email_prefix] ||= "[#{Rails.application.class.name.split('::').first} ERROR] "
|
53
51
|
options[:exception_recipients] = AutoError::Config.email_on_error
|
54
52
|
options[:sender_address] = AutoError::Config.email_sender
|
55
53
|
options[:data] = data
|
54
|
+
options[:env] = env
|
56
55
|
|
57
56
|
unless Array.wrap(options[:ignore_exceptions]).include?( exception.class )
|
58
|
-
ExceptionNotifier
|
57
|
+
ExceptionNotifier.notify_exception( exception, options )
|
59
58
|
env['exception_notifier.delivered'] = true
|
60
59
|
end
|
61
60
|
end
|
data/lib/auto_error/config.rb
CHANGED
@@ -34,6 +34,7 @@ module AutoError
|
|
34
34
|
|
35
35
|
config.email_sender = %{"Notifier" notifications@example.com}
|
36
36
|
config.email_on_error = []
|
37
|
+
ExceptionNotifier.add_notifier :email, {}
|
37
38
|
# ExceptionNotifier::Notifier.prepend_view_path(
|
38
39
|
# AutoError::Engine.root.join( *%w{app views auto_error} )
|
39
40
|
# )
|
data/lib/auto_error/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_error
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Funduk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -220,7 +220,7 @@ dependencies:
|
|
220
220
|
- - '>='
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
|
-
description: "\n AutoError is a mountable engine for Rails
|
223
|
+
description: "\n AutoError is a mountable engine for Rails 4.0+ which provides\n
|
224
224
|
\ an 'exceptions_app' which helps you catch exceptions (showing\n the appropriate
|
225
225
|
page to users) and an interface you can mount\n in your admin panel to display
|
226
226
|
those errors.\n "
|
@@ -299,3 +299,4 @@ signing_key:
|
|
299
299
|
specification_version: 4
|
300
300
|
summary: A rails engine for in-app exception handling.
|
301
301
|
test_files: []
|
302
|
+
has_rdoc:
|