airbrake-api 3.2.2 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/airbrake-api/notice.rb +1 -1
- data/lib/airbrake-api/version.rb +1 -1
- data/spec/airbrake_api/notice_spec.rb +6 -0
- data/spec/fixtures/unauthorized.xml +8 -0
- data/spec/spec_helper.rb +1 -0
- metadata +28 -26
data/lib/airbrake-api/notice.rb
CHANGED
@@ -27,7 +27,7 @@ module AirbrakeAPI
|
|
27
27
|
options[:page] = page
|
28
28
|
hash = fetch(all_path(error_id), options)
|
29
29
|
if hash.errors
|
30
|
-
raise AirbrakeError.new(
|
30
|
+
raise AirbrakeError.new(hash.errors.error)
|
31
31
|
end
|
32
32
|
|
33
33
|
batch = Parallel.map(hash.notices, :in_threads => PARALLEL_WORKERS) do |notice_stub|
|
data/lib/airbrake-api/version.rb
CHANGED
@@ -18,6 +18,12 @@ describe AirbrakeAPI::Notice do
|
|
18
18
|
notices.size.should == 42
|
19
19
|
end
|
20
20
|
|
21
|
+
it "should fail with errors" do
|
22
|
+
expect {
|
23
|
+
AirbrakeAPI::Notice.find_all_by_error_id(1696172)
|
24
|
+
}.to raise_error(AirbrakeAPI::AirbrakeError, /You are not authorized to see that page/)
|
25
|
+
end
|
26
|
+
|
21
27
|
it "should find all error notices with a page limit" do
|
22
28
|
notices = AirbrakeAPI::Notice.find_all_by_error_id(1696171, :pages => 2)
|
23
29
|
notices.size.should == 60
|
data/spec/spec_helper.rb
CHANGED
@@ -40,6 +40,7 @@ fixture_request :get, "http://myapp.airbrakeapp.com/errors/1696171/notices.xml?a
|
|
40
40
|
fixture_request :get, "http://myapp.airbrakeapp.com/errors/1696171/notices.xml?auth_token=abcdefg123456&page=2", 'notices.xml'
|
41
41
|
fixture_request :get, "http://myapp.airbrakeapp.com/errors/1696171/notices.xml?auth_token=abcdefg123456&page=3", 'paginated_notices.xml'
|
42
42
|
fixture_request :get, "http://myapp.airbrakeapp.com/errors/1696171/notices/1234.xml?auth_token=abcdefg123456", 'notices.xml'
|
43
|
+
fixture_request :get, "http://myapp.airbrakeapp.com/errors/1696172/notices.xml?auth_token=abcdefg123456&page=1", 'unauthorized.xml'
|
43
44
|
|
44
45
|
|
45
46
|
# projects
|
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: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70302261216240 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.8.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70302261216240
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hashie
|
27
|
-
requirement: &
|
27
|
+
requirement: &70302261215280 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.2'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70302261215280
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: parallel
|
38
|
-
requirement: &
|
38
|
+
requirement: &70302261197900 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.5.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70302261197900
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &70302261196920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.9.2
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70302261196920
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &70302261196340 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.6.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70302261196340
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
|
-
requirement: &
|
71
|
+
requirement: &70302261195800 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.7.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70302261195800
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: maruku
|
82
|
-
requirement: &
|
82
|
+
requirement: &70302261195280 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0.6'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70302261195280
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: simplecov
|
93
|
-
requirement: &
|
93
|
+
requirement: &70302261194780 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.4.2
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70302261194780
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: fakeweb
|
104
|
-
requirement: &
|
104
|
+
requirement: &70302261194140 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 1.3.0
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70302261194140
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: nokogiri
|
115
|
-
requirement: &
|
115
|
+
requirement: &70302261193520 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '1.4'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70302261193520
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: airbrake
|
126
|
-
requirement: &
|
126
|
+
requirement: &70302261192820 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '3.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70302261192820
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: i18n
|
137
|
-
requirement: &
|
137
|
+
requirement: &70302261192140 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ~>
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
version: 0.6.0
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70302261192140
|
146
146
|
description: A ruby wrapper for the Airbrake API
|
147
147
|
email:
|
148
148
|
- steve.agalloco@gmail.com
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- spec/fixtures/paginated_errors.xml
|
178
178
|
- spec/fixtures/paginated_notices.xml
|
179
179
|
- spec/fixtures/projects.xml
|
180
|
+
- spec/fixtures/unauthorized.xml
|
180
181
|
- spec/fixtures/update_error.xml
|
181
182
|
- spec/spec_helper.rb
|
182
183
|
homepage: https://github.com/spagalloco/airbrake-api
|
@@ -216,6 +217,7 @@ test_files:
|
|
216
217
|
- spec/fixtures/paginated_errors.xml
|
217
218
|
- spec/fixtures/paginated_notices.xml
|
218
219
|
- spec/fixtures/projects.xml
|
220
|
+
- spec/fixtures/unauthorized.xml
|
219
221
|
- spec/fixtures/update_error.xml
|
220
222
|
- spec/spec_helper.rb
|
221
223
|
has_rdoc:
|