Skip to content

Commit

Permalink
0.4.8: Support nil instead of false for before_send=
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Kiselev <[email protected]>
  • Loading branch information
mrexox committed Jun 26, 2022
1 parent 382b962 commit 0e60df1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
38 changes: 29 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
sentry-sanitizer (0.3.0)
sentry-ruby (~> 4.3.0)
sentry-sanitizer (1.0.0)
sentry-ruby (~> 4.8.0)

GEM
remote: https://rubygems.org/
Expand All @@ -12,10 +12,30 @@ GEM
concurrent-ruby (1.1.10)
diff-lcs (1.4.4)
docile (1.3.5)
faraday (2.3.0)
faraday-net_http (~> 2.0)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-net_http (2.0.3)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
multipart-post (2.2.3)
rack (2.2.3)
rake (10.5.0)
rspec (3.10.0)
Expand All @@ -32,11 +52,11 @@ GEM
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
ruby2_keywords (0.0.5)
sentry-ruby (4.3.2)
sentry-ruby (4.8.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
faraday (>= 1.0)
sentry-ruby-core (= 4.3.2)
sentry-ruby-core (4.3.2)
faraday (~> 1.0)
sentry-ruby-core (= 4.8.3)
sentry-ruby-core (4.8.3)
concurrent-ruby
faraday
simplecov (0.18.5)
Expand Down
4 changes: 2 additions & 2 deletions lib/sentry/sanitizer/configuration_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module Sanitizer
module ConfigurationMixin
# Allow adding multiple hooks for this extension
def before_send=(value)
unless value == false || value.respond_to?(:call)
unless value == nil || value.respond_to?(:call)
raise ArgumentError, "before_send must be callable (or false to disable)"
end

return value if value == false
return if value == nil

@before_send_hook_list ||= []
@before_send_hook_list << value
Expand Down
2 changes: 1 addition & 1 deletion lib/sentry/sanitizer/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Sentry
module Sanitizer
VERSION = '0.3.0'
VERSION = '0.4.0'
end
end
2 changes: 1 addition & 1 deletion sentry-sanitizer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rack'

spec.add_runtime_dependency 'sentry-ruby', '~> 4.3.0'
spec.add_runtime_dependency 'sentry-ruby', '~> 4.8.0'
end

0 comments on commit 0e60df1

Please sign in to comment.