restful_resource_bugsnag 0.5.1 → 0.5.2

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
2
  SHA256:
3
- metadata.gz: 749a6db67f04d21e897d0511786fc82ba07487d2a12b2227d0aa1962822db09c
4
- data.tar.gz: d9f11ef92261792affb351f37fc1a41169be388578d957153e64925a02da7428
3
+ metadata.gz: 8aca2c4f060de91456555ba272cf82b9dfb3561686a5db1271458dcbcc2cc9b8
4
+ data.tar.gz: 2d061e4ef4c73a8f6974a99da117b6b9c1bbd5873b85a80885e303ed01f9486e
5
5
  SHA512:
6
- metadata.gz: bc16577cbe3c186139c2d2a9f052beaf7b9741c51eca381c3a295a127a4ab190be910d5a6a8ce47bae15321eca765e1e4841056d2b7c18fec4edde0f898511f3
7
- data.tar.gz: 9044165fc291431008ed280dd7eb52c718d01e9173586dcca2e1c4e9a35479b9fa0b37f8697cce8c6757b392fbf1e55b9a5d2ef2e26da49739a07878058c91b4
6
+ metadata.gz: '091765fce9f89eda509a533a85ca55d6ac687664b7d446f198463c567fe982fe1f97077b61c231b6151a8d47c96034f05af06f41bcdee9bacf399c3a86fede38'
7
+ data.tar.gz: 391717c5b6ccc1f8bcabc498598641694fd45d6b63fd7d8970c335b12a9666e76d9a695db919610de837904ab271c37acfda243f2734738f4544e5464168a7e8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- restful_resource_bugsnag (0.5.1)
4
+ restful_resource_bugsnag (0.5.2)
5
5
  bugsnag (~> 6)
6
6
  restful_resource (~> 2)
7
7
 
@@ -49,9 +49,15 @@ module RestfulResourceBugsnag
49
49
  end
50
50
 
51
51
  def attempt_json_parse(string)
52
- JSON.parse(string)
52
+ redacted_string = redact_user_emails_from_errors(string)
53
+ JSON.parse(redacted_string)
53
54
  rescue JSON::ParserError, TypeError
54
- string
55
+ redacted_string
56
+ end
57
+
58
+ def redact_user_emails_from_errors(string)
59
+ # Based on Devise.email_regexp
60
+ string&.gsub(/[^@"\s]+@[^@"\s]+/, '<email-address-redacted>')
55
61
  end
56
62
  end
57
63
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResourceBugsnag
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mwagg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bugsnag
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.1.4
139
+ rubygems_version: 3.1.2
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: A Bugsnag middleware which adds extra details to notifications for RestfulResource