airbrake-api 4.2.1 → 4.2.2
Sign up to get free protection for your applications and to get access to all the features.
data/lib/airbrake-api/client.rb
CHANGED
@@ -57,7 +57,7 @@ module AirbrakeAPI
|
|
57
57
|
# errors
|
58
58
|
|
59
59
|
def unformatted_error_path(error_id)
|
60
|
-
"/
|
60
|
+
"/groups/#{error_id}"
|
61
61
|
end
|
62
62
|
|
63
63
|
def error_path(error_id)
|
@@ -65,7 +65,7 @@ module AirbrakeAPI
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def errors_path
|
68
|
-
'/
|
68
|
+
'/groups.xml'
|
69
69
|
end
|
70
70
|
|
71
71
|
def update(error, options = {})
|
@@ -86,11 +86,11 @@ module AirbrakeAPI
|
|
86
86
|
# notices
|
87
87
|
|
88
88
|
def notice_path(notice_id, error_id)
|
89
|
-
"/
|
89
|
+
"/groups/#{error_id}/notices/#{notice_id}.xml"
|
90
90
|
end
|
91
91
|
|
92
92
|
def notices_path(error_id)
|
93
|
-
"/
|
93
|
+
"/groups/#{error_id}/notices.xml"
|
94
94
|
end
|
95
95
|
|
96
96
|
def notice(notice_id, error_id, options = {})
|
data/lib/airbrake-api/version.rb
CHANGED
@@ -206,19 +206,19 @@ describe AirbrakeAPI::Client do
|
|
206
206
|
end
|
207
207
|
|
208
208
|
it 'generates web urls for errors' do
|
209
|
-
@client.url_for(:errors).should eq('http://myapp.airbrake.io/
|
209
|
+
@client.url_for(:errors).should eq('http://myapp.airbrake.io/groups')
|
210
210
|
end
|
211
211
|
|
212
212
|
it 'generates web urls for individual errors' do
|
213
|
-
@client.url_for(:error, 1696171).should eq('http://myapp.airbrake.io/
|
213
|
+
@client.url_for(:error, 1696171).should eq('http://myapp.airbrake.io/groups/1696171')
|
214
214
|
end
|
215
215
|
|
216
216
|
it 'generates web urls for notices' do
|
217
|
-
@client.url_for(:notices, 1696171).should eq('http://myapp.airbrake.io/
|
217
|
+
@client.url_for(:notices, 1696171).should eq('http://myapp.airbrake.io/groups/1696171/notices')
|
218
218
|
end
|
219
219
|
|
220
220
|
it 'generates web urls for individual notices' do
|
221
|
-
@client.url_for(:notice, 123, 1696171).should eq('http://myapp.airbrake.io/
|
221
|
+
@client.url_for(:notice, 123, 1696171).should eq('http://myapp.airbrake.io/groups/1696171/notices/123')
|
222
222
|
end
|
223
223
|
|
224
224
|
it 'raises an exception when passed an unknown endpoint' do
|
@@ -8,11 +8,11 @@ describe AirbrakeAPI::Error do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have correct collection path" do
|
11
|
-
AirbrakeAPI::Error.collection_path.should == "/
|
11
|
+
AirbrakeAPI::Error.collection_path.should == "/groups.xml"
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should generate correct error path given an id" do
|
15
|
-
AirbrakeAPI::Error.error_path(1234).should == "/
|
15
|
+
AirbrakeAPI::Error.error_path(1234).should == "/groups/1234.xml"
|
16
16
|
end
|
17
17
|
|
18
18
|
describe '.find' do
|
@@ -50,4 +50,4 @@ describe AirbrakeAPI::Error do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
end
|
53
|
+
end
|
@@ -47,10 +47,10 @@ describe AirbrakeAPI::Notice do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'defines the notices path' do
|
50
|
-
AirbrakeAPI::Notice.all_path(1696170).should eq('/
|
50
|
+
AirbrakeAPI::Notice.all_path(1696170).should eq('/groups/1696170/notices.xml')
|
51
51
|
end
|
52
52
|
|
53
53
|
it 'defines the an individual notices path' do
|
54
|
-
AirbrakeAPI::Notice.find_path(666, 1696170).should eq('/
|
54
|
+
AirbrakeAPI::Notice.find_path(666, 1696170).should eq('/groups/1696170/notices/666.xml')
|
55
55
|
end
|
56
56
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -23,25 +23,25 @@ def fixture_request(verb, url, file)
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# errors
|
26
|
-
fixture_request :get, 'http://myapp.airbrake.io/
|
27
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
28
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
29
|
-
fixture_request :put, 'http://myapp.airbrake.io/
|
30
|
-
fixture_request :get, 'https://anapp.airbrake.io/
|
26
|
+
fixture_request :get, 'http://myapp.airbrake.io/groups.xml?auth_token=abcdefg123456', 'errors.xml'
|
27
|
+
fixture_request :get, "http://myapp.airbrake.io/groups.xml?auth_token=abcdefg123456&page=2", 'paginated_errors.xml'
|
28
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml'
|
29
|
+
fixture_request :put, 'http://myapp.airbrake.io/groups/1696170?auth_token=abcdefg123456', 'update_error.xml'
|
30
|
+
fixture_request :get, 'https://anapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg', 'individual_error.xml'
|
31
31
|
|
32
32
|
# notices
|
33
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
34
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
35
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
36
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
37
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
38
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
39
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
40
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
41
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
42
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
43
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
44
|
-
fixture_request :get, "http://myapp.airbrake.io/
|
33
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices.xml?auth_token=abcdefg123456", 'notices.xml'
|
34
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices.xml?auth_token=abcdefg123456&page=1", 'notices.xml'
|
35
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices.xml?page=1&auth_token=abcdefg123456", 'notices.xml'
|
36
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices.xml?auth_token=abcdefg123456&page=2", 'paginated_notices.xml'
|
37
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices/1234.xml?auth_token=abcdefg123456", 'individual_notice.xml'
|
38
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices/666.xml?auth_token=abcdefg123456", 'broken_notice.xml'
|
39
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696171/notices.xml?auth_token=abcdefg123456", 'notices.xml'
|
40
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696171/notices.xml?auth_token=abcdefg123456&page=1", 'notices.xml'
|
41
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696171/notices.xml?auth_token=abcdefg123456&page=2", 'notices.xml'
|
42
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696171/notices.xml?auth_token=abcdefg123456&page=3", 'paginated_notices.xml'
|
43
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696171/notices/1234.xml?auth_token=abcdefg123456", 'notices.xml'
|
44
|
+
fixture_request :get, "http://myapp.airbrake.io/groups/1696172/notices.xml?auth_token=abcdefg123456&page=1", 'unauthorized.xml'
|
45
45
|
|
46
46
|
# projects
|
47
47
|
fixture_request :get, "http://myapp.airbrake.io/data_api/v1/projects.xml?auth_token=abcdefg123456", 'projects.xml'
|
@@ -51,5 +51,5 @@ fixture_request :get, "http://myapp.airbrake.io/projects/12345/deploys.xml?auth_
|
|
51
51
|
fixture_request :get, "http://myapp.airbrake.io/projects/67890/deploys.xml?auth_token=abcdefg123456", 'empty_deploys.xml'
|
52
52
|
|
53
53
|
# ssl responses
|
54
|
-
fixture_request :get, "https://sslapp.airbrake.io/
|
55
|
-
FakeWeb.register_uri(:get, "http://sslapp.airbrake.io/
|
54
|
+
fixture_request :get, "https://sslapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml'
|
55
|
+
FakeWeb.register_uri(:get, "http://sslapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", DEFAULTS.merge(:body => " ", :status => ["403", "Forbidden"]))
|
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.2.
|
4
|
+
version: 4.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
@@ -292,21 +292,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
292
292
|
- - ! '>='
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
|
-
segments:
|
296
|
-
- 0
|
297
|
-
hash: 1722762776779864920
|
298
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
296
|
none: false
|
300
297
|
requirements:
|
301
298
|
- - ! '>='
|
302
299
|
- !ruby/object:Gem::Version
|
303
300
|
version: '0'
|
304
|
-
segments:
|
305
|
-
- 0
|
306
|
-
hash: 1722762776779864920
|
307
301
|
requirements: []
|
308
302
|
rubyforge_project:
|
309
|
-
rubygems_version: 1.8.
|
303
|
+
rubygems_version: 1.8.23
|
310
304
|
signing_key:
|
311
305
|
specification_version: 3
|
312
306
|
summary: A ruby wrapper for the Airbrake API
|