delayed-plugins-raven 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +13 -0
- data/lib/delayed-plugins-raven.rb +14 -3
- data/lib/delayed-plugins-raven/version.rb +1 -1
- data/resources/looking-for-maintainer.png +0 -0
- metadata +15 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b5ff6875693b3f2aefee4d42bc34b49adf647d1b
|
4
|
+
data.tar.gz: cb0e3262a4127c056f0b2aa1c5e5d3f1a9f03790
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ae0f013b619cfdc666511f1d0d382731cdd323675714dc074e4c0ec7507aec6745d49eecf16a9d3e91b11c6fb0867f3fe1516b0e14147ae554aab331d2cb6e23
|
7
|
+
data.tar.gz: cd411c8d251474e0848b13ef03ca30347125e0e500a5482035d3ce6dd8c9855473a3a0595dd4935a9c8a077baea0a31567dc111bfbf759f17caf91aa387b6f24
|
data/README.md
CHANGED
@@ -20,3 +20,16 @@ Register the plugin like so:
|
|
20
20
|
Delayed::Worker.plugins << Delayed::Plugins::Raven::Plugin
|
21
21
|
|
22
22
|
In a Rails project, this can be done in `config/initializers`.
|
23
|
+
|
24
|
+
## Optional Configuration
|
25
|
+
|
26
|
+
To configure `Delayed::Plugins::Raven` independently from the default Raven configuration, add an initializer to `config/initializers`:
|
27
|
+
|
28
|
+
require 'delayed-plugins-raven'
|
29
|
+
Delayed::Plugins::Raven.configure do |config|
|
30
|
+
config.dsn = ENV["SENTRY_DSN"]
|
31
|
+
config.excluded_exceptions = []
|
32
|
+
...
|
33
|
+
end
|
34
|
+
|
35
|
+
If this configuration is omitted, `Raven.capture_exception` will be invoked with the default Raven configuration.
|
@@ -9,9 +9,10 @@ module Delayed::Plugins::Raven
|
|
9
9
|
module Notify
|
10
10
|
def error(job, error)
|
11
11
|
begin
|
12
|
-
::Raven.capture_exception(error, {
|
13
|
-
|
14
|
-
|
12
|
+
::Raven.capture_exception(error, {
|
13
|
+
configuration: ::Delayed::Plugins::Raven.configuration,
|
14
|
+
extra: { delayed_job: job.as_json }
|
15
|
+
})
|
15
16
|
rescue Exception => e
|
16
17
|
Rails.logger.error "Raven logging failed: #{e.class.name}: #{e.message}"
|
17
18
|
Rails.logger.flush
|
@@ -28,4 +29,14 @@ module Delayed::Plugins::Raven
|
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
32
|
+
|
33
|
+
class << self
|
34
|
+
attr_accessor :configuration
|
35
|
+
|
36
|
+
def configure
|
37
|
+
@configuration = ::Raven::Configuration.new
|
38
|
+
yield(@configuration) if block_given?
|
39
|
+
self
|
40
|
+
end
|
41
|
+
end
|
31
42
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed-plugins-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Qiushi He
|
@@ -11,70 +10,62 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: sentry-raven
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
|
-
- -
|
19
|
+
- - '>='
|
22
20
|
- !ruby/object:Gem::Version
|
23
21
|
version: '0'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
|
-
- -
|
26
|
+
- - '>='
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '0'
|
32
29
|
- !ruby/object:Gem::Dependency
|
33
30
|
name: delayed_job
|
34
31
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
32
|
requirements:
|
37
|
-
- -
|
33
|
+
- - '>='
|
38
34
|
- !ruby/object:Gem::Version
|
39
35
|
version: '0'
|
40
36
|
type: :runtime
|
41
37
|
prerelease: false
|
42
38
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
39
|
requirements:
|
45
|
-
- -
|
40
|
+
- - '>='
|
46
41
|
- !ruby/object:Gem::Version
|
47
42
|
version: '0'
|
48
43
|
- !ruby/object:Gem::Dependency
|
49
44
|
name: rake
|
50
45
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
46
|
requirements:
|
53
|
-
- -
|
47
|
+
- - '>='
|
54
48
|
- !ruby/object:Gem::Version
|
55
49
|
version: '0'
|
56
50
|
type: :development
|
57
51
|
prerelease: false
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
53
|
requirements:
|
61
|
-
- -
|
54
|
+
- - '>='
|
62
55
|
- !ruby/object:Gem::Version
|
63
56
|
version: '0'
|
64
57
|
- !ruby/object:Gem::Dependency
|
65
58
|
name: rspec
|
66
59
|
requirement: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
60
|
requirements:
|
69
|
-
- -
|
61
|
+
- - '>='
|
70
62
|
- !ruby/object:Gem::Version
|
71
63
|
version: '0'
|
72
64
|
type: :development
|
73
65
|
prerelease: false
|
74
66
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
67
|
requirements:
|
77
|
-
- -
|
68
|
+
- - '>='
|
78
69
|
- !ruby/object:Gem::Version
|
79
70
|
version: '0'
|
80
71
|
description: delayed_job exception notification with raven
|
@@ -98,27 +89,26 @@ files:
|
|
98
89
|
homepage: https://github.com/qiushihe/delayed-plugins-raven
|
99
90
|
licenses:
|
100
91
|
- Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
92
|
+
metadata: {}
|
101
93
|
post_install_message:
|
102
94
|
rdoc_options: []
|
103
95
|
require_paths:
|
104
96
|
- lib
|
105
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
98
|
requirements:
|
108
|
-
- -
|
99
|
+
- - '>='
|
109
100
|
- !ruby/object:Gem::Version
|
110
101
|
version: '0'
|
111
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
-
none: false
|
113
103
|
requirements:
|
114
|
-
- -
|
104
|
+
- - '>='
|
115
105
|
- !ruby/object:Gem::Version
|
116
106
|
version: '0'
|
117
107
|
requirements: []
|
118
108
|
rubyforge_project:
|
119
|
-
rubygems_version:
|
109
|
+
rubygems_version: 2.0.2
|
120
110
|
signing_key:
|
121
|
-
specification_version:
|
111
|
+
specification_version: 4
|
122
112
|
summary: Notify Sentry Raven on Delayed Job errors, including those on PerformableMethod.
|
123
113
|
Based on Ben Oakes's AirBrake plugin (https://github.com/benjaminoakes/delayed-plugins-airbrake)
|
124
114
|
with samples provided by Bruno Miranda (https://gist.github.com/brupm/3c7056b03d62ba415015).
|