sentry-sanitizer 0.1.2 → 0.1.3

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: 04b5f5cd976e0d3946f7d1d8791b4d9c8530eebe09a772b78098ae335feffaf0
4
- data.tar.gz: 84fa68c96490549641f44a0bee8e53a11a1ec25953cde17d39dea14e9462b852
3
+ metadata.gz: 14c3591414c43811641c73deace5e0937ea6b6253fccfab7118a78e80570ee97
4
+ data.tar.gz: 4a56c57f3c8544ad6f60e3a39391a434062e959cb98df9d0664d01d9f237af6c
5
5
  SHA512:
6
- metadata.gz: 8fcfba576d61cd2f0f57c46bdbdc1bde94ee09cda03e296ba501473668d4b482c0615309af6b78aab96b82fcdc0fd469f6cd34a51e8fc1facf77c83b98e98497
7
- data.tar.gz: b3603c13482ab3f8bc6b780e836ec448337059d11754e5dc5a2855e97320d3b19846a6ff7865c25d9021704d3f9db7740e0aacf4820686a6fae7a966c2645549
6
+ metadata.gz: bb59ac96c1f7a8cabe2f592a2cdb7cb28563d934a817258d2bd477c9a53be9acad75672818504329b7cf38f11492ba193de4bfd1a3a067bc3b83c01d3a349dc9
7
+ data.tar.gz: ce941998005146bd0c32d4200cd1cae8dec74303de8d4f460dbac02f665f3ef8685153374cabb6de7f4ae044f2df75563aa430a99817dd06c23d26d10e3cb7eb
@@ -24,18 +24,18 @@ module Sentry
24
24
  def call(event)
25
25
  if event.is_a?(Sentry::Event)
26
26
  event.request = sanitize_request(event.request) if event.request
27
- event.extra = sanitize_hash(event.extra) if event.extra
27
+ event.extra = sanitize_data(event.extra) if event.extra
28
28
  end
29
29
  end
30
30
 
31
31
  def sanitize_request(request)
32
- request.data = sanitize_hash(request.data) unless fields.size.zero?
32
+ request.data = sanitize_data(request.data) unless fields.size.zero?
33
33
  request.headers = sanitize_headers(request.headers) unless http_headers.size.zero?
34
34
  request.cookies = sanitize_cookies(request.cookies) if cookies
35
35
  end
36
36
 
37
- def sanitize_hash(hash)
38
- return if hash.blank?
37
+ def sanitize_data(hash)
38
+ return unless hash.is_a? Hash
39
39
 
40
40
  sanitize_value(hash, nil)
41
41
  end
@@ -13,9 +13,11 @@ module Sentry
13
13
  @before_send_hook_list << value
14
14
 
15
15
  @before_send = ->(event, hint) {
16
- @before_send_hook_list.each do |hook|
17
- event = hook.call(event, hint)
16
+ @before_send_hook_list.inject do |_, hook|
17
+ hook.call(event, hint)
18
18
  end
19
+
20
+ event
19
21
  }
20
22
  end
21
23
 
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Sanitizer
3
- VERSION = "0.1.2"
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-sanitizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentine Kiselev