elastic-transport 8.1.0 → 8.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/license.yml +1 -1
- data/.github/workflows/tests.yml +8 -48
- data/.gitignore +1 -1
- data/CHANGELOG.md +15 -1
- data/Gemfile +8 -4
- data/README.md +7 -518
- data/Rakefile +1 -39
- data/elastic-transport.gemspec +8 -5
- data/lib/elastic/transport/client.rb +10 -12
- data/lib/elastic/transport/meta_header.rb +8 -8
- data/lib/elastic/transport/transport/base.rb +5 -3
- data/lib/elastic/transport/transport/http/curb.rb +25 -28
- data/lib/elastic/transport/transport/http/manticore.rb +1 -1
- data/lib/elastic/transport/transport/response.rb +3 -3
- data/lib/elastic/transport/transport/sniffer.rb +3 -1
- data/lib/elastic/transport/version.rb +1 -1
- data/spec/elastic/transport/base_spec.rb +24 -27
- data/spec/elastic/transport/client_spec.rb +7 -14
- data/spec/elastic/transport/meta_header_spec.rb +2 -2
- data/spec/elastic/transport/sniffer_spec.rb +18 -0
- data/spec/spec_helper.rb +0 -4
- data/test/integration/jruby_test.rb +1 -1
- data/test/integration/transport_test.rb +40 -86
- data/test/test_helper.rb +5 -9
- data/test/unit/transport_base_test.rb +7 -8
- data/test/unit/transport_curb_test.rb +3 -2
- metadata +70 -17
- data/Gemfile-faraday1.gemfile +0 -39
- data/test/unit/adapters_test.rb +0 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f977afd217e311b260201a62db8a2a2a672441c105a24a01d57dca297589c03
|
4
|
+
data.tar.gz: 4c10a784bc750400d6461095c7ff82a37efbc0d5968726f9776488b19b33c97a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29e8f88f113b5322a40bd26f32adfb4712ea8274ac7b3520ee2f366fb48db8e223da353264cace594c0567614ec589180046fbfe1f89c8157e2643a93478ff83
|
7
|
+
data.tar.gz: d1e142bd3b71f246bfb56100d5e61d8d8e70360502eaa1e2071b848367b5f56f1020dba78f69aa38524a011ba0d7b96c18085aa37195e033fcf8aad3cbd6e990
|
data/.github/workflows/tests.yml
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
name:
|
1
|
+
name: 8.1 tests
|
2
2
|
on:
|
3
3
|
push:
|
4
4
|
branches:
|
5
|
-
-
|
5
|
+
- 8.1
|
6
6
|
pull_request:
|
7
7
|
branches:
|
8
|
-
-
|
8
|
+
- 8.1
|
9
9
|
jobs:
|
10
|
-
test:
|
11
|
-
name: 'Main tests'
|
10
|
+
test-ruby:
|
12
11
|
env:
|
13
12
|
TEST_ES_SERVER: http://localhost:9250
|
14
13
|
PORT: 9250
|
15
14
|
strategy:
|
16
15
|
fail-fast: false
|
17
16
|
matrix:
|
18
|
-
ruby: [ '2.7', '3.0', '3.1', 'jruby-9.3' ]
|
19
|
-
es_version: ['8.2-SNAPSHOT', '8.3-SNAPSHOT', '8.4-SNAPSHOT']
|
17
|
+
ruby: [ '2.7', '3.0', '3.1', '3.2', 'jruby-9.3', 'jruby-9.4' ]
|
20
18
|
runs-on: ubuntu-latest
|
21
19
|
steps:
|
22
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v3
|
23
21
|
- name: Increase system limits
|
24
22
|
run: |
|
25
23
|
sudo swapoff -a
|
@@ -28,7 +26,7 @@ jobs:
|
|
28
26
|
sudo sysctl -w vm.max_map_count=262144
|
29
27
|
- uses: elastic/elastic-github-actions/elasticsearch@master
|
30
28
|
with:
|
31
|
-
stack-version:
|
29
|
+
stack-version: 8.9-SNAPSHOT
|
32
30
|
security-enabled: false
|
33
31
|
- uses: ruby/setup-ruby@v1
|
34
32
|
with:
|
@@ -45,42 +43,4 @@ jobs:
|
|
45
43
|
run: bundle exec rake test:spec
|
46
44
|
- name: integration tests
|
47
45
|
run: bundle exec rake test:integration
|
48
|
-
|
49
|
-
name: 'Test Faraday 1'
|
50
|
-
env:
|
51
|
-
TEST_ES_SERVER: http://localhost:9250
|
52
|
-
PORT: 9250
|
53
|
-
strategy:
|
54
|
-
fail-fast: false
|
55
|
-
matrix:
|
56
|
-
ruby: [ '2.7', '3.0', '3.1', 'jruby-9.3' ]
|
57
|
-
es_version: ['8.3.0-SNAPSHOT']
|
58
|
-
runs-on: ubuntu-latest
|
59
|
-
steps:
|
60
|
-
- uses: actions/checkout@v2
|
61
|
-
- name: Increase system limits
|
62
|
-
run: |
|
63
|
-
sudo swapoff -a
|
64
|
-
sudo sysctl -w vm.swappiness=1
|
65
|
-
sudo sysctl -w fs.file-max=262144
|
66
|
-
sudo sysctl -w vm.max_map_count=262144
|
67
|
-
- uses: elastic/elastic-github-actions/elasticsearch@master
|
68
|
-
with:
|
69
|
-
stack-version: ${{ matrix.es_version }}
|
70
|
-
security-enabled: false
|
71
|
-
- uses: ruby/setup-ruby@v1
|
72
|
-
with:
|
73
|
-
ruby-version: ${{ matrix.ruby }}
|
74
|
-
- name: Build and test with Rake
|
75
|
-
run: |
|
76
|
-
sudo apt-get update
|
77
|
-
sudo apt-get install libcurl4-openssl-dev
|
78
|
-
ruby -v
|
79
|
-
gem install bundler
|
80
|
-
BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle install
|
81
|
-
- name: faraday1 unit tests
|
82
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:unit
|
83
|
-
- name: specs
|
84
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:spec
|
85
|
-
- name: integration tests
|
86
|
-
run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:integration
|
46
|
+
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,24 @@
|
|
1
|
+
## 8.1.2
|
2
|
+
|
3
|
+
Backports the following fix from 8.2:
|
4
|
+
|
5
|
+
- Fixes enforcing UTF-8 in Response body, causing an error when the string is frozen, particularly when using webmock. [issue #63](https://github.com/elastic/elastic-transport-ruby/issues/63)
|
6
|
+
|
7
|
+
## 8.1.1
|
8
|
+
|
9
|
+
Backports the following updates from 8.2:
|
10
|
+
|
11
|
+
- Refactors `apply_headers` in base and manticore implementation: When passing in an object to the initializer, `apply_headers` would mutate this object and in certain conditions, this would raise `RuntimeError` in JRuby 9.3 and `ConcurrencyError` in JRuby 9.4. This update clones the options object instead.
|
12
|
+
- Fixes [issue #44](https://github.com/elastic/elastic-transport-ruby/issues/44), raising `Elastic::Transport::Transport::Error` instead of `Faraday::ConnectionFailed` (or any other Faraday error class) when a host is unreachable.
|
13
|
+
- Fixes parsing ipv4 addresses like `inet[/127.0.0.1:9200]` in sniffer, [issue #48](https://github.com/elastic/elastic-transport-ruby/issues/48). [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/49) by [@robbat2](https://github.com/robbat2), thank you!
|
14
|
+
|
1
15
|
## 8.1.0
|
2
16
|
|
3
17
|
Adds support for Faraday version 2. From [Faraday's Upgrading guide](https://github.com/lostisland/faraday/blob/main/UPGRADING.md#faraday-20), the main change is the adapters have moved:
|
4
18
|
|
5
19
|
> With this release, we've officially moved all adapters, except for the net_http one, out of Faraday. What that means, is that they won't be available out-of-the-box anymore, and you'll instead need to add them to your Gemfile.
|
6
20
|
> If you just use the default net_http adapter, then you don't need to do anything!
|
7
|
-
> Otherwise, add the corresponding adapter gem to your Gemfile (e.g. faraday-net_http_persistent). Then, simply require them after you require faraday.
|
21
|
+
> Otherwise, add the corresponding adapter gem to your Gemfile (e.g. faraday-net_http_persistent). Then, simply require them after you require faraday.
|
8
22
|
|
9
23
|
We're now supporting Faraday v2 and Faraday v1. The adapters were removed as development dependency in the gemspec and added to the Gemfile. A new file `Gemfile-faraday1.gemfile` was added to run tests with version `1.x` of Faraday too.
|
10
24
|
|
data/Gemfile
CHANGED
@@ -20,11 +20,15 @@ source 'https://rubygems.org'
|
|
20
20
|
# Specify your gem's dependencies in elasticsearch-transport.gemspec
|
21
21
|
gemspec
|
22
22
|
|
23
|
+
if File.exist? File.expand_path('../elasticsearch-api/elasticsearch-api.gemspec', __dir__)
|
24
|
+
gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __dir__), require: false
|
25
|
+
end
|
26
|
+
|
27
|
+
if File.exist? File.expand_path('../elasticsearch/elasticsearch.gemspec', __dir__)
|
28
|
+
gem 'elasticsearch', path: File.expand_path('../elasticsearch', __dir__), require: false
|
29
|
+
end
|
30
|
+
|
23
31
|
group :development, :test do
|
24
|
-
gem 'faraday-httpclient'
|
25
|
-
gem 'faraday-net_http_persistent'
|
26
|
-
gem 'faraday-patron' unless defined? JRUBY_VERSION
|
27
|
-
gem 'faraday-typhoeus'
|
28
32
|
gem 'rspec'
|
29
33
|
if defined?(JRUBY_VERSION)
|
30
34
|
gem 'pry-nav'
|