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: 9a68e9f69eb2185dd62fa4a09fce523451b64b51e1bc235ab10412ebe2ee1e8f
4
- data.tar.gz: 8940b1bd83aea87e84b43c9a7bbd82246529cfcefbc291bb93b4dffc0ae007ea
3
+ metadata.gz: 07c146c49b0d0bc4d7dcdb896f2f42d1844cc5fce15ba7502353e31086c648eb
4
+ data.tar.gz: bfcaec079594df0c5ca50b9ff2f157b96e101584cc4fa9d074247eb7a6147d47
5
5
  SHA512:
6
- metadata.gz: 2ab3910b015437b573ccfde6adc105b303286435eefad110246327469abcbd2c36ec9880ca37af7fbddbd9f244d026db086d1ab39a554a0b52c7ab4807148b96
7
- data.tar.gz: 365573f561f728423a95f13656c5d5a392f000e68ede2b460819a03093506c3f4e0f75fe8d00c3a04ab2a442c910b4eb79841c234aa0d7f7bbeeceb117fe0d40
6
+ metadata.gz: 35f7abbfeda2554344b7bbc5822dc8d2f9e5c97fdbfeaac019e5ee378f310cadd92441283f1693f17111222c16b928dc7aeb10611cc3477cb8fbac638365f630
7
+ data.tar.gz: 1cf87b1a859d3a1bbffa268d364da2334e8222133ef1c3890ca963e2711d0a8f295cc66b32627204f64b5acc09d2c24330192d7488555028ae9dbfc49965033c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grpc_access_logging_interceptor (0.0.1)
4
+ grpc_access_logging_interceptor (0.0.2)
5
5
  grpc
6
6
 
7
7
  GEM
@@ -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.call(request, call, method)
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
@@ -1,3 +1,3 @@
1
1
  module GrpcAccessLoggingInterceptor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  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.1
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-29 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler