gruf 1.2.3 → 1.2.4
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/gruf.gemspec +4 -4
- data/lib/gruf/instrumentation/request_logging/hook.rb +15 -16
- data/lib/gruf/version.rb +1 -1
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a89536c6ad70dba812d8cb87b9220fc91ddc9e89
|
4
|
+
data.tar.gz: 629b82c3c4db84871a5799542466097ab794c0ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf8224f3487652a66ed038376cfa80d19241792c39d8ee0f409d24c9e635f964ca2750ea0194bd4f1252add9a541abb336709626a7eb36d0ba47fcb417348db1
|
7
|
+
data.tar.gz: 2966de34dae6ef0d9a9b2e27853dd4b7171a27791f08a224ad3111e0a01c9a1e80c48f4d96e72cc95fa9f166588a9f002706c9547f5203a204f53744017093eb
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
|
|
2
2
|
|
3
3
|
### Pending release
|
4
4
|
|
5
|
+
### 1.2.4
|
6
|
+
|
7
|
+
- Loosen explicit Protobuf dependency now that 3.4.0.2 is released
|
8
|
+
- Guard against nil params in logger blacklist
|
9
|
+
|
5
10
|
### 1.2.3
|
6
11
|
|
7
12
|
- Support nested blacklist parameters in path.to.key format
|
data/gruf.gemspec
CHANGED
@@ -21,15 +21,16 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.name = 'gruf'
|
22
22
|
spec.version = Gruf::VERSION
|
23
23
|
spec.authors = ['Shaun McCormick']
|
24
|
-
spec.email = ['
|
24
|
+
spec.email = ['splittingred@gmail.com']
|
25
|
+
spec.licenses = ['MIT']
|
25
26
|
|
26
|
-
spec.summary =
|
27
|
+
spec.summary = 'gRPC Ruby Framework'
|
27
28
|
spec.description = spec.summary
|
28
29
|
spec.homepage = 'https://github.com/bigcommerce/gruf'
|
29
30
|
|
30
31
|
spec.files = Dir['README.md', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'lib/**/*', 'gruf.gemspec']
|
31
32
|
spec.executables << 'gruf'
|
32
|
-
spec.require_paths = [
|
33
|
+
spec.require_paths = ['lib']
|
33
34
|
|
34
35
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
35
36
|
spec.add_development_dependency 'rake', '~> 10.0'
|
@@ -37,6 +38,5 @@ Gem::Specification.new do |spec|
|
|
37
38
|
|
38
39
|
spec.add_runtime_dependency 'grpc', '~> 1.4'
|
39
40
|
spec.add_runtime_dependency 'grpc-tools', '~> 1.4'
|
40
|
-
spec.add_runtime_dependency 'google-protobuf', '~> 3.3.0'
|
41
41
|
spec.add_runtime_dependency 'activesupport'
|
42
42
|
end
|
@@ -145,31 +145,30 @@ module Gruf
|
|
145
145
|
##
|
146
146
|
# Helper method to recursively redact based on the black list
|
147
147
|
#
|
148
|
-
# @param [Array] The blacklist. ex. 'data.schema' -> [:data, :schema]
|
149
|
-
# @param [Integer] The current index of the blacklist
|
150
|
-
# @param [Hash] The hash of parameters to sanitize
|
151
|
-
# @param [String] The custom redact string
|
152
|
-
#
|
153
|
-
|
154
|
-
|
155
|
-
return if
|
156
|
-
if
|
157
|
-
if params[parts[
|
158
|
-
hash_deep_redact!(params[parts[
|
148
|
+
# @param [Array] parts The blacklist. ex. 'data.schema' -> [:data, :schema]
|
149
|
+
# @param [Integer] idx The current index of the blacklist
|
150
|
+
# @param [Hash] params The hash of parameters to sanitize
|
151
|
+
# @param [String] redacted_string The custom redact string
|
152
|
+
#
|
153
|
+
def redact!(parts = [], idx = 0, params = {}, redacted_string = 'REDACTED')
|
154
|
+
return unless parts.is_a?(Array) && params.is_a?(Hash)
|
155
|
+
return if idx >= parts.size || !params.key?(parts[idx])
|
156
|
+
if idx == parts.size - 1
|
157
|
+
if params[parts[idx]].is_a? Hash
|
158
|
+
hash_deep_redact!(params[parts[idx]], redacted_string)
|
159
159
|
else
|
160
|
-
params[parts[
|
160
|
+
params[parts[idx]] = redacted_string
|
161
161
|
end
|
162
162
|
return
|
163
163
|
end
|
164
|
-
redact!(parts,
|
164
|
+
redact!(parts, idx + 1, params[parts[idx]], redacted_string)
|
165
165
|
end
|
166
166
|
|
167
167
|
##
|
168
168
|
# Helper method to recursively redact the value of all hash keys
|
169
169
|
#
|
170
|
-
# @param [Hash] Part of the hash of parameters to sanitize
|
171
|
-
# @param [String] The custom redact string
|
172
|
-
# @return [Nil]
|
170
|
+
# @param [Hash] hash Part of the hash of parameters to sanitize
|
171
|
+
# @param [String] redacted_string The custom redact string
|
173
172
|
#
|
174
173
|
def hash_deep_redact!(hash, redacted_string)
|
175
174
|
hash.keys.each do |key|
|
data/lib/gruf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gruf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.4'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: google-protobuf
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 3.3.0
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 3.3.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: activesupport
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +96,7 @@ dependencies:
|
|
110
96
|
version: '0'
|
111
97
|
description: gRPC Ruby Framework
|
112
98
|
email:
|
113
|
-
-
|
99
|
+
- splittingred@gmail.com
|
114
100
|
executables:
|
115
101
|
- gruf
|
116
102
|
extensions: []
|
@@ -154,7 +140,8 @@ files:
|
|
154
140
|
- lib/gruf/timer.rb
|
155
141
|
- lib/gruf/version.rb
|
156
142
|
homepage: https://github.com/bigcommerce/gruf
|
157
|
-
licenses:
|
143
|
+
licenses:
|
144
|
+
- MIT
|
158
145
|
metadata: {}
|
159
146
|
post_install_message:
|
160
147
|
rdoc_options: []
|