restful_resource_bugsnag 0.4.2 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7e8250b9250d7f32580e3b7c549dec8bedfcec8e
4
- data.tar.gz: 45416b01b60fcb066687950c73e29632e4c4456c
2
+ SHA256:
3
+ metadata.gz: 749a6db67f04d21e897d0511786fc82ba07487d2a12b2227d0aa1962822db09c
4
+ data.tar.gz: d9f11ef92261792affb351f37fc1a41169be388578d957153e64925a02da7428
5
5
  SHA512:
6
- metadata.gz: d91852f1dbbebc5f50f0af19978e6b715f8a745a0ce474a7867ce4e6072b318f60c00d28209844c984882d27ba02ce1a074a510cb3b8d8f6f11001ac8420c04a
7
- data.tar.gz: 4119f232fbb3d283083bb3f240cd99946c3ec92b765c3293177702267fd2d83db240ee0dec7a14e27aeff670bdcfc6b1c8924fe882bd41d7f98bd6014b9776a9
6
+ metadata.gz: bc16577cbe3c186139c2d2a9f052beaf7b9741c51eca381c3a295a127a4ab190be910d5a6a8ce47bae15321eca765e1e4841056d2b7c18fec4edde0f898511f3
7
+ data.tar.gz: 9044165fc291431008ed280dd7eb52c718d01e9173586dcca2e1c4e9a35479b9fa0b37f8697cce8c6757b392fbf1e55b9a5d2ef2e26da49739a07878058c91b4
@@ -1,58 +1,60 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- restful_resource_bugsnag (0.4.2)
4
+ restful_resource_bugsnag (0.5.1)
5
5
  bugsnag (~> 6)
6
6
  restful_resource (~> 2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.2.3)
11
+ activesupport (6.0.3.4)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
16
17
  addressable (2.6.0)
17
18
  public_suffix (>= 2.0.2, < 4.0)
18
- bugsnag (6.11.1)
19
+ bugsnag (6.18.0)
19
20
  concurrent-ruby (~> 1.0)
20
- concurrent-ruby (1.1.5)
21
+ concurrent-ruby (1.1.7)
21
22
  crack (0.4.3)
22
23
  safe_yaml (~> 1.0.0)
23
24
  diff-lcs (1.3)
24
25
  ethon (0.12.0)
25
26
  ffi (>= 1.3.0)
26
- faraday (0.15.4)
27
+ faraday (1.1.0)
27
28
  multipart-post (>= 1.2, < 3)
28
- faraday-cdn-metrics (0.1.0)
29
- faraday (~> 0.11)
29
+ ruby2_keywords
30
+ faraday-cdn-metrics (0.2.0)
31
+ faraday (~> 1)
30
32
  faraday-encoding (0.0.5)
31
33
  faraday
32
- faraday-http-cache (2.0.0)
33
- faraday (~> 0.8)
34
- faraday_middleware (0.13.1)
35
- faraday (>= 0.7.4, < 1.0)
36
- ffi (1.11.1)
34
+ faraday-http-cache (2.2.0)
35
+ faraday (>= 0.8)
36
+ faraday_middleware (1.0.0)
37
+ faraday (~> 1.0)
38
+ ffi (1.13.1)
37
39
  hashdiff (0.3.9)
38
- i18n (1.6.0)
40
+ i18n (1.8.5)
39
41
  concurrent-ruby (~> 1.0)
40
42
  link_header (0.0.8)
41
- minitest (5.11.3)
43
+ minitest (5.14.2)
42
44
  multipart-post (2.1.1)
43
45
  public_suffix (3.0.3)
44
- rack (2.0.7)
45
- rake (12.3.2)
46
- restful_resource (2.5.1)
47
- activesupport
48
- faraday
49
- faraday-cdn-metrics
46
+ rack (2.2.3)
47
+ rake (13.0.1)
48
+ restful_resource (2.10.3)
49
+ activesupport (~> 6.0)
50
+ faraday (~> 1.0)
51
+ faraday-cdn-metrics (~> 0.2)
50
52
  faraday-encoding
51
- faraday-http-cache
52
- faraday_middleware
53
+ faraday-http-cache (~> 2.2)
54
+ faraday_middleware (~> 1.0)
53
55
  link_header
54
- rack
55
- typhoeus
56
+ rack (~> 2.2)
57
+ typhoeus (~> 1.4)
56
58
  rspec (3.8.0)
57
59
  rspec-core (~> 3.8.0)
58
60
  rspec-expectations (~> 3.8.0)
@@ -66,16 +68,18 @@ GEM
66
68
  diff-lcs (>= 1.2.0, < 2.0)
67
69
  rspec-support (~> 3.8.0)
68
70
  rspec-support (3.8.0)
71
+ ruby2_keywords (0.0.2)
69
72
  safe_yaml (1.0.5)
70
73
  thread_safe (0.3.6)
71
- typhoeus (1.3.1)
74
+ typhoeus (1.4.0)
72
75
  ethon (>= 0.9.0)
73
- tzinfo (1.2.5)
76
+ tzinfo (1.2.8)
74
77
  thread_safe (~> 0.1)
75
78
  webmock (3.5.1)
76
79
  addressable (>= 2.3.6)
77
80
  crack (>= 0.3.2)
78
81
  hashdiff
82
+ zeitwerk (2.4.1)
79
83
 
80
84
  PLATFORMS
81
85
  ruby
@@ -88,4 +92,4 @@ DEPENDENCIES
88
92
  webmock
89
93
 
90
94
  BUNDLED WITH
91
- 2.0.1
95
+ 2.1.4
@@ -12,13 +12,13 @@ module RestfulResourceBugsnag
12
12
  if exception.is_a?(RestfulResource::HttpClient::HttpError)
13
13
  notification.add_tab(:restful_resource_response, {
14
14
  status: exception.response.status,
15
- body: exception.response.body,
15
+ body: attempt_json_parse(exception.response.body),
16
16
  headers: exception.response.headers
17
17
  })
18
18
  notification.add_tab(:restful_resource_request, {
19
19
  method: exception.request.method,
20
20
  url: exception.request.url,
21
- body: exception.request.body
21
+ body: attempt_json_parse(exception.request.body)
22
22
  })
23
23
  end
24
24
 
@@ -47,5 +47,11 @@ module RestfulResourceBugsnag
47
47
  def request_host_from_exception(exception)
48
48
  URI.parse(exception.request.url).host
49
49
  end
50
+
51
+ def attempt_json_parse(string)
52
+ JSON.parse(string)
53
+ rescue JSON::ParserError, TypeError
54
+ string
55
+ end
50
56
  end
51
57
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResourceBugsnag
2
- VERSION = "0.4.2"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource_bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mwagg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-23 00:00:00.000000000 Z
11
+ date: 2020-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bugsnag
@@ -121,7 +121,7 @@ homepage: https://github.com/carwow/restful_resource_bugsnag
121
121
  licenses:
122
122
  - MIT
123
123
  metadata: {}
124
- post_install_message:
124
+ post_install_message:
125
125
  rdoc_options: []
126
126
  require_paths:
127
127
  - lib
@@ -136,9 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 2.6.14.1
141
- signing_key:
139
+ rubygems_version: 3.1.4
140
+ signing_key:
142
141
  specification_version: 4
143
142
  summary: A Bugsnag middleware which adds extra details to notifications for RestfulResource
144
143
  errors.