kiev 4.8.1 → 4.8.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: 4d40605191a7b91d8df6797e3d0e9fa73f82eec5b60dc340f600f5a70b1374ce
4
- data.tar.gz: 524309f5f0e91a96abc5d85ae158e9316f71c13af2f4076742c14f45812aaec8
3
+ metadata.gz: b75d8c13ade0c1c19c620f32cd91f9ee8cfb181b88bbbb450bacc2740ed297de
4
+ data.tar.gz: 91dc05471b4dd9cd0b7d436b3c8e6df35760a11a269a48a64b575bf37bf02a3b
5
5
  SHA512:
6
- metadata.gz: 52737e6382ca2e0ce2e6cf5c0ead72a30454e456ea8b126fc65c30f06c68dc02ba082f74534a84e041b88931d1ea6de1f365d6dff73e148c160c158659553b3f
7
- data.tar.gz: 9010b961ccbef8dcbc2f39a844ab1f2992e50f7d4ede821cc5329391df24f5e8fde18422d06aa20f9fbc6110fa60d9d1170bd1b95918e7c630413c1f89c1d42e
6
+ metadata.gz: 8e8928421ba2133504842a917a9a0188f81786eea86a7f88abc9b722bde7fad3e4d01d84610bd0b073678b06cad8f4735e1002ce05d3c473e68c7e7edc029a77
7
+ data.tar.gz: 20bf31e576d12ffea2a8a9b6c9bebfc9e27e00d0ef7bf0a2e446546bb622fa4b2e60a0666d51c64ba4d8ae20b3fb01bdab88fbec9e5f7d5f0957f69e7790cfe0
data/lib/kiev/base.rb CHANGED
@@ -72,7 +72,7 @@ module Kiev
72
72
  private
73
73
 
74
74
  def logged_data(data)
75
- return data if disable_filter_for_log_levels.include?(log_level)
75
+ return data unless config.filter_enabled?
76
76
 
77
77
  ParamFilter.filter(data, filtered_params, ignored_params)
78
78
  end
data/lib/kiev/config.rb CHANGED
@@ -172,6 +172,10 @@ module Kiev
172
172
  SUPPORTED_LOG_LEVELS
173
173
  end
174
174
 
175
+ def filter_enabled?
176
+ !disable_filter_for_log_levels.include?(log_level)
177
+ end
178
+
175
179
  private
176
180
 
177
181
  def update_logger_settings
@@ -29,6 +29,9 @@ module Kiev
29
29
  def self.filter(content_type, request_body, filtered_params, ignored_params)
30
30
  body = request_body.read
31
31
  request_body.rewind
32
+
33
+ return body unless Kiev.config.filter_enabled?
34
+
32
35
  body_filter = for_content_type(content_type)
33
36
  body_filter.call(body, filtered_params, ignored_params)
34
37
  end
data/lib/kiev/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kiev
4
- VERSION = "4.8.1"
4
+ VERSION = "4.8.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiev
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.1
4
+ version: 4.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blacklane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-17 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oga