airbrake-api 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/airbrake-api.gemspec +11 -11
- data/lib/airbrake-api.rb +17 -0
- data/lib/airbrake-api/client.rb +1 -0
- data/lib/airbrake-api/core_ext/hash.rb +11 -0
- data/lib/airbrake-api/version.rb +1 -1
- data/spec/airbrake_api/client_spec.rb +6 -0
- data/spec/airbrake_api_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -0
- metadata +49 -48
data/airbrake-api.gemspec
CHANGED
@@ -14,21 +14,21 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.email = ['steve.agalloco@gmail.com']
|
15
15
|
s.homepage = 'https://github.com/spagalloco/airbrake-api'
|
16
16
|
|
17
|
-
s.add_dependency 'hashie'
|
17
|
+
s.add_dependency 'hashie'
|
18
18
|
s.add_dependency 'parallel', '~> 0.5.0'
|
19
19
|
s.add_dependency 'faraday_middleware', '~> 0.8'
|
20
|
-
s.add_dependency 'multi_xml'
|
20
|
+
s.add_dependency 'multi_xml'
|
21
21
|
s.add_dependency 'mash'
|
22
22
|
|
23
|
-
s.add_development_dependency 'rake'
|
24
|
-
s.add_development_dependency 'rspec'
|
25
|
-
s.add_development_dependency 'yard'
|
26
|
-
s.add_development_dependency 'maruku'
|
27
|
-
s.add_development_dependency 'simplecov'
|
28
|
-
s.add_development_dependency 'fakeweb'
|
29
|
-
s.add_development_dependency 'nokogiri'
|
30
|
-
s.add_development_dependency 'airbrake'
|
31
|
-
s.add_development_dependency 'i18n'
|
23
|
+
s.add_development_dependency 'rake'
|
24
|
+
s.add_development_dependency 'rspec'
|
25
|
+
s.add_development_dependency 'yard'
|
26
|
+
s.add_development_dependency 'maruku'
|
27
|
+
s.add_development_dependency 'simplecov'
|
28
|
+
s.add_development_dependency 'fakeweb'
|
29
|
+
s.add_development_dependency 'nokogiri'
|
30
|
+
s.add_development_dependency 'airbrake'
|
31
|
+
s.add_development_dependency 'i18n'
|
32
32
|
|
33
33
|
# ensure the gem is built out of versioned files
|
34
34
|
s.files = `git ls-files`.split("\n")
|
data/lib/airbrake-api.rb
CHANGED
@@ -4,6 +4,23 @@ module AirbrakeAPI
|
|
4
4
|
extend Configuration
|
5
5
|
|
6
6
|
class AirbrakeError < StandardError; end
|
7
|
+
|
8
|
+
# Alias for Instapaper::Client.new
|
9
|
+
#
|
10
|
+
# @return [Instapaper::Client]
|
11
|
+
def self.client(options={})
|
12
|
+
AirbrakeAPI::Client.new(options)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Delegate to Instapaper::Client
|
16
|
+
def self.method_missing(method, *args, &block)
|
17
|
+
return super unless client.respond_to?(method)
|
18
|
+
client.send(method, *args, &block)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.respond_to?(method, include_private = false)
|
22
|
+
client.respond_to?(method, include_private) || super(method, include_private)
|
23
|
+
end
|
7
24
|
end
|
8
25
|
|
9
26
|
require 'airbrake-api/client'
|
data/lib/airbrake-api/client.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
class Hash
|
2
|
+
|
3
|
+
def deep_merge(other_hash)
|
4
|
+
self.merge(other_hash) do |key, oldval, newval|
|
5
|
+
oldval = oldval.to_hash if oldval.respond_to?(:to_hash)
|
6
|
+
newval = newval.to_hash if newval.respond_to?(:to_hash)
|
7
|
+
oldval.class.to_s == 'Hash' && newval.class.to_s == 'Hash' ? oldval.deep_merge(newval) : newval
|
8
|
+
end
|
9
|
+
end unless method_defined?(:deep_merge)
|
10
|
+
|
11
|
+
end
|
data/lib/airbrake-api/version.rb
CHANGED
@@ -174,6 +174,12 @@ describe AirbrakeAPI::Client do
|
|
174
174
|
batches.map(&:size).should == [30,30]
|
175
175
|
end
|
176
176
|
end
|
177
|
+
|
178
|
+
describe '#connection' do
|
179
|
+
it 'returns a Faraday connection' do
|
180
|
+
@client.send(:connection).should be_kind_of(Faraday::Connection)
|
181
|
+
end
|
182
|
+
end
|
177
183
|
end
|
178
184
|
|
179
185
|
describe '#url_for' do
|
data/spec/airbrake_api_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -29,6 +29,7 @@ fixture_request :get, 'http://myapp.airbrake.io/errors.xml?auth_token=abcdefg123
|
|
29
29
|
fixture_request :get, "http://myapp.airbrake.io/errors.xml?auth_token=abcdefg123456&page=2", 'paginated_errors.xml'
|
30
30
|
fixture_request :get, "http://myapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml'
|
31
31
|
fixture_request :put, 'http://myapp.airbrake.io/errors/1696170.xml', 'update_error.xml'
|
32
|
+
fixture_request :get, 'https://anapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg', 'individual_error.xml'
|
32
33
|
|
33
34
|
# notices
|
34
35
|
fixture_request :get, "http://myapp.airbrake.io/errors/1696170/notices.xml?auth_token=abcdefg123456", 'notices.xml'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: parallel
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,17 +64,17 @@ dependencies:
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0
|
69
|
+
version: '0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '0
|
77
|
+
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: mash
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,145 +96,145 @@ dependencies:
|
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0
|
101
|
+
version: '0'
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0
|
109
|
+
version: '0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: rspec
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: yard
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0
|
133
|
+
version: '0'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0
|
141
|
+
version: '0'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: maruku
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ! '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '0
|
149
|
+
version: '0'
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: '0
|
157
|
+
version: '0'
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: simplecov
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - ! '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0
|
165
|
+
version: '0'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
none: false
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ! '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0
|
173
|
+
version: '0'
|
174
174
|
- !ruby/object:Gem::Dependency
|
175
175
|
name: fakeweb
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
177
177
|
none: false
|
178
178
|
requirements:
|
179
|
-
- -
|
179
|
+
- - ! '>='
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: '0'
|
182
182
|
type: :development
|
183
183
|
prerelease: false
|
184
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
185
|
none: false
|
186
186
|
requirements:
|
187
|
-
- -
|
187
|
+
- - ! '>='
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
189
|
+
version: '0'
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: nokogiri
|
192
192
|
requirement: !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
195
|
-
- -
|
195
|
+
- - ! '>='
|
196
196
|
- !ruby/object:Gem::Version
|
197
|
-
version: '
|
197
|
+
version: '0'
|
198
198
|
type: :development
|
199
199
|
prerelease: false
|
200
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
201
|
none: false
|
202
202
|
requirements:
|
203
|
-
- -
|
203
|
+
- - ! '>='
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: '
|
205
|
+
version: '0'
|
206
206
|
- !ruby/object:Gem::Dependency
|
207
207
|
name: airbrake
|
208
208
|
requirement: !ruby/object:Gem::Requirement
|
209
209
|
none: false
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - ! '>='
|
212
212
|
- !ruby/object:Gem::Version
|
213
|
-
version: '
|
213
|
+
version: '0'
|
214
214
|
type: :development
|
215
215
|
prerelease: false
|
216
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
217
|
none: false
|
218
218
|
requirements:
|
219
|
-
- -
|
219
|
+
- - ! '>='
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: '
|
221
|
+
version: '0'
|
222
222
|
- !ruby/object:Gem::Dependency
|
223
223
|
name: i18n
|
224
224
|
requirement: !ruby/object:Gem::Requirement
|
225
225
|
none: false
|
226
226
|
requirements:
|
227
|
-
- -
|
227
|
+
- - ! '>='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 0
|
229
|
+
version: '0'
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
none: false
|
234
234
|
requirements:
|
235
|
-
- -
|
235
|
+
- - ! '>='
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version: 0
|
237
|
+
version: '0'
|
238
238
|
description: A ruby wrapper for the Airbrake API
|
239
239
|
email:
|
240
240
|
- steve.agalloco@gmail.com
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- lib/airbrake-api/base.rb
|
254
254
|
- lib/airbrake-api/client.rb
|
255
255
|
- lib/airbrake-api/configuration.rb
|
256
|
+
- lib/airbrake-api/core_ext/hash.rb
|
256
257
|
- lib/airbrake-api/error.rb
|
257
258
|
- lib/airbrake-api/middleware/raise_response_error.rb
|
258
259
|
- lib/airbrake-api/middleware/raise_server_error.rb
|
@@ -293,7 +294,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
293
294
|
version: '0'
|
294
295
|
segments:
|
295
296
|
- 0
|
296
|
-
hash:
|
297
|
+
hash: 1414346195279665603
|
297
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
298
299
|
none: false
|
299
300
|
requirements:
|
@@ -302,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
303
|
version: '0'
|
303
304
|
segments:
|
304
305
|
- 0
|
305
|
-
hash:
|
306
|
+
hash: 1414346195279665603
|
306
307
|
requirements: []
|
307
308
|
rubyforge_project:
|
308
309
|
rubygems_version: 1.8.24
|