xaop-exception_notification 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +6 -0
- data/lib/exception_notifier.rb +3 -2
- metadata +34 -34
data/README
CHANGED
@@ -59,6 +59,12 @@ In the above case, @document and @person would be made available to the email
|
|
59
59
|
renderer, allowing your new section(s) to access and display them. See the
|
60
60
|
existing sections defined by the plugin for examples of how to write your own.
|
61
61
|
|
62
|
+
=== Setting View Path for Custom Sections
|
63
|
+
|
64
|
+
By default the ExceptionNotifier only looks in its own view path. You can add the Rails view path with the following code.
|
65
|
+
|
66
|
+
ExceptionNotifier::Notifier.append_view_path "#{Rails.root}/app/views"
|
67
|
+
|
62
68
|
== Notification
|
63
69
|
|
64
70
|
After an exception notification has been delivered the rack environment variable
|
data/lib/exception_notifier.rb
CHANGED
@@ -16,10 +16,11 @@ class ExceptionNotifier
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(env)
|
19
|
+
env["exception_notifier.options"] ||= {}
|
20
|
+
env["exception_notifier.options"].merge!(@options)
|
19
21
|
@app.call(env)
|
20
22
|
rescue Exception => exception
|
21
|
-
options =
|
22
|
-
options.reverse_merge!(@options)
|
23
|
+
options = env['exception_notifier.options']
|
23
24
|
|
24
25
|
unless Array.wrap(options[:ignore_exceptions]).include?(exception.class)
|
25
26
|
Notifier.exception_notification(env, exception).deliver
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xaop-exception_notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 23
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
version: 1.0.
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 1.0.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
|
-
- Jamis Buck
|
14
|
-
- Josh Peek
|
12
|
+
- Jamis Buck
|
13
|
+
- Josh Peek
|
14
|
+
- Joeri Samson
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
@@ -20,7 +20,11 @@ date: 2010-03-13 00:00:00 +01:00
|
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|
23
|
-
description:
|
23
|
+
description: |-
|
24
|
+
This gem differs from the exception_notifier gem in 3 ways:
|
25
|
+
a) It actually works, because the latest commits on from the github rails/exception_notification repository are incorporated
|
26
|
+
b) The name of the gem is closer to the name of the github repository (hopefully causing less confusion)
|
27
|
+
c) The options to the middleware are stored in the Rack env, meaning you can send exception notifications from your own code after catching an exception, while still sending back a response to the user (probably mainly useful with Ajax requests)
|
24
28
|
email: timocratic@gmail.com
|
25
29
|
executables: []
|
26
30
|
|
@@ -29,15 +33,15 @@ extensions: []
|
|
29
33
|
extra_rdoc_files: []
|
30
34
|
|
31
35
|
files:
|
32
|
-
- README
|
33
|
-
- lib/exception_notifier
|
34
|
-
- lib/exception_notifier/
|
35
|
-
- lib/exception_notifier/views/exception_notifier/
|
36
|
-
- lib/exception_notifier/views/exception_notifier/_request.text.erb
|
37
|
-
- lib/exception_notifier/views/exception_notifier/_session.text.erb
|
38
|
-
- lib/exception_notifier/views/exception_notifier/
|
39
|
-
- lib/exception_notifier/views/exception_notifier/
|
40
|
-
- lib/exception_notifier.
|
36
|
+
- README
|
37
|
+
- lib/exception_notifier.rb
|
38
|
+
- lib/exception_notifier/notifier.rb
|
39
|
+
- lib/exception_notifier/views/exception_notifier/_title.text.erb
|
40
|
+
- lib/exception_notifier/views/exception_notifier/_request.text.erb
|
41
|
+
- lib/exception_notifier/views/exception_notifier/_session.text.erb
|
42
|
+
- lib/exception_notifier/views/exception_notifier/exception_notification.text.erb
|
43
|
+
- lib/exception_notifier/views/exception_notifier/_environment.text.erb
|
44
|
+
- lib/exception_notifier/views/exception_notifier/_backtrace.text.erb
|
41
45
|
has_rdoc: true
|
42
46
|
homepage:
|
43
47
|
licenses: []
|
@@ -46,31 +50,27 @@ post_install_message:
|
|
46
50
|
rdoc_options: []
|
47
51
|
|
48
52
|
require_paths:
|
49
|
-
- lib
|
53
|
+
- lib
|
50
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
55
|
requirements:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
version: "0"
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
59
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
62
|
requirements:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
version: "0"
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
68
|
requirements: []
|
69
69
|
|
70
70
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.3.
|
71
|
+
rubygems_version: 1.3.6
|
72
72
|
signing_key:
|
73
73
|
specification_version: 3
|
74
|
-
summary: Exception notification by email for Rails apps
|
74
|
+
summary: Exception notification by email for Rails 3 apps
|
75
75
|
test_files: []
|
76
76
|
|