avro_turf 1.13.0 → 1.14.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72327ac5cc542eaaf881cd7ab9fc6ad3189f488abdcd6119a39b7e51c9545e6e
4
- data.tar.gz: e5af812736913725238ac20778151c706776cc619625e60ec6448460289827c8
3
+ metadata.gz: a1c7e87bc8dc94207072e7d09f7ddc844c31b81d3ff46825fa49b5c2548d316c
4
+ data.tar.gz: 83b58c9806c7b24096f6c615e5d9e0c260cb1cf37e95e7f87134fbfc8c35bdf1
5
5
  SHA512:
6
- metadata.gz: 404704ea23a71ccbfd34354904c3a45ef52abf6c6d75c67570355e67a83b33a3f1b694baf6134e5d539c062aebd7509ee65da5ca8a9684f973d749860288f66b
7
- data.tar.gz: bd5ffed0531358a52c355d73994ab6daec49f8da69b96f914d0f75dfcf8f049a84c02d8ac6f3b25cabe416640cfb82130c97ebfa6253c2321cefdafca44b1a32
6
+ metadata.gz: 4c8e705866a589d86bbfcb44f4715b4fc089968a329fbbdd00b56476f905d096b224d013fb8db115c2c307b438d58e37d3a7be184a46dfdc5bf8cc3d4c9710a5
7
+ data.tar.gz: deb82d030abf247b7d1616250d964c6ade5c91fa4e8fcf5247d5157d9d013efe387b3255da0b1364855a28a0a7282de8dd1e29b5e616aba63a5f400400049287
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v1.14.0
6
+
7
+ - Add `resolv_resolver` parameter to `AvroTurf::Messaging` to make use of custom domain name resolvers and their options, for example `nameserver` and `timeouts` (#202)
8
+ - Stop using `Excon`'s `dns_timeouts` in favour of `resolv_resolver` because `dns_timeouts` is now deprecated due to https://github.com/excon/excon/issues/832 (#202)
9
+
5
10
  ## v1.13.0
6
11
 
7
12
  - Set `idempotent: true` for the request except one that registers a new schema (#199)
data/avro_turf.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "avro", ">= 1.8.0", "< 1.12"
23
- spec.add_dependency "excon", "~> 0.103"
23
+ spec.add_dependency "excon", "~> 0.104"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 2.0"
26
26
  spec.add_development_dependency "rake", "~> 13.0"
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "sinatra"
31
31
  spec.add_development_dependency "json_spec"
32
32
  spec.add_development_dependency "rack-test"
33
+ spec.add_development_dependency "resolv"
33
34
 
34
35
  spec.post_install_message = %{
35
36
  avro_turf v0.8.0 deprecates the names AvroTurf::SchemaRegistry,
@@ -16,7 +16,8 @@ class AvroTurf::ConfluentSchemaRegistry
16
16
  client_cert_data: nil,
17
17
  client_key_data: nil,
18
18
  path_prefix: nil,
19
- connect_timeout: nil
19
+ connect_timeout: nil,
20
+ resolv_resolver: nil
20
21
  )
21
22
  @path_prefix = path_prefix
22
23
  @logger = logger
@@ -36,7 +37,7 @@ class AvroTurf::ConfluentSchemaRegistry
36
37
  client_cert_data: client_cert_data,
37
38
  client_key_data: client_key_data,
38
39
  connect_timeout: connect_timeout,
39
- dns_timeouts: connect_timeout
40
+ resolv_resolver: resolv_resolver
40
41
  )
41
42
  end
42
43
 
@@ -55,7 +55,8 @@ class AvroTurf
55
55
  # client_key_pass - Password to go with client_key (optional).
56
56
  # client_cert_data - In-memory client certificate (optional).
57
57
  # client_key_data - In-memory client private key to go with client_cert_data (optional).
58
- # connect_timeout - Timeout to use in the connection with the domain name server and the schema registry (optional).
58
+ # connect_timeout - Timeout to use in the connection with the schema registry (optional).
59
+ # resolv_resolver - Custom domain name resolver (optional).
59
60
  def initialize(
60
61
  registry: nil,
61
62
  registry_url: nil,
@@ -73,7 +74,8 @@ class AvroTurf
73
74
  client_key_pass: nil,
74
75
  client_cert_data: nil,
75
76
  client_key_data: nil,
76
- connect_timeout: nil
77
+ connect_timeout: nil,
78
+ resolv_resolver: nil
77
79
  )
78
80
  @logger = logger || Logger.new($stderr)
79
81
  @namespace = namespace
@@ -92,7 +94,8 @@ class AvroTurf
92
94
  client_cert_data: client_cert_data,
93
95
  client_key_data: client_key_data,
94
96
  path_prefix: registry_path_prefix,
95
- connect_timeout: connect_timeout
97
+ connect_timeout: connect_timeout,
98
+ resolv_resolver: resolv_resolver
96
99
  )
97
100
  )
98
101
  @schemas_by_id = {}
@@ -1,3 +1,3 @@
1
1
  class AvroTurf
2
- VERSION = "1.13.0"
2
+ VERSION = "1.14.0"
3
3
  end
@@ -444,7 +444,31 @@ describe AvroTurf::Messaging do
444
444
  it_behaves_like 'encoding and decoding with the schema_id from registry'
445
445
 
446
446
  it 'passes the connect timeout setting to Excon' do
447
- expect(Excon).to receive(:new).with(anything, hash_including(connect_timeout: 10, dns_timeouts: 10)).and_call_original
447
+ expect(Excon).to receive(:new).with(anything, hash_including(connect_timeout: 10)).and_call_original
448
+ avro
449
+ end
450
+ end
451
+
452
+ context 'with a custom domain name resolver' do
453
+ let(:resolv_resolver) { Resolv.new([Resolv::Hosts.new, Resolv::DNS.new(nameserver: ['127.0.0.1', '127.0.0.1'])]) }
454
+ let(:avro) {
455
+ AvroTurf::Messaging.new(
456
+ registry_url: registry_url,
457
+ schemas_path: "spec/schemas",
458
+ logger: logger,
459
+ client_cert: client_cert,
460
+ client_key: client_key,
461
+ client_key_pass: client_key_pass,
462
+ resolv_resolver: resolv_resolver
463
+ )
464
+ }
465
+
466
+ it_behaves_like "encoding and decoding with the schema from schema store"
467
+ it_behaves_like 'encoding and decoding with the schema from registry'
468
+ it_behaves_like 'encoding and decoding with the schema_id from registry'
469
+
470
+ it 'passes the domain name resolver setting to Excon' do
471
+ expect(Excon).to receive(:new).with(anything, hash_including(resolv_resolver: resolv_resolver)).and_call_original
448
472
  avro
449
473
  end
450
474
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avro_turf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-14 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.103'
39
+ version: '0.104'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.103'
46
+ version: '0.104'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -156,6 +156,20 @@ dependencies:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: resolv
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
159
173
  description:
160
174
  email:
161
175
  - dasch@zendesk.com