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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/restful_resource_bugsnag/middleware.rb +8 -2
- data/lib/restful_resource_bugsnag/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aca2c4f060de91456555ba272cf82b9dfb3561686a5db1271458dcbcc2cc9b8
|
4
|
+
data.tar.gz: 2d061e4ef4c73a8f6974a99da117b6b9c1bbd5873b85a80885e303ed01f9486e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '091765fce9f89eda509a533a85ca55d6ac687664b7d446f198463c567fe982fe1f97077b61c231b6151a8d47c96034f05af06f41bcdee9bacf399c3a86fede38'
|
7
|
+
data.tar.gz: 391717c5b6ccc1f8bcabc498598641694fd45d6b63fd7d8970c335b12a9666e76d9a695db919610de837904ab271c37acfda243f2734738f4544e5464168a7e8
|
data/Gemfile.lock
CHANGED
@@ -49,9 +49,15 @@ module RestfulResourceBugsnag
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def attempt_json_parse(string)
|
52
|
-
|
52
|
+
redacted_string = redact_user_emails_from_errors(string)
|
53
|
+
JSON.parse(redacted_string)
|
53
54
|
rescue JSON::ParserError, TypeError
|
54
|
-
|
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
|
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.
|
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:
|
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.
|
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
|