exception_handling 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +47 -2
- data/README.md +109 -0
- data/Rakefile +12 -4
- data/exception_handling.gemspec +23 -19
- data/lib/exception_handling/log_stub_error.rb +84 -0
- data/lib/{exception_handling_mailer.rb → exception_handling/mailer.rb} +1 -1
- data/lib/exception_handling/methods.rb +69 -0
- data/lib/exception_handling/testing.rb +65 -0
- data/lib/exception_handling/version.rb +1 -1
- data/lib/exception_handling.rb +127 -91
- data/test/test_helper.rb +55 -2
- data/test/unit/exception_handling/log_error_stub_test.rb +83 -0
- data/test/unit/exception_handling/mailer_test.rb +79 -0
- data/test/unit/exception_handling/methods_test.rb +59 -0
- data/test/unit/exception_handling_test.rb +717 -0
- data/views/exception_handling/mailer/exception_notification.html.erb +4 -1
- metadata +62 -13
- data/README +0 -1
- data/test/exception_handling_test.rb +0 -977
- data/test/mocha_patch.rb +0 -63
@@ -13,6 +13,9 @@
|
|
13
13
|
|
14
14
|
<b>Error #:</b> <%= @cleaned_data[:timestamp] -%><br />
|
15
15
|
<b>Server:</b> <%= @cleaned_data[:server].presence || '<i>hostname not set</i>'.html_safe -%><br />
|
16
|
+
<% if @cleaned_data[:scm_revision] %>
|
17
|
+
<b>Revision:</b> <%= @cleaned_data[:scm_revision] %><br />
|
18
|
+
<% end %>
|
16
19
|
|
17
20
|
<b>URL:</b><br />
|
18
21
|
<% if (request = @cleaned_data[:request]) %>
|
@@ -27,7 +30,7 @@
|
|
27
30
|
<b>User summary:</b><br />
|
28
31
|
<% if (user_details = @cleaned_data[:user_details]) && ( user_details[:user] || user_details[:organization] ) %>
|
29
32
|
User: <%= user_details[:user] %> (<%= user_details[:username] %>)<br />
|
30
|
-
Organization: <%= user_details[:organization] %> <br />
|
33
|
+
Organization: <%= h(user_details[:organization]).gsub("\n","<br/>\n").gsub(/ {2,}/) { |spaces| ' '*spaces.size }.html_safe %> <br />
|
31
34
|
|
32
35
|
<% if user_details[:impersonated_organization] %>
|
33
36
|
<br />
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exception_handling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin Kelley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: invoca-utils
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.0.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.0.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: hobo_support
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,19 +123,33 @@ dependencies:
|
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: 3.1.1
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
126
|
+
name: rr
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- -
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0
|
131
|
+
version: '0'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- -
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
109
151
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0
|
152
|
+
version: '0'
|
111
153
|
description: Exception handling logger/emailer
|
112
154
|
email:
|
113
155
|
- colindkelley@gmail.com
|
@@ -120,16 +162,21 @@ files:
|
|
120
162
|
- Gemfile
|
121
163
|
- Gemfile.lock
|
122
164
|
- LICENSE
|
123
|
-
- README
|
165
|
+
- README.md
|
124
166
|
- Rakefile
|
125
167
|
- config/exception_filters.yml
|
126
168
|
- exception_handling.gemspec
|
127
169
|
- lib/exception_handling.rb
|
170
|
+
- lib/exception_handling/log_stub_error.rb
|
171
|
+
- lib/exception_handling/mailer.rb
|
172
|
+
- lib/exception_handling/methods.rb
|
173
|
+
- lib/exception_handling/testing.rb
|
128
174
|
- lib/exception_handling/version.rb
|
129
|
-
- lib/exception_handling_mailer.rb
|
130
|
-
- test/exception_handling_test.rb
|
131
|
-
- test/mocha_patch.rb
|
132
175
|
- test/test_helper.rb
|
176
|
+
- test/unit/exception_handling/log_error_stub_test.rb
|
177
|
+
- test/unit/exception_handling/mailer_test.rb
|
178
|
+
- test/unit/exception_handling/methods_test.rb
|
179
|
+
- test/unit/exception_handling_test.rb
|
133
180
|
- views/exception_handling/mailer/escalation_notification.html.erb
|
134
181
|
- views/exception_handling/mailer/exception_notification.html.erb
|
135
182
|
- views/exception_handling/mailer/log_parser_exception_notification.html.erb
|
@@ -158,6 +205,8 @@ specification_version: 4
|
|
158
205
|
summary: Invoca's exception handling logger/emailer layer, based on exception_notifier.
|
159
206
|
Works with Rails or EventMachine or EventMachine+Synchrony.
|
160
207
|
test_files:
|
161
|
-
- test/exception_handling_test.rb
|
162
|
-
- test/mocha_patch.rb
|
163
208
|
- test/test_helper.rb
|
209
|
+
- test/unit/exception_handling/log_error_stub_test.rb
|
210
|
+
- test/unit/exception_handling/mailer_test.rb
|
211
|
+
- test/unit/exception_handling/methods_test.rb
|
212
|
+
- test/unit/exception_handling_test.rb
|
data/README
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
exception_handling gem
|