exception_notification 4.0.0.rc1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- exception_notification (3.0.1)
4
+ exception_notification (4.0.0)
5
5
  actionmailer (>= 3.0.4)
6
6
  activesupport (>= 3.0.4)
7
7
 
data/README.md CHANGED
@@ -53,18 +53,42 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
53
53
  In order to use ExceptionNotification with Sinatra, please take a look in the [example application](https://github.com/smartinez87/exception_notification/tree/master/examples/sinatra).
54
54
 
55
55
 
56
+ ### Upgrading to 4.x version
57
+
58
+ As of 4.x version the configuration syntax has changed. All email related options MUST BE nested under the `:email` key. Thus, previous configuration like:
59
+
60
+ ```ruby
61
+ Whatever::Application.config.middleware.use ExceptionNotifier,
62
+ :email_prefix => "[Whatever] ",
63
+ :sender_address => %{"notifier" <notifier@example.com>},
64
+ :exception_recipients => %w{exceptions@example.com}
65
+ ```
66
+
67
+ becomes:
68
+
69
+ ```ruby
70
+ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
71
+ :email => {
72
+ :email_prefix => "[Whatever] ",
73
+ :sender_address => %{"notifier" <notifier@example.com>},
74
+ :exception_recipients => %w{exceptions@example.com}
75
+ }
76
+ ```
77
+
78
+ Beside that, the rack middlware was renamed to `ExceptionNotification::Rack`.
79
+
56
80
  ## Notifiers
57
81
 
58
82
  ExceptionNotification relies on notifiers to deliver notifications when errors occur in your applications. By default, three notifiers are available: [email notifier](#email-notifier), [campfire notifier](#campfire-notifier) and [webhook notifier](#webhook-notifier). But, you also can easily implement your own [custom notifier](#custom-notifier).
59
83
 
60
84
 
61
- ## Email notifier
85
+ ### Email notifier
62
86
 
63
87
  The Email notifier sends notifications by email. The notifications/emails sent includes information about the current request, session, and environment, and also gives a backtrace of the exception.
64
88
 
65
89
  After an exception notification has been delivered the rack environment variable 'exception_notifier.delivered' will be set to true.
66
90
 
67
- ### ActionMailer configuration
91
+ #### ActionMailer configuration
68
92
 
69
93
  For the email to be sent, there must be a default ActionMailer `delivery_method` setting configured. If you do not have one, you can use the following code (assuming your app server machine has `sendmail`). Depending on the environment you want ExceptionNotification to run in, put the following code in your `config/environments/production.rb` and/or `config/environments/development.rb`:
70
94
 
@@ -79,30 +103,30 @@ config.action_mailer.perform_deliveries = true
79
103
  config.action_mailer.raise_delivery_errors = true
80
104
  ```
81
105
 
82
- ### Options
106
+ #### Options
83
107
 
84
- #### sender_address
108
+ ##### sender_address
85
109
 
86
110
  *String, default: %("Exception Notifier" <exception.notifier@example.com>)*
87
111
 
88
112
  Who the message is from.
89
113
 
90
114
 
91
- #### exception_recipients
115
+ ##### exception_recipients
92
116
 
93
117
  *String/Array of strings, default: []*
94
118
 
95
119
  Who the message is destined for, can be a string of addresses, or an array of addresses.
96
120
 
97
121
 
98
- #### email_prefix
122
+ ##### email_prefix
99
123
 
100
124
  *String, default: [ERROR]*
101
125
 
102
126
  The subject's prefix of the message.
103
127
 
104
128
 
105
- #### sections
129
+ ##### sections
106
130
 
107
131
  *Array of strings, default: %w(request session environment backtrace)*
108
132
 
@@ -152,7 +176,7 @@ end
152
176
  In the above case, `@document` and `@person` would be made available to the email renderer, allowing your new section(s) to access and display them. See the existing sections defined by the plugin for examples of how to write your own.
153
177
 
154
178
 
155
- #### background_sections
179
+ ##### background_sections
156
180
 
157
181
  *Array of strings, default: %w(backtrace data)*
158
182
 
@@ -169,7 +193,7 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
169
193
  ```
170
194
 
171
195
 
172
- #### email_headers
196
+ ##### email_headers
173
197
 
174
198
  *Hash os strings, default: {}*
175
199
 
@@ -186,28 +210,28 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
186
210
  ```
187
211
 
188
212
 
189
- #### verbose_subject
213
+ ##### verbose_subject
190
214
 
191
215
  *Boolean, default: true*
192
216
 
193
217
  If enabled, include the exception message in the subject. Use `:verbose_subject => false` to exclude it.
194
218
 
195
219
 
196
- #### normalize_subject
220
+ ##### normalize_subject
197
221
 
198
222
  *Boolean, default: false*
199
223
 
200
224
  If enabled, remove numbers from subject so they thread as a single one. Use `:normalize_subject => true` to enable it.
201
225
 
202
226
 
203
- #### email_format
227
+ ##### email_format
204
228
 
205
229
  *Symbol, default: :text*
206
230
 
207
231
  By default, ExceptionNotification sends emails in plain text, in order to sends multipart notifications (aka HTML emails) use `:email_format => :html`.
208
232
 
209
233
 
210
- #### delivery_method
234
+ ##### delivery_method
211
235
 
212
236
  *Symbol, default: :smtp*
213
237
 
@@ -243,18 +267,18 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
243
267
  ```
244
268
 
245
269
 
246
- #### mailer_parent
270
+ ##### mailer_parent
247
271
 
248
272
  *String, default: ActionMailer::Base*
249
273
 
250
274
  The parent mailer which ExceptionNotification mailer inherit from.
251
275
 
252
276
 
253
- ## Campfire notifier
277
+ ### Campfire notifier
254
278
 
255
279
  This notifier sends notifications to your Campfire room.
256
280
 
257
- ### Usage
281
+ #### Usage
258
282
 
259
283
  Just add the [tinder](https://github.com/collectiveidea/tinder) gem to your `Gemfile`:
260
284
 
@@ -278,21 +302,21 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
278
302
  }
279
303
  ```
280
304
 
281
- ### Options
305
+ #### Options
282
306
 
283
- #### subdomain
307
+ ##### subdomain
284
308
 
285
309
  *String, required*
286
310
 
287
311
  Your subdomain at Campfire.
288
312
 
289
- #### room_name
313
+ ##### room_name
290
314
 
291
315
  *String, required*
292
316
 
293
317
  The Campfire room where the notifications must be published to.
294
318
 
295
- #### token
319
+ ##### token
296
320
 
297
321
  *String, required*
298
322
 
@@ -302,11 +326,11 @@ The API token to allow access to your Campfire account.
302
326
  For more options to set Campfire, like _ssl_, check [here](https://github.com/collectiveidea/tinder/blob/master/lib/tinder/campfire.rb#L17).
303
327
 
304
328
 
305
- ## Webhook notifier
329
+ ### Webhook notifier
306
330
 
307
331
  This notifier ships notifications over the HTTP protocol.
308
332
 
309
- ### Usage
333
+ #### Usage
310
334
 
311
335
  Just add the [HTTParty](https://github.com/jnunemaker/httparty) gem to your `Gemfile`:
312
336
 
@@ -364,7 +388,7 @@ Whatever::Application.config.middleware.use ExceptionNotification::Rack,
364
388
  For more HTTParty options, check out the [documentation](https://github.com/jnunemaker/httparty).
365
389
 
366
390
 
367
- ## Custom notifier
391
+ ### Custom notifier
368
392
 
369
393
  Simply put, notifiers are objects which respond to `#call(exception, options)` method. Thus, a lambda can be used as a notifier as follow:
370
394
 
@@ -375,7 +399,7 @@ ExceptionNotifier.add_notifier :custom_notifier_name,
375
399
 
376
400
  More advanced users or third-party framework developers, also can create notifiers to be shipped in gems and take advantage of ExceptionNotification's Notifier API to standardize the [various](https://github.com/airbrake/airbrake) [solutions](https://www.honeybadger.io) [out](http://www.exceptional.io) [there](https://bugsnag.com). For this, beyond the `#call(exception, options)` method, the notifier class MUST BE defined under the ExceptionNotifier namespace and its name sufixed by `Notifier`, e.g: ExceptionNotifier::SimpleNotifier.
377
401
 
378
- ### Example
402
+ #### Example
379
403
 
380
404
  Define the custom notifier:
381
405
 
@@ -1,11 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'exception_notification'
3
- s.version = '4.0.0.rc1'
3
+ s.version = '4.0.0'
4
4
  s.authors = ["Jamis Buck", "Josh Peek"]
5
- s.date = %q{2013-06-20}
5
+ s.date = %q{2013-07-06}
6
6
  s.summary = "Exception notification for Rails apps"
7
7
  s.homepage = "http://smartinez87.github.com/exception_notification"
8
8
  s.email = "smartinez87@gmail.com"
9
+ s.license = "MIT"
9
10
 
10
11
  s.files = `git ls-files`.split("\n")
11
12
  s.test_files = `git ls-files -- test`.split("\n")
data/test/dummy/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rails', '4.0.0.rc2'
3
+ gem 'rails', '4.0.0'
4
4
 
5
5
  # Bundle edge Rails instead:
6
6
  # gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -1,39 +1,39 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- exception_notification (3.0.1)
4
+ exception_notification (4.0.0)
5
5
  actionmailer (>= 3.0.4)
6
6
  activesupport (>= 3.0.4)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.0.rc2)
12
- actionpack (= 4.0.0.rc2)
11
+ actionmailer (4.0.0)
12
+ actionpack (= 4.0.0)
13
13
  mail (~> 2.5.3)
14
- actionpack (4.0.0.rc2)
15
- activesupport (= 4.0.0.rc2)
14
+ actionpack (4.0.0)
15
+ activesupport (= 4.0.0)
16
16
  builder (~> 3.1.0)
17
17
  erubis (~> 2.7.0)
18
18
  rack (~> 1.5.2)
19
19
  rack-test (~> 0.6.2)
20
- activemodel (4.0.0.rc2)
21
- activesupport (= 4.0.0.rc2)
20
+ activemodel (4.0.0)
21
+ activesupport (= 4.0.0)
22
22
  builder (~> 3.1.0)
23
- activerecord (4.0.0.rc2)
24
- activemodel (= 4.0.0.rc2)
23
+ activerecord (4.0.0)
24
+ activemodel (= 4.0.0)
25
25
  activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.0.rc2)
26
+ activesupport (= 4.0.0)
27
27
  arel (~> 4.0.0)
28
28
  activerecord-deprecated_finders (1.0.3)
29
- activesupport (4.0.0.rc2)
29
+ activesupport (4.0.0)
30
30
  i18n (~> 0.6, >= 0.6.4)
31
31
  minitest (~> 4.2)
32
32
  multi_json (~> 1.3)
33
33
  thread_safe (~> 0.1)
34
34
  tzinfo (~> 0.3.37)
35
35
  arel (4.0.0)
36
- atomic (1.1.9)
36
+ atomic (1.1.10)
37
37
  builder (3.1.4)
38
38
  erubis (2.7.0)
39
39
  eventmachine (1.0.3)
@@ -53,7 +53,7 @@ GEM
53
53
  mime-types (~> 1.16)
54
54
  treetop (~> 1.4.8)
55
55
  mime-types (1.23)
56
- minitest (4.7.4)
56
+ minitest (4.7.5)
57
57
  multi_json (1.7.7)
58
58
  multi_xml (0.5.4)
59
59
  multipart-post (1.2.0)
@@ -61,20 +61,20 @@ GEM
61
61
  rack (1.5.2)
62
62
  rack-test (0.6.2)
63
63
  rack (>= 1.0)
64
- rails (4.0.0.rc2)
65
- actionmailer (= 4.0.0.rc2)
66
- actionpack (= 4.0.0.rc2)
67
- activerecord (= 4.0.0.rc2)
68
- activesupport (= 4.0.0.rc2)
64
+ rails (4.0.0)
65
+ actionmailer (= 4.0.0)
66
+ actionpack (= 4.0.0)
67
+ activerecord (= 4.0.0)
68
+ activesupport (= 4.0.0)
69
69
  bundler (>= 1.3.0, < 2.0)
70
- railties (= 4.0.0.rc2)
70
+ railties (= 4.0.0)
71
71
  sprockets-rails (~> 2.0.0)
72
- railties (4.0.0.rc2)
73
- actionpack (= 4.0.0.rc2)
74
- activesupport (= 4.0.0.rc2)
72
+ railties (4.0.0)
73
+ actionpack (= 4.0.0)
74
+ activesupport (= 4.0.0)
75
75
  rake (>= 0.8.7)
76
76
  thor (>= 0.18.1, < 2.0)
77
- rake (10.0.4)
77
+ rake (10.1.0)
78
78
  simple_oauth (0.1.9)
79
79
  sprockets (2.10.0)
80
80
  hike (~> 1.2)
@@ -114,6 +114,6 @@ PLATFORMS
114
114
  DEPENDENCIES
115
115
  exception_notification!
116
116
  httparty
117
- rails (= 4.0.0.rc2)
117
+ rails (= 4.0.0)
118
118
  sqlite3
119
119
  tinder
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc1
5
- prerelease: 6
4
+ version: 4.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jamis Buck
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-20 00:00:00.000000000 Z
13
+ date: 2013-07-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionmailer
@@ -303,7 +303,8 @@ files:
303
303
  - test/exception_notifier_test.rb
304
304
  - test/test_helper.rb
305
305
  homepage: http://smartinez87.github.com/exception_notification
306
- licenses: []
306
+ licenses:
307
+ - MIT
307
308
  post_install_message:
308
309
  rdoc_options: []
309
310
  require_paths:
@@ -314,12 +315,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
315
  - - ! '>='
315
316
  - !ruby/object:Gem::Version
316
317
  version: '0'
318
+ segments:
319
+ - 0
320
+ hash: -2589511577649954983
317
321
  required_rubygems_version: !ruby/object:Gem::Requirement
318
322
  none: false
319
323
  requirements:
320
- - - ! '>'
324
+ - - ! '>='
321
325
  - !ruby/object:Gem::Version
322
- version: 1.3.1
326
+ version: '0'
327
+ segments:
328
+ - 0
329
+ hash: -2589511577649954983
323
330
  requirements: []
324
331
  rubyforge_project:
325
332
  rubygems_version: 1.8.23