bmx-event_hook_client_server 1.1.0 → 1.1.1

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: ed419af695ba5667d416f2fd3826b5297e942aac442c84e7d8d3bc3dca806ac2
4
- data.tar.gz: f3176686619effb003a699fc16212cdfb822a8042e489f28100d73788e649d61
3
+ metadata.gz: 63a2c9b7d294adc003637890075284e79795cf9622ece24e9d2016680a3c9e73
4
+ data.tar.gz: 313d800a4cfc2030511b1c1209d73bc7578844f943133f56c496560f18584279
5
5
  SHA512:
6
- metadata.gz: 3a50cc931db6446dda08c410cfd24bac1cf9329929f5cdb6e342dd47f8b5997b764403a63a118040d583d53ed2384e1b88b01e207816231e71f7cf41c916e4a5
7
- data.tar.gz: 8b81ffe9c68db56bcc4dc27d43ca00635e38d4f544df224073ec2d14f9972ab172e44d665a25a0041f7e3f3732045378a99de7e8a51d870644c6b4f36675235c
6
+ metadata.gz: e12ace1b7f12d12482ae2201c558d9c02897f02f797dfb9442df58c7e1f176c057ebbb87a02126b726ac98648e8c8af73d9ac08ddf598f171c9c1e5a19d74237
7
+ data.tar.gz: 7c83b0702aec04828459c4a8fc3dd67f9757a0ca1979484cd98c8042b59870ae3ededd808ae065a6fd4b112321b4d39057574ac799d91fc5b76ef9ceb26c6f66
@@ -1,33 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bmx-event_hook_client_server (1.0.16)
4
+ bmx-event_hook_client_server (1.1.1)
5
5
  dry-struct (~> 1.0)
6
- google-protobuf (~> 3.9.2)
7
- grpc (~> 1.24.0)
6
+ google-protobuf (~> 3.14)
7
+ grpc (~> 1.34)
8
8
  retriable (~> 3.1.2)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  coderay (1.1.2)
14
- concurrent-ruby (1.1.6)
14
+ concurrent-ruby (1.1.7)
15
15
  diff-lcs (1.3)
16
- dry-configurable (0.11.5)
16
+ dry-configurable (0.12.0)
17
17
  concurrent-ruby (~> 1.0)
18
- dry-core (~> 0.4, >= 0.4.7)
19
- dry-equalizer (~> 0.2)
18
+ dry-core (~> 0.5, >= 0.5.0)
20
19
  dry-container (0.7.2)
21
20
  concurrent-ruby (~> 1.0)
22
21
  dry-configurable (~> 0.1, >= 0.1.3)
23
- dry-core (0.4.9)
22
+ dry-core (0.5.0)
24
23
  concurrent-ruby (~> 1.0)
25
24
  dry-equalizer (0.3.0)
26
25
  dry-inflector (0.2.0)
27
- dry-logic (1.0.6)
26
+ dry-logic (1.1.0)
28
27
  concurrent-ruby (~> 1.0)
29
- dry-core (~> 0.2)
30
- dry-equalizer (~> 0.2)
28
+ dry-core (~> 0.5, >= 0.5)
31
29
  dry-struct (1.3.0)
32
30
  dry-core (~> 0.4, >= 0.4.4)
33
31
  dry-equalizer (~> 0.3)
@@ -40,11 +38,11 @@ GEM
40
38
  dry-equalizer (~> 0.3)
41
39
  dry-inflector (~> 0.1, >= 0.1.2)
42
40
  dry-logic (~> 1.0, >= 1.0.2)
43
- google-protobuf (3.9.2)
44
- googleapis-common-protos-types (1.0.4)
45
- google-protobuf (~> 3.0)
46
- grpc (1.24.0)
47
- google-protobuf (~> 3.8)
41
+ google-protobuf (3.14.0)
42
+ googleapis-common-protos-types (1.0.5)
43
+ google-protobuf (~> 3.11)
44
+ grpc (1.34.0)
45
+ google-protobuf (~> 3.13)
48
46
  googleapis-common-protos-types (~> 1.0)
49
47
  grpc-tools (1.27.0)
50
48
  ice_nine (0.11.2)
@@ -57,8 +57,8 @@ Gem::Specification.new do |spec|
57
57
  spec.require_paths = ['lib']
58
58
 
59
59
  spec.add_dependency 'dry-struct', '~> 1.0'
60
- spec.add_dependency 'google-protobuf', '~> 3.9.2'
61
- spec.add_dependency 'grpc', '~> 1.24.0'
60
+ spec.add_dependency 'google-protobuf', '~> 3.14'
61
+ spec.add_dependency 'grpc', '~> 1.34'
62
62
  spec.add_dependency 'retriable', '~> 3.1.2'
63
63
  # spec.add_dependency 'zeitwerk'
64
64
 
@@ -40,10 +40,14 @@ module EventHookClientServer
40
40
  'grpc.http2.max_ping_strikes': 0,
41
41
  'grpc.http2.min_time_between_pings_ms': 75 * 100,
42
42
  'grpc.http2.min_ping_interval_without_data_ms': 75 * 100
43
- }
43
+ },
44
+ interceptors: []
44
45
  }.freeze
45
46
  private_constant :DEFAULT_CONFIG
46
47
 
48
+ NON_STUB_OPTIONS = %i[host channel_mode].freeze
49
+ private_constant :NON_STUB_OPTIONS
50
+
47
51
  RETRIABLE_ERRORS = [
48
52
  GRPC::DeadlineExceeded, GRPC::Unavailable, GRPC::ResourceExhausted,
49
53
  GRPC::Unknown
@@ -58,7 +62,11 @@ module EventHookClientServer
58
62
  end
59
63
 
60
64
  def self.default_config
61
- @default_config ||= DEFAULT_CONFIG.dup
65
+ @default_config ||= DEFAULT_CONFIG.dup.tap do |config|
66
+ if defined?(ElasticAPM::GRPC::ClientInterceptor)
67
+ config[:interceptors] << ElasticAPM::GRPC::ClientInterceptor.new
68
+ end
69
+ end
62
70
  end
63
71
 
64
72
  attr_reader :hosts
@@ -91,11 +99,12 @@ module EventHookClientServer
91
99
  end
92
100
 
93
101
  def recreate_grpc_client!
102
+ grpc_options = options.reject { |k, _| NON_STUB_OPTIONS.include?(k) }
103
+
94
104
  @grpc_client = GRPC_CLIENT_CLASS.new(
95
105
  hosts.next,
96
106
  options[:channel_mode],
97
- timeout: options[:timeout],
98
- channel_args: options[:channel_args]
107
+ grpc_options
99
108
  )
100
109
  end
101
110
 
@@ -28,12 +28,17 @@ module EventHookClientServer
28
28
  'grpc.http2.max_ping_strikes': 0,
29
29
  'grpc.http2.min_time_between_pings_ms': 75 * 100,
30
30
  'grpc.http2.min_ping_interval_without_data_ms': 75 * 100
31
- }
31
+ },
32
+ interceptors: []
32
33
  }.freeze
33
34
  private_constant :DEFAULT_CONFIG
34
35
 
35
36
  def self.default_config
36
- @default_config ||= DEFAULT_CONFIG.dup
37
+ @default_config ||= DEFAULT_CONFIG.dup.tap do |config|
38
+ if defined?(ElasticAPM::GRPC::ClientInterceptor)
39
+ config[:interceptors] << ElasticAPM::GRPC::ClientInterceptor.new
40
+ end
41
+ end
37
42
  end
38
43
 
39
44
  attr_writer :logger
@@ -3,6 +3,6 @@
3
3
  module EventHookClientServer
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- PATCH = 0
6
+ PATCH = 1
7
7
  VERSION = [MAJOR, MINOR, PATCH].join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmx-event_hook_client_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanko K.R.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.9.2
33
+ version: '3.14'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 3.9.2
40
+ version: '3.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: grpc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.24.0
47
+ version: '1.34'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.24.0
54
+ version: '1.34'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: retriable
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +150,7 @@ metadata:
150
150
  homepage_uri: https://github.com/runslikebutter/event_hook_client_server
151
151
  source_code_uri: https://github.com/runslikebutter/event_hook_client_server
152
152
  changelog_uri: https://github.com/runslikebutter/event_hook_client_server/blob/master/CHANGELOG.md
153
- post_install_message:
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -165,8 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubygems_version: 3.1.2
169
- signing_key:
168
+ rubygems_version: 3.1.4
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: Client and server implementation for the Webhook Configurator service.
172
172
  test_files: []