airbrake-ruby 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/response.rb +1 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/notifier_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ce919afda5caeee7879b30e51fe5c377f9c1cd6
|
4
|
+
data.tar.gz: b16af646964d8203f5327dc855880765729bfe67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b7cdb943b77a2b7c50f1c6a2872a717d0311ff76bca71fc2e61ba20af6e7961379e2684d6f7813e6412e202eae655524234b017326c49baacd3d39a9b9dcba7
|
7
|
+
data.tar.gz: 4806cad79ca36383d4adb2aef849868b505345a0ee0ab91b33a079179e28f9289ba3ba3a37d9c8e6a04498ea2809ed5c4db7929a64b2155817e6d5c6bb818551
|
@@ -28,7 +28,7 @@ module Airbrake
|
|
28
28
|
parsed_body
|
29
29
|
when 400, 401, 403, 429
|
30
30
|
parsed_body = JSON.parse(body)
|
31
|
-
logger.error("#{LOG_LABEL} #{parsed_body['
|
31
|
+
logger.error("#{LOG_LABEL} #{parsed_body['message']}")
|
32
32
|
parsed_body
|
33
33
|
else
|
34
34
|
body_msg = truncated_body(body)
|
data/spec/notifier_spec.rb
CHANGED
@@ -184,8 +184,8 @@ RSpec.describe Airbrake::Notifier do
|
|
184
184
|
expect(@stdout.string).to match(expected_output)
|
185
185
|
expect(response).to be_a Hash
|
186
186
|
|
187
|
-
if response['
|
188
|
-
expect(response['
|
187
|
+
if response['message']
|
188
|
+
expect(response['message']).to satisfy do |error|
|
189
189
|
error.is_a?(Exception) || error.is_a?(String)
|
190
190
|
end
|
191
191
|
end
|
@@ -215,18 +215,18 @@ RSpec.describe Airbrake::Notifier do
|
|
215
215
|
end
|
216
216
|
|
217
217
|
context "error 400" do
|
218
|
-
include_examples 'HTTP codes', 400, '{"
|
218
|
+
include_examples 'HTTP codes', 400, '{"message": "Invalid Content-Type header."}',
|
219
219
|
/ERROR -- : .+ Invalid Content-Type header\./
|
220
220
|
end
|
221
221
|
|
222
222
|
context "error 401" do
|
223
223
|
include_examples 'HTTP codes', 401,
|
224
|
-
'{"
|
224
|
+
'{"message":"Project not found or access denied."}',
|
225
225
|
/ERROR -- : .+ Project not found or access denied./
|
226
226
|
end
|
227
227
|
|
228
228
|
context "the rate-limit message" do
|
229
|
-
include_examples 'HTTP codes', 429, '{"
|
229
|
+
include_examples 'HTTP codes', 429, '{"message": "Project is rate limited."}',
|
230
230
|
/ERROR -- : .+ Project is rate limited.+/
|
231
231
|
end
|
232
232
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|