sentry-sanitizer 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbeef1bae28044c2da929cc9ea538ec08982a55ce2a36ceb556ee455cad34e51
4
- data.tar.gz: 0fb66fff71d7b78a01f08cefa08cb809ec3cb29f52d36704b71db038885e81a5
3
+ metadata.gz: '0521397fec4fd1c3fc13ea82b40c927ea565706d4d47e5bb6ad088e03a1eb7ef'
4
+ data.tar.gz: fa306a84451371f29f70c7f9afe4af569c1cf80cb201a3ac590e893fcb0d3a0e
5
5
  SHA512:
6
- metadata.gz: 8020e375a0c1c5ae217c51bd63e5ad3dc47be4359f70f2e9eaed9ed9ff258de8c6df33a076e24e783f31874d695d3ce2a5e63a95388b47803c311699c3f39008
7
- data.tar.gz: 7f541bae3f4cadd941cfd99eb3b669e604619baea6b2286fdb348f7cc4666ccbbef5812c3432ebdfc235f65b24e0fb98bb63662346bd8e411c6323fa57f400a2
6
+ metadata.gz: fba88cdfacfcda7e2fb39bdfd086fae611aee595c48cd48338afb1f47258eb2e01ed7ac5ca3a31a7476ad843486837aefda467b968b02bcb6a96e4c3c5aa314e
7
+ data.tar.gz: 69e36efb3ef1cbe7ab2323697fdfe368b5ba66b8b05aa74ae7d7ebe9b10a0f94e76c273846f9a410c3495b1beb877bf9fd926c6cb119a7c2c42e8075309ce963
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1
4
+
5
+ - Fix breadcrumb data[:body] == nil handling [#20](https://github.com/mrexox/sentry-sanitizer/pull/20)
6
+
3
7
  ## 0.8.0
4
8
 
5
9
  - Add `breadcrumbs.json_data_fields` configuration option [#18](https://github.com/mrexox/sentry-sanitizer/pull/18)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sentry-sanitizer (0.8.0)
4
+ sentry-sanitizer (0.8.2)
5
5
  sentry-ruby (>= 5.3, < 7.0.0)
6
6
 
7
7
  GEM
@@ -50,7 +50,7 @@ GEM
50
50
  parser (>= 3.3.7.2)
51
51
  prism (~> 1.4)
52
52
  ruby-progressbar (1.13.0)
53
- sentry-ruby (6.0.0)
53
+ sentry-ruby (6.1.1)
54
54
  bigdecimal
55
55
  concurrent-ruby (~> 1.0, >= 1.0.2)
56
56
  simplecov (0.18.5)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![CI](https://github.com/mrexox/sentry-sanitizer/workflows/CI/badge.svg)
1
+ [![CI](https://github.com/mrexox/sentry-sanitizer/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/mrexox/sentry-sanitizer/actions/workflows/ci-linux.yml)
2
2
  [![Gem Version](https://badge.fury.io/rb/sentry-sanitizer.svg)](https://badge.fury.io/rb/sentry-sanitizer)
3
3
  [![Coverage Status](https://coveralls.io/repos/github/mrexox/sentry-sanitizer/badge.svg?branch=master)](https://coveralls.io/github/mrexox/sentry-sanitizer?branch=master)
4
4
 
@@ -14,11 +14,10 @@ Currently this gem provides following features
14
14
  - [x] Sanitizing cookies
15
15
  - [x] Sanitizing query string
16
16
  - [x] Sanitizing extras ([see](https://docs.sentry.io/platforms/ruby/enriching-events/context/#additional-data) `Sentry.set_extras`)
17
+ - [x] Sanitizing breadcrumb data fields
17
18
 
18
19
  ## Installation
19
20
 
20
- :warning: Please, don't use `0.1.*` version as it was experimental and not usable at all.
21
-
22
21
  Add this line to your application's Gemfile:
23
22
 
24
23
  ```ruby
@@ -66,15 +65,23 @@ Sentry.init do |config|
66
65
  end
67
66
  ```
68
67
 
69
- ## Development
68
+ ## Development hints
69
+
70
+ Install dependencies
71
+
72
+ $ bin/setup
73
+
74
+ Experiment with the code in IRB
75
+
76
+ $ bin/console
70
77
 
71
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
78
+ Run tests
72
79
 
73
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
80
+ $ bin/rake test
74
81
 
75
82
  ## Contributing
76
83
 
77
- Bug reports and pull requests are welcome on GitHub at https://github.com/mrexox/sentry-sanitizer.
84
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mrexox/sentry-sanitizer/issues.
78
85
 
79
86
  ## License
80
87
 
@@ -64,12 +64,12 @@ module Sentry
64
64
  end
65
65
 
66
66
  def sanitize_breadcrumb!(breadcrumb)
67
- return unless breadcrumbs_json_data_fields
68
67
  return unless breadcrumbs_json_data_fields.size.positive?
69
- return unless breadcrumb.data
68
+ return unless breadcrumb.data.is_a? Hash
70
69
 
71
70
  breadcrumbs_json_data_fields.each do |field|
72
71
  next unless breadcrumb.data.key?(field)
72
+ next if breadcrumb.data[field].nil?
73
73
 
74
74
  json_data = JSON.parse(breadcrumb.data[field])
75
75
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sentry
4
4
  module Sanitizer
5
- VERSION = "0.8.0"
5
+ VERSION = "0.8.2"
6
6
  end
7
7
  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.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentine Kiselev