resque-honeybadger 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +20 -29
- data/lib/resque/failure/honeybadger.rb +4 -4
- metadata +5 -5
data/README.md
CHANGED
@@ -1,33 +1,42 @@
|
|
1
1
|
resque-honeybadger
|
2
2
|
==================
|
3
3
|
|
4
|
-
resque-honeybadger provides a [Resque][re] failure backend that sends exceptions
|
5
|
-
raised by jobs to [honeybadger.io][hb]
|
4
|
+
resque-honeybadger provides a [Resque][re] failure backend that sends exceptions raised by jobs to [honeybadger.io][hb].
|
6
5
|
|
7
6
|
Install & Quick Start
|
8
7
|
---------------------
|
9
8
|
|
10
9
|
Before you jump into code, you'll need a honeybadger.io account.
|
11
10
|
|
12
|
-
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'resque-honeybadger'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
13
20
|
|
14
21
|
$ gem install resque-honeybadger
|
15
22
|
|
16
|
-
|
23
|
+
|
24
|
+
### Example
|
17
25
|
|
18
26
|
Using only the honeybadger failure backend:
|
19
27
|
|
28
|
+
# Suggested file in Rails: config/initializers/resque.rb
|
29
|
+
|
20
30
|
require 'resque'
|
21
31
|
require 'resque-honeybadger'
|
22
32
|
|
33
|
+
# If you don't already do `Honeybadger.configure` elsewhere.
|
23
34
|
Resque::Failure::Honeybadger.configure do |config|
|
24
|
-
config.api_key = '
|
35
|
+
config.api_key = 'abc123' # Your key here.
|
25
36
|
end
|
26
37
|
|
27
38
|
Resque::Failure.backend = Resque::Failure::Honeybadger
|
28
39
|
|
29
|
-
### Example: Multiple Failure Backends
|
30
|
-
|
31
40
|
Using both the redis and honeybadger failure backends:
|
32
41
|
|
33
42
|
require 'resque'
|
@@ -36,37 +45,19 @@ Using both the redis and honeybadger failure backends:
|
|
36
45
|
require 'resque/failure/multiple'
|
37
46
|
require 'resque/failure/redis'
|
38
47
|
|
48
|
+
# If you don't already do `Honeybadger.configure` elsewhere.
|
39
49
|
Resque::Failure::Honeybadger.configure do |config|
|
40
|
-
config.api_key = '
|
50
|
+
config.api_key = 'abc123' # Your key here.
|
41
51
|
end
|
42
52
|
|
43
53
|
Resque::Failure::Multiple.classes = [Resque::Failure::Redis, Resque::Failure::Honeybadger]
|
44
54
|
Resque::Failure.backend = Resque::Failure::Multiple
|
45
55
|
|
46
|
-
Configuration Options
|
47
|
-
---------------------
|
48
|
-
|
49
|
-
**Required**
|
50
|
-
|
51
|
-
* `api_key` - your honeybadger.io api key.
|
52
|
-
|
53
|
-
|
54
|
-
Note on Patches/Pull Requests
|
55
|
-
-----------------------------
|
56
|
-
|
57
|
-
* Fork the project.
|
58
|
-
* Make your feature addition or bug fix.
|
59
|
-
* Add tests for it. This is important so I don't break it in a future
|
60
|
-
version unintentionally.
|
61
|
-
* Commit, do not mess with the version. (if you want to have your own
|
62
|
-
version, that is fine but bump version in a commit by itself I can ignore
|
63
|
-
when I pull)
|
64
|
-
* Send me a pull request. Bonus points for topic branches.
|
65
|
-
|
66
56
|
|
67
57
|
Forked by
|
68
58
|
------
|
69
59
|
|
60
|
+
Henrik Nyh :: <http://henrik.nyh.se> :: @henrik
|
70
61
|
Jacques Crocker :: <http://railsjedi.com> :: @railsjedi
|
71
62
|
|
72
63
|
|
@@ -77,4 +68,4 @@ Luke Antins :: [http://lividpenguin.com][lp] :: @lantins
|
|
77
68
|
|
78
69
|
[re]: http://github.com/defunkt/resque
|
79
70
|
[lp]: http://lividpenguin.com
|
80
|
-
[hb]: http://honeybadger.io
|
71
|
+
[hb]: http://honeybadger.io
|
@@ -1,8 +1,6 @@
|
|
1
1
|
module Resque
|
2
2
|
module Failure
|
3
|
-
# A Resque failure backend that sends exception data to honeybadger.io
|
4
3
|
class Honeybadger < Base
|
5
|
-
|
6
4
|
# Configures the failure backend. At a minimum you will need to set
|
7
5
|
# an api_key.
|
8
6
|
#
|
@@ -10,13 +8,15 @@ module Resque
|
|
10
8
|
# Resque::Failure::Honeybadger.configure do |config|
|
11
9
|
# config.api_key = '505f2518c41866bb0be7ba434bb2b079'
|
12
10
|
# end
|
11
|
+
#
|
12
|
+
# If you already configured Honeybadger for your app, x§
|
13
13
|
def self.configure(&block)
|
14
14
|
::Honeybadger.configure(&block)
|
15
15
|
end
|
16
16
|
|
17
17
|
def count
|
18
|
-
# We
|
19
|
-
#
|
18
|
+
# We don't want to ask Honeybadger for the total # of errors,
|
19
|
+
# so we fake it by asking Resque instead.
|
20
20
|
Stat[:failed]
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-12-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: resque
|
16
|
-
requirement: &
|
16
|
+
requirement: &70100617603500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.8.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70100617603500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: honeybadger
|
27
|
-
requirement: &
|
27
|
+
requirement: &70100617602900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70100617602900
|
36
36
|
description: ! " resque-honeybadger provides a Resque failure backend that sends
|
37
37
|
exceptions\n raised by jobs to honeybadger.io.\n"
|
38
38
|
email: railsjedi@gmail.com
|