honeybadger 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 432a8044719792bb87fa036981d18363c02407b1
4
+ data.tar.gz: 21a0664d989f278e520867dd4651d2c6c8577099
5
+ SHA512:
6
+ metadata.gz: dbfa579b6f06989fbadbf4855b46232bea1b9c65822cdcac5387b803b72549b8a5e1650e6d41e2680b1644e791af9a0a6ac9096d9af4c8284837e8c7c31ce6cb
7
+ data.tar.gz: f39e364b00a9ad3ecc354fdb0faf74901406947f311f6f974489e6193f5c6a7e5ba8bdb761580bf9ca7a759fdd49aeddb75a37da2e464d440dd0b8e81258f324
data/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ## Honeybadger 1.7.0 (Unreleased) ##
2
2
 
3
- * Added a deploy rake task which always loads the Rails environment.
4
- Also added ability to override rake task in Capistrano recipe.
3
+ ## Honeybadger 1.6.2 ##
4
+
5
+ * Fail gracefully when Rack params cannot be parsed
5
6
 
6
7
  *Joshua Wood*
7
8
 
@@ -11,6 +12,11 @@
11
12
 
12
13
  *Joshua Wood*
13
14
 
15
+ * Added a deploy rake task which always loads the Rails environment.
16
+ Also added ability to override rake task in Capistrano recipe.
17
+
18
+ *Joshua Wood*
19
+
14
20
  ## Honeybadger 1.6.0 ##
15
21
 
16
22
  * Rescue from load error when application_controller.rb is missing.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeybadger (1.6.1)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -13,32 +13,40 @@ to the Honeybadger server specified in your environment.
13
13
 
14
14
  Add the Honeybadger gem to your gemfile:
15
15
 
16
- gem 'honeybadger'
16
+ ```ruby
17
+ gem 'honeybadger'
18
+ ```
17
19
 
18
20
  Then generate the initializer:
19
21
 
20
22
  rails generate honeybadger --api-key <Your Api Key>
21
23
 
22
24
  If you prefer to manually create the initializer, that's simple enough.
23
- Just put the code below in config/initializers/honeybadger.rb
25
+ Just put the code below in `config/initializers/honeybadger.rb`
24
26
 
25
- Honeybadger.configure do |config|
26
- config.api_key = '[your-api-key]'
27
- end
27
+ ```ruby
28
+ Honeybadger.configure do |config|
29
+ config.api_key = '[your-api-key]'
30
+ end
31
+ ```
28
32
 
29
33
  That's it!
30
34
 
31
35
  ### Rails 2.x
32
36
 
33
- Add the honeybadger gem to your app. In config/environment.rb:
37
+ Add the honeybadger gem to your app. In `config/environment.rb`:
34
38
 
35
- config.gem 'honeybadger'
39
+ ```ruby
40
+ config.gem 'honeybadger'
41
+ ```
36
42
 
37
43
  or if you are using bundler:
38
44
 
39
- gem 'honeybadger', :require => 'honeybadger/rails'
45
+ ```ruby
46
+ gem 'honeybadger', :require => 'honeybadger/rails'
47
+ ```
40
48
 
41
- Then from your project's RAILS_ROOT, and in your development environment, run:
49
+ Then from your project's `RAILS_ROOT`, and in your development environment, run:
42
50
 
43
51
  rake gems:install
44
52
  rake gems:unpack GEM=honeybadger
@@ -46,13 +54,15 @@ Then from your project's RAILS_ROOT, and in your development environment, run:
46
54
  As always, if you choose not to vendor the honeybadger gem, make sure
47
55
  every server you deploy to has the gem installed or your application won't start.
48
56
 
49
- Finally, create an initializer in config/initializers and configure your
57
+ Finally, create an initializer in `config/initializers` and configure your
50
58
  API key for your project:
51
59
 
52
- require 'honeybadger/rails'
53
- Honeybadger.configure do |config|
54
- config.api_key = '[your-api-key]'
55
- end
60
+ ```ruby
61
+ require 'honeybadger/rails'
62
+ Honeybadger.configure do |config|
63
+ config.api_key = '[your-api-key]'
64
+ end
65
+ ```
56
66
 
57
67
  ## Rack
58
68
 
@@ -60,36 +70,40 @@ In order to use honeybadger in a non-Rails rack app, just load
60
70
  honeybadger, configure your API key, and use the Honeybadger::Rack
61
71
  middleware:
62
72
 
63
- require 'rack'
64
- require 'honeybadger'
73
+ ```ruby
74
+ require 'rack'
75
+ require 'honeybadger'
65
76
 
66
- Honeybadger.configure do |config|
67
- config.api_key = 'my_api_key'
68
- end
77
+ Honeybadger.configure do |config|
78
+ config.api_key = 'my_api_key'
79
+ end
69
80
 
70
- app = Rack::Builder.app do
71
- run lambda { |env| raise "Rack down" }
72
- end
81
+ app = Rack::Builder.app do
82
+ run lambda { |env| raise "Rack down" }
83
+ end
73
84
 
74
- use Honeybadger::Rack
75
- run app
85
+ use Honeybadger::Rack
86
+ run app
87
+ ```
76
88
 
77
89
  ## Sinatra
78
90
 
79
91
  Using honeybadger in a Sinatra app is just like a Rack app:
80
92
 
81
- require 'sinatra'
82
- require 'honeybadger'
93
+ ```ruby
94
+ require 'sinatra'
95
+ require 'honeybadger'
83
96
 
84
- Honeybadger.configure do |config|
85
- config.api_key = 'my api key'
86
- end
97
+ Honeybadger.configure do |config|
98
+ config.api_key = 'my api key'
99
+ end
87
100
 
88
- use Honeybadger::Rack
101
+ use Honeybadger::Rack
89
102
 
90
- get '/' do
91
- raise "Sinatra has left the building"
92
- end
103
+ get '/' do
104
+ raise "Sinatra has left the building"
105
+ end
106
+ ```
93
107
 
94
108
  ## Additional integrations:
95
109
 
@@ -105,12 +119,14 @@ It intercepts the exception middleware calls, sends notifications and continues
105
119
  If you want to log arbitrary things which you've rescued yourself from a
106
120
  controller, you can do something like this:
107
121
 
108
- ...
109
- rescue => ex
110
- notify_honeybadger(ex)
111
- flash[:failure] = 'Encryptions could not be rerouted, try again.'
112
- end
113
- ...
122
+ ```ruby
123
+ # ...
124
+ rescue => ex
125
+ notify_honeybadger(ex)
126
+ flash[:failure] = 'Encryptions could not be rerouted, try again.'
127
+ end
128
+ # ...
129
+ ```
114
130
 
115
131
  The `#notify_honeybadger` call will send the notice over to Honeybadger for later
116
132
  analysis. While in your controllers you use the `notify_honeybadger` method, anywhere
@@ -137,14 +153,16 @@ task. The following environments are ignored by default: *development*,
137
153
  setting the `development_environments` option in your Honeybadger
138
154
  initializer:
139
155
 
140
- Honeybadger.configure do |config|
141
- ...
142
- # To add an additional environment to be ignored:
143
- config.development_environments << 'staging'
156
+ ```ruby
157
+ Honeybadger.configure do |config|
158
+ # ...
159
+ # To add an additional environment to be ignored:
160
+ config.development_environments << 'staging'
144
161
 
145
- # To override the default environments completely:
146
- config.development_environments = ['test', 'cucumber']
147
- end
162
+ # To override the default environments completely:
163
+ config.development_environments = ['test', 'cucumber']
164
+ end
165
+ ```
148
166
 
149
167
  If you choose to override the `development_environments` option for
150
168
  whatever reason, please make sure your test environments are ignored.
@@ -155,12 +173,14 @@ Honeybadger allows you to send custom data using `Honeybadger.context`.
155
173
  Here's an example of sending some user-specific information in a Rails
156
174
  `before_filter` call:
157
175
 
158
- before_filter do
159
- Honeybadger.context({
160
- :user_id => current_user.id,
161
- :user_email => current_user.email
162
- }) if current_user
163
- end
176
+ ```ruby
177
+ before_filter do
178
+ Honeybadger.context({
179
+ :user_id => current_user.id,
180
+ :user_email => current_user.email
181
+ }) if current_user
182
+ end
183
+ ```
164
184
 
165
185
  Now, whenever an error occurs, Honeybadger will display the affected
166
186
  user's id and email address, if available.
@@ -185,7 +205,9 @@ We officially support deploy tracking using Capistrano and Heroku:
185
205
  In order to track deployments using Capistrano, simply require
186
206
  Honeybadger's Capistrano task in your `config/deploy.rb` file:
187
207
 
188
- require 'honeybadger/capistrano'
208
+ ```ruby
209
+ require 'honeybadger/capistrano'
210
+ ```
189
211
 
190
212
  If you ran the Honeybadger install generator in a project that was
191
213
  previously configured with Capistrano, we already added this for you.
@@ -195,8 +217,10 @@ the server you are deploying to, so that it can correctly report
195
217
  environment-related information. To override the task that is run, you
196
218
  can set the `:honeybadger_deploy_task` in your *config/deploy.rb* file:
197
219
 
198
- # Loads Rails environment before executing normal deploy task
199
- set :honeybadger_deploy_task, 'honeybadger:deploy_with_environment'
220
+ ```ruby
221
+ # Loads Rails environment before executing normal deploy task
222
+ set :honeybadger_deploy_task, 'honeybadger:deploy_with_environment'
223
+ ```
200
224
 
201
225
  If you would prefer to notify Honeybadger locally without using rake,
202
226
  check out our blog post: [Honeybadger and Capistrano: the metal way](http://honeybadger.io/blog/2012/10/06/honeybadger-and-capistrano/).
@@ -233,11 +257,11 @@ environment information:
233
257
 
234
258
  You can optionally add:
235
259
 
236
- * REPO=[scm repo url]
237
- * REVISION=[scm sha]
238
- * USER=[local user's name]
239
- * API_KEY=[a different api key]
240
- * DRY_RUN=true (simulates notification)
260
+ * `REPO=[scm repo url]`
261
+ * `REVISION=[scm sha]`
262
+ * `USER=[local user's name]`
263
+ * `API_KEY=[a different api key]`
264
+ * `DRY_RUN=true (simulates notification)`
241
265
 
242
266
  ## Notifying Honeybadger asynchronously
243
267
 
@@ -251,73 +275,83 @@ handler can be set directly by setting the `async` configuration option,
251
275
  or by passing a block to `config.async` (in this case, a Proc instance
252
276
  will be created for you):
253
277
 
254
- Honeybadger.configure do |config|
255
- ...
278
+ ```ruby
279
+ Honeybadger.configure do |config|
280
+ # ...
256
281
 
257
- # Configuring handler directly:
258
- config.async do |notice|
259
- # Delivers notification immediately
260
- notice.deliver # => 'qwer-asdf-zxcv'
261
- end
282
+ # Configuring handler directly:
283
+ config.async do |notice|
284
+ # Delivers notification immediately
285
+ notice.deliver # => 'qwer-asdf-zxcv'
286
+ end
262
287
 
263
- # Using your own handler (identical behavior):
264
- config.async = Proc.new { |n| n.deliver }
265
- end
288
+ # Using your own handler (identical behavior):
289
+ config.async = Proc.new { |n| n.deliver }
290
+ end
291
+ ```
266
292
 
267
293
  We've left the implementation mostly up to you, but here are a few
268
294
  examples of notifying Honeybadger asynchronously:
269
295
 
270
296
  ### Using thread
271
297
 
272
- Honeybadger.configure do |config|
273
- config.async do |notice|
274
- Thread.new { notice.deliver }
275
- end
276
- end
298
+ ```ruby
299
+ Honeybadger.configure do |config|
300
+ config.async do |notice|
301
+ Thread.new { notice.deliver }
302
+ end
303
+ end
304
+ ```
277
305
 
278
306
  ### Using Resque
279
307
 
280
- Honeybadger.configure do |config|
281
- config.async do |notice|
282
- Resque.enqueue(WorkingBadger, notice.to_json)
283
- end
284
- end
308
+ ```ruby
309
+ Honeybadger.configure do |config|
310
+ config.async do |notice|
311
+ Resque.enqueue(WorkingBadger, notice.to_json)
312
+ end
313
+ end
285
314
 
286
- class WorkingBadger
287
- @queue = :cobra_alert
315
+ class WorkingBadger
316
+ @queue = :cobra_alert
288
317
 
289
- def self.perform(notice)
290
- Honeybadger.sender.send_to_honeybadger(notice)
291
- end
292
- end
318
+ def self.perform(notice)
319
+ Honeybadger.sender.send_to_honeybadger(notice)
320
+ end
321
+ end
322
+ ```
293
323
 
294
324
  ### Using Sidekiq
295
325
 
296
- Honeybadger.configure do |config|
297
- config.async do |notice|
298
- WorkingBadger.perform_async(notice.to_json)
299
- end
300
- end
326
+ ```ruby
327
+ Honeybadger.configure do |config|
328
+ config.async do |notice|
329
+ WorkingBadger.perform_async(notice.to_json)
330
+ end
331
+ end
301
332
 
302
- class WorkingBadger
303
- include Sidekiq::Worker
333
+ class WorkingBadger
334
+ include Sidekiq::Worker
304
335
 
305
- def perform(notice)
306
- Honeybadger.sender.send_to_honeybadger(notice)
307
- end
308
- end
336
+ def perform(notice)
337
+ Honeybadger.sender.send_to_honeybadger(notice)
338
+ end
339
+ end
340
+ ```
309
341
 
310
342
  ### Using GirlFriday
311
343
 
312
- COBRA_QUEUE = GirlFriday::WorkQueue.new(:honeybadger_notices, :size => 7) do |notice|
313
- notice.deliver
314
- end
344
+ ```ruby
345
+ COBRA_QUEUE = GirlFriday::WorkQueue.new(:honeybadger_notices, :size => 7) do |notice|
346
+ notice.deliver
347
+ end
315
348
 
316
- Honeybadger.configure do |config|
317
- config.async do |notice|
318
- COBRA_QUEUE.push(notice)
319
- end
320
- end
349
+ Honeybadger.configure do |config|
350
+ config.async do |notice|
351
+ COBRA_QUEUE.push(notice)
352
+ end
353
+ end
354
+ ```
321
355
 
322
356
  ## Going beyond exceptions
323
357
 
@@ -325,18 +359,20 @@ You can also pass a hash to `Honeybadger.notify` method and store whatever you w
325
359
  not just an exception. And you can also use it anywhere, not just in
326
360
  controllers:
327
361
 
328
- begin
329
- params = {
330
- # params that you pass to a method that can throw an exception
331
- }
332
- my_unpredicable_method(*params)
333
- rescue => e
334
- Honeybadger.notify(
335
- :error_class => "Special Error",
336
- :error_message => "Special Error: #{e.message}",
337
- :parameters => params
338
- )
339
- end
362
+ ```ruby
363
+ begin
364
+ params = {
365
+ # params that you pass to a method that can throw an exception
366
+ }
367
+ my_unpredicable_method(*params)
368
+ rescue => e
369
+ Honeybadger.notify(
370
+ :error_class => "Special Error",
371
+ :error_message => "Special Error: #{e.message}",
372
+ :parameters => params
373
+ )
374
+ end
375
+ ```
340
376
 
341
377
  While in your controllers you use the `notify_honeybadger` method, anywhere else in
342
378
  your code, use `Honeybadger.notify`. Honeybadger will get all the information
@@ -348,14 +384,16 @@ about the error itself. As for a hash, these are the keys you should pass:
348
384
 
349
385
  Honeybadger merges the hash you pass with these default options:
350
386
 
351
- {
352
- :api_key => Honeybadger.api_key,
353
- :error_message => 'Notification',
354
- :backtrace => caller,
355
- :parameters => {},
356
- :session => {},
357
- :context => {}
358
- }
387
+ ```ruby
388
+ {
389
+ :api_key => Honeybadger.api_key,
390
+ :error_message => 'Notification',
391
+ :backtrace => caller,
392
+ :parameters => {},
393
+ :session => {},
394
+ :context => {}
395
+ }
396
+ ```
359
397
 
360
398
  You can override any of those parameters.
361
399
 
@@ -365,8 +403,9 @@ One common request we see is to send shell environment variables along with
365
403
  manual exception notification. We recommend sending them along with CGI data
366
404
  or Rack environment (:cgi_data or :rack_env keys, respectively.)
367
405
 
368
- See Honeybadger::Notice#initialize in lib/honeybadger/notice.rb for
369
- more details.
406
+ See `Honeybadger::Notice#initialize` in
407
+ [lib/honeybadger/notice.rb](https://github.com/honeybadger-io/honeybadger-ruby/blob/master/lib/honeybadger/notice.rb)
408
+ for more details.
370
409
 
371
410
  ## Filtering
372
411
 
@@ -379,30 +418,36 @@ notifications (when #notify is called directly).
379
418
 
380
419
  Honeybadger ignores the following exceptions by default:
381
420
 
382
- ActiveRecord::RecordNotFound
383
- ActionController::RoutingError
384
- ActionController::InvalidAuthenticityToken
385
- CGI::Session::CookieStore::TamperedWithCookie
386
- ActionController::UnknownAction
387
- AbstractController::ActionNotFound
388
- Mongoid::Errors::DocumentNotFound
421
+ ```ruby
422
+ ActiveRecord::RecordNotFound
423
+ ActionController::RoutingError
424
+ ActionController::InvalidAuthenticityToken
425
+ CGI::Session::CookieStore::TamperedWithCookie
426
+ ActionController::UnknownAction
427
+ AbstractController::ActionNotFound
428
+ Mongoid::Errors::DocumentNotFound
429
+ ```
389
430
 
390
431
  To ignore errors in addition to those, specify their names in your Honeybadger
391
432
  configuration block. You may use a string, regexp, or class:
392
433
 
393
- Honeybadger.configure do |config|
394
- config.api_key = '1234567890abcdef'
395
- config.ignore << /IgnoredError$/
396
- config.ignore << "ActiveRecord::IgnoreThisError"
397
- config.ignore << OtherException
398
- end
434
+ ```ruby
435
+ Honeybadger.configure do |config|
436
+ config.api_key = '1234567890abcdef'
437
+ config.ignore << /IgnoredError$/
438
+ config.ignore << "ActiveRecord::IgnoreThisError"
439
+ config.ignore << OtherException
440
+ end
441
+ ```
399
442
 
400
443
  To ignore *only* certain errors (and override the defaults), use the #ignore_only attribute.
401
444
 
402
- Honeybadger.configure do |config|
403
- config.api_key = '1234567890abcdef'
404
- config.ignore_only = ["ActiveRecord::IgnoreThisError"] # or [] to ignore no exceptions.
405
- end
445
+ ```ruby
446
+ Honeybadger.configure do |config|
447
+ config.api_key = '1234567890abcdef'
448
+ config.ignore_only = ["ActiveRecord::IgnoreThisError"] # or [] to ignore no exceptions.
449
+ end
450
+ ```
406
451
 
407
452
  Subclasses of ignored classes will also be ignored, while strings and
408
453
  regexps are compared with the error class name only.
@@ -410,37 +455,45 @@ regexps are compared with the error class name only.
410
455
  To ignore certain user agents, add in the #ignore_user_agent attribute as a
411
456
  string or regexp:
412
457
 
413
- Honeybadger.configure do |config|
414
- config.api_key = '1234567890abcdef'
415
- config.ignore_user_agent << /Ignored/
416
- config.ignore_user_agent << 'IgnoredUserAgent'
417
- end
458
+ ```ruby
459
+ Honeybadger.configure do |config|
460
+ config.api_key = '1234567890abcdef'
461
+ config.ignore_user_agent << /Ignored/
462
+ config.ignore_user_agent << 'IgnoredUserAgent'
463
+ end
464
+ ```
418
465
 
419
466
  To ignore exceptions based on other conditions, use #ignore_by_filter:
420
467
 
421
- Honeybadger.configure do |config|
422
- config.api_key = '1234567890abcdef'
423
- config.ignore_by_filter do |exception_data|
424
- true if exception_data[:error_class] == "RuntimeError"
425
- end
426
- end
468
+ ```ruby
469
+ Honeybadger.configure do |config|
470
+ config.api_key = '1234567890abcdef'
471
+ config.ignore_by_filter do |exception_data|
472
+ true if exception_data[:error_class] == "RuntimeError"
473
+ end
474
+ end
475
+ ```
427
476
 
428
477
  To replace sensitive information sent to the Honeybadger service with [FILTERED] use #params_filters:
429
478
 
430
- Honeybadger.configure do |config|
431
- config.api_key = '1234567890abcdef'
432
- config.params_filters << "credit_card_number"
433
- end
479
+ ```ruby
480
+ Honeybadger.configure do |config|
481
+ config.api_key = '1234567890abcdef'
482
+ config.params_filters << "credit_card_number"
483
+ end
484
+ ```
434
485
 
435
486
  Note that, when rescuing exceptions within an ActionController method,
436
487
  honeybadger will reuse filters specified by #filter_parameter_logging.
437
488
 
438
489
  To disable sending session data:
439
490
 
440
- Honeybadger.configure do |config|
441
- config.api_key = '1234567890abcdef'
442
- config.send_request_session = false
443
- end
491
+ ```ruby
492
+ Honeybadger.configure do |config|
493
+ config.api_key = '1234567890abcdef'
494
+ config.send_request_session = false
495
+ end
496
+ ```
444
497
 
445
498
  ## Testing
446
499
 
@@ -449,11 +502,13 @@ notices generated using #notify when you don't expect it to. You can
449
502
  use code like this in your test_helper.rb or spec_helper.rb files to redefine
450
503
  that method so those errors are not reported while running tests.
451
504
 
452
- module Honeybadger
453
- def self.notify(exception, opts = {})
454
- # do nothing.
455
- end
456
- end
505
+ ```ruby
506
+ module Honeybadger
507
+ def self.notify(exception, opts = {})
508
+ # do nothing.
509
+ end
510
+ end
511
+ ```
457
512
 
458
513
  ## Proxy Support
459
514
 
@@ -461,12 +516,14 @@ The notifier supports using a proxy, if your server is not able to
461
516
  directly reach the Honeybadger servers. To configure the proxy settings,
462
517
  added the following information to your Honeybadger configuration block.
463
518
 
464
- Honeybadger.configure do |config|
465
- config.proxy_host = proxy.host.com
466
- config.proxy_port = 4038
467
- config.proxy_user = foo # optional
468
- config.proxy_pass = bar # optional
469
- end
519
+ ```ruby
520
+ Honeybadger.configure do |config|
521
+ config.proxy_host = 'proxy.host.com'
522
+ config.proxy_port = 4038
523
+ config.proxy_user = 'foo' # optional
524
+ config.proxy_pass = 'bar' # optional
525
+ end
526
+ ```
470
527
 
471
528
  ## Troubleshooting
472
529
 
@@ -475,10 +532,12 @@ By default, Honeybadger is quiet when your log level is set to INFO
475
532
  logs when Honeybadger completes a successful notification, set the
476
533
  `config.debug` option to true:
477
534
 
478
- Honeybadger.configure do |config|
479
- ...
480
- config.debug = true
481
- end
535
+ ```ruby
536
+ Honeybadger.configure do |config|
537
+ # ...
538
+ config.debug = true
539
+ end
540
+ ```
482
541
 
483
542
  ## Supported Ruby versions
484
543
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.6.0)
4
+ honeybadger (1.6.2)
5
5
  json
6
6
 
7
7
  GEM
data/honeybadger.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'honeybadger'
7
- s.version = '1.6.1'
8
- s.date = '2013-03-14'
7
+ s.version = '1.6.2'
8
+ s.date = '2013-04-10'
9
9
 
10
10
  s.summary = 'Error reports you can be happy about.'
11
11
  s.description = 'Make managing application errors a more pleasant experience.'
data/lib/honeybadger.rb CHANGED
@@ -12,7 +12,7 @@ require 'honeybadger/sender'
12
12
  require 'honeybadger/railtie' if defined?(Rails::Railtie)
13
13
 
14
14
  module Honeybadger
15
- VERSION = '1.6.1'
15
+ VERSION = '1.6.2'
16
16
  LOG_PREFIX = "** [Honeybadger] "
17
17
 
18
18
  HEADERS = {
@@ -347,6 +347,8 @@ module Honeybadger
347
347
 
348
348
  def rack_env(method)
349
349
  rack_request.send(method) if rack_request
350
+ rescue => e
351
+ { :error => "Failed to call #{method} on Rack::Request -- #{e.message}" }
350
352
  end
351
353
 
352
354
  def rack_request
@@ -455,6 +455,15 @@ class NoticeTest < Test::Unit::TestCase
455
455
  assert_equal session_data, notice.session_data
456
456
  end
457
457
 
458
+ unless Gem::Version.new(Rack.release) < Gem::Version.new('1.2')
459
+ should "fail gracefully when Rack params cannot be parsed" do
460
+ rack_env = Rack::MockRequest.env_for('http://www.example.com/explode', :method => 'POST', :input => 'foo=bar&bar=baz%')
461
+ notice = Honeybadger::Notice.new(:rack_env => rack_env)
462
+ assert_equal 1, notice.params.size
463
+ assert_match /Failed to call params on Rack::Request/, notice.params[:error]
464
+ end
465
+ end
466
+
458
467
  should "not send session data when send_request_session is false" do
459
468
  notice = build_notice(:send_request_session => false, :session_data => { :foo => :bar })
460
469
  assert_equal nil, notice.session_data
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
5
- prerelease:
4
+ version: 1.6.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joshua Wood
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-14 00:00:00.000000000 Z
11
+ date: 2013-04-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: cucumber
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: fakeweb
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sham_rack
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,23 +83,20 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: bourne
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '1.0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '1.0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: shoulda
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,81 +111,71 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: capistrano
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: rake
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: sinatra
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - '>='
164
144
  - !ruby/object:Gem::Version
165
145
  version: '0'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - '>='
172
151
  - !ruby/object:Gem::Version
173
152
  version: '0'
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: aruba
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ! '>='
157
+ - - '>='
180
158
  - !ruby/object:Gem::Version
181
159
  version: '0'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
- - - ! '>='
164
+ - - '>='
188
165
  - !ruby/object:Gem::Version
189
166
  version: '0'
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: appraisal
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
- - - ! '>='
171
+ - - '>='
196
172
  - !ruby/object:Gem::Version
197
173
  version: '0'
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
- - - ! '>='
178
+ - - '>='
204
179
  - !ruby/object:Gem::Version
205
180
  version: '0'
206
181
  description: Make managing application errors a more pleasant experience.
@@ -292,6 +267,7 @@ files:
292
267
  - test/unit/sender_test.rb
293
268
  homepage: http://www.honeybadger.io
294
269
  licenses: []
270
+ metadata: {}
295
271
  post_install_message:
296
272
  rdoc_options:
297
273
  - --charset=UTF-8
@@ -299,23 +275,18 @@ rdoc_options:
299
275
  require_paths:
300
276
  - lib
301
277
  required_ruby_version: !ruby/object:Gem::Requirement
302
- none: false
303
278
  requirements:
304
- - - ! '>='
279
+ - - '>='
305
280
  - !ruby/object:Gem::Version
306
281
  version: '0'
307
- segments:
308
- - 0
309
- hash: 3567896080089189096
310
282
  required_rubygems_version: !ruby/object:Gem::Requirement
311
- none: false
312
283
  requirements:
313
- - - ! '>='
284
+ - - '>='
314
285
  - !ruby/object:Gem::Version
315
286
  version: '0'
316
287
  requirements: []
317
288
  rubyforge_project:
318
- rubygems_version: 1.8.23
289
+ rubygems_version: 2.0.3
319
290
  signing_key:
320
291
  specification_version: 2
321
292
  summary: Error reports you can be happy about.