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 +7 -0
- data/CHANGELOG.md +8 -2
- data/Gemfile.lock +1 -1
- data/README.md +237 -178
- data/gemfiles/rack.gemfile.lock +1 -1
- data/gemfiles/rails2.3.gemfile.lock +1 -1
- data/gemfiles/rails3.0.gemfile.lock +1 -1
- data/gemfiles/rails3.1.gemfile.lock +1 -1
- data/gemfiles/rails3.2.gemfile.lock +1 -1
- data/gemfiles/rails4.gemfile.lock +1 -1
- data/gemfiles/rake.gemfile.lock +1 -1
- data/gemfiles/sinatra.gemfile.lock +1 -1
- data/honeybadger.gemspec +2 -2
- data/lib/honeybadger.rb +1 -1
- data/lib/honeybadger/notice.rb +2 -0
- data/test/unit/notice_test.rb +9 -0
- metadata +20 -49
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
|
-
|
4
|
-
|
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
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
|
-
|
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
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
39
|
+
```ruby
|
40
|
+
config.gem 'honeybadger'
|
41
|
+
```
|
36
42
|
|
37
43
|
or if you are using bundler:
|
38
44
|
|
39
|
-
|
45
|
+
```ruby
|
46
|
+
gem 'honeybadger', :require => 'honeybadger/rails'
|
47
|
+
```
|
40
48
|
|
41
|
-
Then from your project's RAILS_ROOT
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
-
|
64
|
-
|
73
|
+
```ruby
|
74
|
+
require 'rack'
|
75
|
+
require 'honeybadger'
|
65
76
|
|
66
|
-
|
67
|
-
|
68
|
-
|
77
|
+
Honeybadger.configure do |config|
|
78
|
+
config.api_key = 'my_api_key'
|
79
|
+
end
|
69
80
|
|
70
|
-
|
71
|
-
|
72
|
-
|
81
|
+
app = Rack::Builder.app do
|
82
|
+
run lambda { |env| raise "Rack down" }
|
83
|
+
end
|
73
84
|
|
74
|
-
|
75
|
-
|
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
|
-
|
82
|
-
|
93
|
+
```ruby
|
94
|
+
require 'sinatra'
|
95
|
+
require 'honeybadger'
|
83
96
|
|
84
|
-
|
85
|
-
|
86
|
-
|
97
|
+
Honeybadger.configure do |config|
|
98
|
+
config.api_key = 'my api key'
|
99
|
+
end
|
87
100
|
|
88
|
-
|
101
|
+
use Honeybadger::Rack
|
89
102
|
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
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
|
-
|
146
|
-
|
147
|
-
|
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
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
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
|
-
|
199
|
-
|
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
|
-
|
255
|
-
|
278
|
+
```ruby
|
279
|
+
Honeybadger.configure do |config|
|
280
|
+
# ...
|
256
281
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
282
|
+
# Configuring handler directly:
|
283
|
+
config.async do |notice|
|
284
|
+
# Delivers notification immediately
|
285
|
+
notice.deliver # => 'qwer-asdf-zxcv'
|
286
|
+
end
|
262
287
|
|
263
|
-
|
264
|
-
|
265
|
-
|
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
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
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
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
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
|
-
|
287
|
-
|
315
|
+
class WorkingBadger
|
316
|
+
@queue = :cobra_alert
|
288
317
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
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
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
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
|
-
|
303
|
-
|
333
|
+
class WorkingBadger
|
334
|
+
include Sidekiq::Worker
|
304
335
|
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
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
|
-
|
313
|
-
|
314
|
-
|
344
|
+
```ruby
|
345
|
+
COBRA_QUEUE = GirlFriday::WorkQueue.new(:honeybadger_notices, :size => 7) do |notice|
|
346
|
+
notice.deliver
|
347
|
+
end
|
315
348
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
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
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
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
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
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
|
369
|
-
|
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
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
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
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
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
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
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
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
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
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
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
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
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
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
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
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
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
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
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
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
535
|
+
```ruby
|
536
|
+
Honeybadger.configure do |config|
|
537
|
+
# ...
|
538
|
+
config.debug = true
|
539
|
+
end
|
540
|
+
```
|
482
541
|
|
483
542
|
## Supported Ruby versions
|
484
543
|
|
data/gemfiles/rack.gemfile.lock
CHANGED
data/gemfiles/rake.gemfile.lock
CHANGED
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.
|
8
|
-
s.date = '2013-
|
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
data/lib/honeybadger/notice.rb
CHANGED
data/test/unit/notice_test.rb
CHANGED
@@ -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.
|
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-
|
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:
|
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.
|