raygun4ruby 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/raygun/client.rb +6 -4
- data/lib/raygun/configuration.rb +3 -2
- data/lib/raygun/version.rb +1 -1
- data/lib/resque/failure/raygun.rb +26 -0
- metadata +166 -130
data/lib/raygun/client.rb
CHANGED
@@ -30,7 +30,7 @@ module Raygun
|
|
30
30
|
{
|
31
31
|
className: exception.class.to_s,
|
32
32
|
message: exception.message,
|
33
|
-
stackTrace: exception.backtrace.map { |line| stack_trace_for(line) }
|
33
|
+
stackTrace: (exception.backtrace || []).map { |line| stack_trace_for(line) }
|
34
34
|
}
|
35
35
|
end
|
36
36
|
|
@@ -69,7 +69,7 @@ module Raygun
|
|
69
69
|
|
70
70
|
def headers(rack_env)
|
71
71
|
rack_env.select do |k, v|
|
72
|
-
k.starts_with?("HTTP_")
|
72
|
+
k.to_s.starts_with?("HTTP_")
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -82,7 +82,9 @@ module Raygun
|
|
82
82
|
end
|
83
83
|
|
84
84
|
# see http://raygun.io/raygun-providers/rest-json-api?v=1
|
85
|
-
def build_payload_hash(exception_instance, env)
|
85
|
+
def build_payload_hash(exception_instance, env = {})
|
86
|
+
custom_data = env.delete(:custom_data) || {}
|
87
|
+
|
86
88
|
{
|
87
89
|
occurredOn: Time.now.utc.iso8601,
|
88
90
|
details: {
|
@@ -90,7 +92,7 @@ module Raygun
|
|
90
92
|
version: version,
|
91
93
|
client: client_details,
|
92
94
|
error: error_details(exception_instance),
|
93
|
-
userCustomData: Raygun.configuration.custom_data,
|
95
|
+
userCustomData: Raygun.configuration.custom_data.merge(custom_data),
|
94
96
|
request: request_information(env)
|
95
97
|
}
|
96
98
|
}
|
data/lib/raygun/configuration.rb
CHANGED
data/lib/raygun/version.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
begin
|
2
|
+
require 'resque'
|
3
|
+
rescue LoadError
|
4
|
+
raise "Can't find 'resque' gem. You'll need to require it before you require the Raygun Failure handler"
|
5
|
+
end
|
6
|
+
|
7
|
+
module Resque
|
8
|
+
module Failure
|
9
|
+
class Raygun < Base
|
10
|
+
|
11
|
+
def save
|
12
|
+
::Raygun.track_exception(exception,
|
13
|
+
custom_data: {
|
14
|
+
resque: {
|
15
|
+
worker: worker.to_s,
|
16
|
+
queue: queue.to_s,
|
17
|
+
job: payload['class'].to_s,
|
18
|
+
args: payload['args'].inspect
|
19
|
+
}
|
20
|
+
}
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,144 +1,184 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun4ruby
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Mindscape
|
9
|
+
- Nik Wakelin
|
13
10
|
autorequire:
|
14
11
|
bindir: bin
|
15
12
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
21
16
|
name: httparty
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
25
20
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 0
|
29
|
-
- 11
|
30
|
-
version: "0.11"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.11'
|
31
23
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: json
|
35
24
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0.11'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: json
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
43
39
|
type: :runtime
|
44
|
-
version_requirements: *id002
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: activesupport
|
47
40
|
prerelease: false
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: activesupport
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
55
|
type: :runtime
|
56
|
-
version_requirements: *id003
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: rack
|
59
56
|
prerelease: false
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rack
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
67
71
|
type: :runtime
|
68
|
-
version_requirements: *id004
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
71
72
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: bundler
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '1.1'
|
80
87
|
type: :development
|
81
|
-
version_requirements: *id005
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: rake
|
84
88
|
prerelease: false
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '1.1'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rake
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
92
103
|
type: :development
|
93
|
-
version_requirements: *id006
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: fakeweb
|
96
104
|
prerelease: false
|
97
|
-
|
98
|
-
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: fakeweb
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
99
116
|
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
|
102
|
-
- 1
|
103
|
-
- 3
|
104
|
-
version: "1.3"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '1.3'
|
105
119
|
type: :development
|
106
|
-
version_requirements: *id007
|
107
|
-
- !ruby/object:Gem::Dependency
|
108
|
-
name: timecop
|
109
120
|
prerelease: false
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ~>
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '1.3'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: timecop
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
117
135
|
type: :development
|
118
|
-
|
119
|
-
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
- !ruby/object:Gem::Dependency
|
120
144
|
name: minitest
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ~>
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '4.2'
|
151
|
+
type: :development
|
121
152
|
prerelease: false
|
122
|
-
|
123
|
-
|
153
|
+
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
124
156
|
- - ~>
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '4.2'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: resque
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
130
167
|
type: :development
|
131
|
-
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ! '>='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
132
175
|
description: Ruby Adapter for Raygun.io
|
133
|
-
email:
|
176
|
+
email:
|
134
177
|
- hello@raygun.io
|
135
178
|
executables: []
|
136
|
-
|
137
179
|
extensions: []
|
138
|
-
|
139
180
|
extra_rdoc_files: []
|
140
|
-
|
141
|
-
files:
|
181
|
+
files:
|
142
182
|
- lib/raygun.rb
|
143
183
|
- lib/raygun/client.rb
|
144
184
|
- lib/raygun/configuration.rb
|
@@ -149,35 +189,31 @@ files:
|
|
149
189
|
- lib/generators/raygun/install_generator.rb
|
150
190
|
- lib/raygun/testable.rb
|
151
191
|
- lib/tasks/raygun.tasks
|
152
|
-
|
192
|
+
- lib/resque/failure/raygun.rb
|
153
193
|
homepage: http://raygun.io
|
154
|
-
licenses:
|
194
|
+
licenses:
|
155
195
|
- MIT
|
156
196
|
post_install_message:
|
157
197
|
rdoc_options: []
|
158
|
-
|
159
|
-
require_paths:
|
198
|
+
require_paths:
|
160
199
|
- lib
|
161
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
requirements:
|
170
|
-
- -
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
|
173
|
-
- 0
|
174
|
-
version: "0"
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
none: false
|
208
|
+
requirements:
|
209
|
+
- - ! '>='
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '0'
|
175
212
|
requirements: []
|
176
|
-
|
177
213
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.
|
214
|
+
rubygems_version: 1.8.24
|
179
215
|
signing_key:
|
180
216
|
specification_version: 3
|
181
|
-
summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
|
217
|
+
summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
|
218
|
+
reporter
|
182
219
|
test_files: []
|
183
|
-
|