gruf 1.2.3 → 1.2.4

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
  SHA1:
3
- metadata.gz: 6c3c699dd26122a8e6fb4d74ea2c86b3c4d52900
4
- data.tar.gz: 41f9f4833353086c36421a155dd66076416d9e00
3
+ metadata.gz: a89536c6ad70dba812d8cb87b9220fc91ddc9e89
4
+ data.tar.gz: 629b82c3c4db84871a5799542466097ab794c0ce
5
5
  SHA512:
6
- metadata.gz: ce500f6213a21560ff8a7dc0b2e8f8e5b64d0f93ebf29b5474c9ad1ba557994504d6fc67100eef18f1feac0a4aa422e7a7ba795bf25d49f88be05af175bbc019
7
- data.tar.gz: 548b0fff743db41630cc4aae899a1886a5be5a591bac0f8a4170a35205cead1db0ff9daef2c2c944b907a4c535071b5a4c9f08ff49cf43080bdc72fd8411dd19
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 = ['shaun.mccormick@bigcommerce.com']
24
+ spec.email = ['splittingred@gmail.com']
25
+ spec.licenses = ['MIT']
25
26
 
26
- spec.summary = %q{gRPC Ruby Framework}
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 = ["lib"]
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
- # @return [Nil]
153
- #
154
- def redact!(parts, i, params, redacted_string)
155
- return if i >= parts.size || !params.key?(parts[i])
156
- if i == parts.size - 1
157
- if params[parts[i]].is_a? Hash
158
- hash_deep_redact!(params[parts[i]], redacted_string)
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[i]] = redacted_string
160
+ params[parts[idx]] = redacted_string
161
161
  end
162
162
  return
163
163
  end
164
- redact!(parts, i + 1, params[parts[i]], redacted_string)
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
@@ -15,5 +15,5 @@
15
15
  # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
16
  #
17
17
  module Gruf
18
- VERSION = '1.2.3'.freeze
18
+ VERSION = '1.2.4'.freeze
19
19
  end
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.3
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
- - shaun.mccormick@bigcommerce.com
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: []