elastic-transport 8.0.0 → 8.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e53310c92bb9b3e3cb43d0ffb2587e980218f6a4de9052f21fa1dee645b319
|
4
|
+
data.tar.gz: 960f931aff3f04f14d93c45d585b37e1bc23fcf6273d731c7c3ec3d7a217bea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77748ed0f93bbf3c065331bb4d6bc2b76b5ee254a1412728b68feb4c7679277a3eafb39bfd3267a67374cc410b2f9277ceea42e899869624134af5cf7f8429e2
|
7
|
+
data.tar.gz: 645430db2265232b924d2c85877cde70d7e54d8c4ad5f2a0b98003419c61db42ffe0f1629a964436ca4fcbfb1bca5fe29b97f8991784170af6f8219ee83eaed4
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
## 8.0.
|
1
|
+
## 8.0.1
|
2
2
|
|
3
|
-
-
|
4
|
-
-
|
3
|
+
- Minor code cleanup
|
4
|
+
- Adds Elastic Transport service token, updates specs for meta header.
|
5
5
|
|
6
|
-
## 8.0.0
|
6
|
+
## 8.0.0
|
7
7
|
|
8
|
+
- Library renamed from [`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport) to `elastic-transport` and promoted to its own repository.
|
8
9
|
- Fixes tracing for Manticore [commit](https://github.com/elastic/elastic-transport-ruby/commit/98c81d19de4fee394f9c1a5079a1892ec951e0f9).
|
9
10
|
- Implements CA Fingerprinting [pull request](https://github.com/elastic/elastic-transport-ruby/pull/13)
|
10
11
|
- Adds `delay_on_retry` to wait between each failed connection, thanks @DinoPullerUqido! [commit](https://github.com/elastic/elastic-transport-ruby/commit/c2f8311409ca63a293588cb7eea5a0c672dbd436)
|
11
12
|
- Fixes compression, thanks @johnnyshields! [commit](https://github.com/elastic/elastic-transport-ruby/commit/8b326d643f76f037075500e19bbe096b2c298099)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- Library renamed from [`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport) to `elastic-transport` and promoted to its own repository.
|
13
|
+
- Tested in Ruby 3.1, JRuby 9.3, drops Ruby 2.5 in test Matrix. Version 8.0.0 tested for Ruby (MRI) 2.6, 2.7, 3.0 and 3.1 and JRuby 9.3.
|
14
|
+
- Updates Manticore implementation headers setup. When using the Manticore HTTP implementation, adding a custom `User-Agent` value in the headers on initialization would get overwritten. [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/22) - [Issue reported in elastic/elasticsearch-ruby#1684](https://github.com/elastic/elasticsearch-ruby/issues/1684).
|
16
15
|
|
17
16
|
# Changes from elasticsearch-transport:
|
18
17
|
|
@@ -211,14 +211,6 @@ module Elastic
|
|
211
211
|
)
|
212
212
|
end
|
213
213
|
|
214
|
-
def add_header(header)
|
215
|
-
headers = @arguments[:transport_options]&.[](:headers) || {}
|
216
|
-
headers.merge!(header)
|
217
|
-
@arguments[:transport_options].merge!(
|
218
|
-
headers: headers
|
219
|
-
)
|
220
|
-
end
|
221
|
-
|
222
214
|
# Normalizes and returns hosts configuration.
|
223
215
|
#
|
224
216
|
# Arrayifies the `hosts_config` argument and extracts `host` and `port` info from strings.
|
@@ -26,14 +26,14 @@ describe Elastic::Transport::Client do
|
|
26
26
|
let(:adapter_code) { "nh=#{defined?(Net::HTTP::VERSION) ? Net::HTTP::VERSION : Net::HTTP::HTTPVersion}" }
|
27
27
|
let(:meta_header) do
|
28
28
|
if jruby?
|
29
|
-
"
|
29
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION},jv=#{ENV_JAVA['java.version']},jr=#{JRUBY_VERSION},fd=#{Faraday::VERSION},#{adapter_code}"
|
30
30
|
else
|
31
|
-
"
|
31
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION},fd=#{Faraday::VERSION},#{adapter_code}"
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
context 'client_meta_version' do
|
36
|
-
let(:version) { ['7.1.0-alpha', '7.11.0.pre.1', '8.0.0-beta', '8.0.0.beta.2']}
|
36
|
+
let(:version) { ['7.1.0-alpha', '7.11.0.pre.1', '8.0.0-beta', '8.0.0.beta.2'] }
|
37
37
|
|
38
38
|
it 'converts the version to X.X.Xp' do
|
39
39
|
expect(client.send(:client_meta_version, '7.0.0-alpha')).to eq('7.0.0p')
|
@@ -81,9 +81,9 @@ describe Elastic::Transport::Client do
|
|
81
81
|
context 'adapters' do
|
82
82
|
let(:meta_header) do
|
83
83
|
if jruby?
|
84
|
-
"
|
84
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION},jv=#{ENV_JAVA['java.version']},jr=#{JRUBY_VERSION},fd=#{Faraday::VERSION}"
|
85
85
|
else
|
86
|
-
"
|
86
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION},fd=#{Faraday::VERSION}"
|
87
87
|
end
|
88
88
|
end
|
89
89
|
let(:client) { described_class.new(adapter: adapter) }
|
@@ -246,9 +246,9 @@ describe Elastic::Transport::Client do
|
|
246
246
|
let(:subject) { client.instance_variable_get('@arguments')[:transport_options][:headers] }
|
247
247
|
let(:meta_header) do
|
248
248
|
if jruby?
|
249
|
-
"
|
249
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION},jv=#{ENV_JAVA['java.version']},jr=#{JRUBY_VERSION}"
|
250
250
|
else
|
251
|
-
"
|
251
|
+
"et=#{meta_version},rb=#{RUBY_VERSION},t=#{Elastic::Transport::VERSION}"
|
252
252
|
end
|
253
253
|
end
|
254
254
|
|
@@ -258,14 +258,29 @@ describe Elastic::Transport::Client do
|
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
261
|
-
context 'when
|
261
|
+
context 'when Elasticsearch is being used' do
|
262
262
|
before do
|
263
|
-
stub_const('Elastic::ELASTICSEARCH_SERVICE_VERSION', [:
|
263
|
+
stub_const('Elastic::ELASTICSEARCH_SERVICE_VERSION', [:es, '8.0.0'])
|
264
264
|
end
|
265
265
|
|
266
266
|
let(:client) { Elastic::Transport::Client.new }
|
267
267
|
|
268
268
|
it 'sets the service version in the metaheader' do
|
269
|
+
allow_any_instance_of(Kernel).to receive(:caller).and_return(['elasticsearch'])
|
270
|
+
expect(subject['x-elastic-client-meta']).to match(regexp)
|
271
|
+
expect(subject['x-elastic-client-meta']).to start_with('es=8.0.0')
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
context 'when Enterprise Search is being used' do
|
276
|
+
before do
|
277
|
+
stub_const('Elastic::ENTERPRISE_SERVICE_VERSION', [:ent, '8.0.0'])
|
278
|
+
end
|
279
|
+
|
280
|
+
let(:client) { Elastic::Transport::Client.new }
|
281
|
+
|
282
|
+
it 'sets the service version in the metaheader' do
|
283
|
+
allow_any_instance_of(Kernel).to receive(:caller).and_return(['enterprise-search-ruby'])
|
269
284
|
expect(subject['x-elastic-client-meta']).to match(regexp)
|
270
285
|
expect(subject['x-elastic-client-meta']).to start_with('ent=8.0.0')
|
271
286
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.0.
|
4
|
+
version: 8.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-05-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|