grpc_access_logging_interceptor 0.0.1 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07c146c49b0d0bc4d7dcdb896f2f42d1844cc5fce15ba7502353e31086c648eb
|
4
|
+
data.tar.gz: bfcaec079594df0c5ca50b9ff2f157b96e101584cc4fa9d074247eb7a6147d47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f7abbfeda2554344b7bbc5822dc8d2f9e5c97fdbfeaac019e5ee378f310cadd92441283f1693f17111222c16b928dc7aeb10611cc3477cb8fbac638365f630
|
7
|
+
data.tar.gz: 1cf87b1a859d3a1bbffa268d364da2334e8222133ef1c3890ca963e2711d0a8f295cc66b32627204f64b5acc09d2c24330192d7488555028ae9dbfc49965033c
|
data/Gemfile.lock
CHANGED
@@ -7,7 +7,7 @@ module GrpcAccessLoggingInterceptor
|
|
7
7
|
|
8
8
|
# @param [#log] logger
|
9
9
|
# @param [#filter, nil] params_filter
|
10
|
-
# @param [#call, nil] custom_data_provider
|
10
|
+
# @param [#call, #execute, nil] custom_data_provider
|
11
11
|
def initialize(logger: DefaultLogger.new, params_filter: nil, custom_data_provider: nil)
|
12
12
|
@logger = logger
|
13
13
|
@params_filter = params_filter
|
@@ -91,7 +91,13 @@ module GrpcAccessLoggingInterceptor
|
|
91
91
|
# @return [Hash]
|
92
92
|
def custom_data(request:, call:, method:)
|
93
93
|
if @custom_data_provider
|
94
|
-
@custom_data_provider.
|
94
|
+
if @custom_data_provider.respond_to?(:call)
|
95
|
+
@custom_data_provider.call(request, call, method)
|
96
|
+
elsif @custom_data_provider.respond_to?(:execute)
|
97
|
+
@custom_data_provider.execute(request, call, method)
|
98
|
+
else
|
99
|
+
raise "custom_data_provider must support #execute or #call!"
|
100
|
+
end
|
95
101
|
else
|
96
102
|
{}
|
97
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc_access_logging_interceptor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nao Minami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|