elastomer-client 6.2.4 → 6.4.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: dbe422fb7bc08b549b999407db3d3dc8c77cf49c2f2127aea4506ae2c01bc4f9
4
- data.tar.gz: '08256f2400c80e543d286f524729b09e74193eccc386f7c8ae3b336de2b99ed0'
3
+ metadata.gz: 6b3315c51507c8f2c6c2ccb8ab81b3400022fc68816c37cb9f29a654e755e65f
4
+ data.tar.gz: '0427950c98fa067d7590d5580f2013f77112318227e62f85d149ecae12e38af1'
5
5
  SHA512:
6
- metadata.gz: e76ba6164748098c98e7fb355e7c40c60c2a20704893c05c80c06bd3b32680fab28d67b08385a1837c7086916f51643296e1b8f1f7f4138cb99f3a81f4fdb70a
7
- data.tar.gz: 89b7f13ca902a3488e92738eeb8cc9f5d575193ce4c72da9e73e732be21654cbadf468509f1da25b37234d6644c86b84115471df23a3a2e31dbae78257c2b493
6
+ metadata.gz: 4e602227a7aea7dc6d187f27ee0bf7476347c832f4e665503f6fb26c67cb05f63f711319ae965980ece4a462593cc4b37c9aebf9f4516cdb7bc63176f5cd5094
7
+ data.tar.gz: 34fbbc8e4326e69dcab6028664171651731ca9bf2570e718f368b1c6067ff654aa23b51b565e188d4916295d54dd3c52d2ced3a67ed5d6ec361828aa9a2f216b
@@ -9,3 +9,5 @@ updates:
9
9
  directory: '/'
10
10
  schedule:
11
11
  interval: 'weekly'
12
+ cooldown:
13
+ default-days: 7
@@ -12,20 +12,26 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  ruby-version: ['3.2']
15
- ES_VERSION: ['8.18.0']
15
+ gemfile: ['faraday_1', 'faraday_2']
16
+ ES_VERSION: ['8.18.0', '9.5.6']
16
17
  include:
17
18
  - ES_VERSION: '8.18.0'
18
19
  ES_DOWNLOAD_URL: >-
19
20
  https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.18.0-linux-x86_64.tar.gz
21
+ - ES_VERSION: '9.5.6'
22
+ ES_DOWNLOAD_URL: >-
23
+ https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-9.5.6-linux-x86_64.tar.gz
24
+ env:
25
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
20
26
  steps:
21
- - uses: ruby/setup-ruby@v1
27
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
28
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
22
29
  with:
23
30
  ruby-version: ${{ matrix.ruby-version }}
24
31
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25
- - uses: actions/checkout@v4
26
32
  - name: Cache Elasticsearch
27
33
  id: cache-elasticsearch
28
- uses: actions/cache@v4
34
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
29
35
  env:
30
36
  cache-name: cache-elasticsearch
31
37
  with:
@@ -7,8 +7,8 @@ jobs:
7
7
  build:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v4
11
- - uses: ruby/setup-ruby@v1
10
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
11
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
12
12
  with:
13
13
  ruby-version: '3.2'
14
14
  bundler-cache: true
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /vendor/cache/*.gem
7
7
  /coverage
8
8
  Gemfile.lock
9
+ gemfiles/*.lock
9
10
  *.gem
10
11
  tags
11
12
  .byebug_history
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 6.4.0 (2026-11-04)
2
+ - Add Elasticsearch 9.5.6 support while retaining Elasticsearch 8.x support.
3
+ - Keep Elasticsearch timeout errors retryable when returned with HTTP status 429.
4
+
5
+ ## 6.3.0 (2026-06-22)
6
+ - Add support for Faraday 2 (now compatible with both Faraday 1.x and 2.x)
7
+ - Drop the deprecated `faraday_middleware` dependency in favor of `faraday-gzip`
8
+
1
9
  ## 6.2.4 (2025-10-10)
2
10
  - Added support for ES 8.19.3
3
11
 
data/Gemfile CHANGED
@@ -8,6 +8,9 @@ group :development do
8
8
  gem "activesupport", ">= 7.0"
9
9
  gem "bundler", "~> 2.0"
10
10
  gem "debug", "~> 1.7"
11
+ # The default bundle resolves Faraday 2.x, where the :retry middleware lives in the
12
+ # faraday-retry gem (it is in core on 1.x). Needed for the retry test; consumers opt in.
13
+ gem "faraday-retry", require: "faraday/retry"
11
14
  gem "minitest", "~> 5.17"
12
15
  gem "minitest-focus", "~> 1.3"
13
16
  gem "rake"
@@ -17,6 +20,5 @@ group :development do
17
20
  gem "rubocop-performance", "~> 1.21.0"
18
21
  gem "rubocop-rake", "~> 0.6.0"
19
22
  gem "simplecov", require: false
20
- gem "spy", "~> 1.0"
21
23
  gem "webmock", "~> 3.5"
22
24
  end
data/README.md CHANGED
@@ -114,6 +114,7 @@ This client is tested against:
114
114
  - 5.6
115
115
  - 8.13
116
116
  - 8.18
117
+ - 9.5.6
117
118
 
118
119
  ## Development
119
120
 
@@ -140,7 +141,7 @@ script/bootstrap
140
141
 
141
142
  ### Start an Elasticsearch server in Docker
142
143
 
143
- To run ES 5 and ES 8:
144
+ To run ES 5, ES 8, and ES 9:
144
145
  ```
145
146
  docker compose --project-directory docker --profile all up
146
147
  ```
@@ -155,6 +156,11 @@ To run only ES 8:
155
156
  docker compose --project-directory docker --profile es8 up
156
157
  ```
157
158
 
159
+ To run only ES 9:
160
+ ```
161
+ docker compose --project-directory docker --profile es9 up
162
+ ```
163
+
158
164
  To run only ES 5:
159
165
  ```
160
166
  docker compose --project-directory docker --profile es5 up
@@ -162,6 +168,11 @@ docker compose --project-directory docker --profile es5 up
162
168
 
163
169
  ### Run tests against a version of Elasticsearch
164
170
 
171
+ ES 9
172
+ ```
173
+ ES_PORT=9210 rake test
174
+ ```
175
+
165
176
  ES 8
166
177
  ```
167
178
  ES_PORT=9208 rake test
data/docker/compose.yaml CHANGED
@@ -1,6 +1,34 @@
1
1
  version: "3"
2
2
 
3
3
  services:
4
+ elasticsearch9.5:
5
+ image: docker.elastic.co/elasticsearch/elasticsearch:9.5.6
6
+ container_name: es9.5
7
+ profiles: ["es9", "all"]
8
+ environment:
9
+ - cluster.name=elastomer9.5
10
+ - bootstrap.memory_lock=true
11
+ - discovery.type=single-node
12
+ - xpack.security.enabled=false
13
+ - xpack.watcher.enabled=false
14
+ - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
15
+ - node.roles=[master,data,remote_cluster_client]
16
+ ulimits:
17
+ memlock:
18
+ soft: -1
19
+ hard: -1
20
+ nofile:
21
+ soft: 65536
22
+ hard: 65536
23
+ mem_limit: 2g
24
+ cap_add:
25
+ - IPC_LOCK
26
+ volumes:
27
+ - esrepos9:/usr/share/elasticsearch/repos
28
+ - ./elasticsearch8plus.yml:/usr/share/elasticsearch/config/elasticsearch.yml
29
+ ports:
30
+ - 127.0.0.1:${ES_9_PORT:-9210}:9200
31
+
4
32
  elasticsearch8.18:
5
33
  image: docker.elastic.co/elasticsearch/elasticsearch:8.18.0
6
34
  container_name: es8.18
@@ -85,6 +113,12 @@ services:
85
113
  - 127.0.0.1:${ES_5_PORT:-9205}:9200
86
114
 
87
115
  volumes:
116
+ esrepos9:
117
+ driver: local
118
+ driver_opts:
119
+ device: tmpfs
120
+ type: tmpfs
121
+ o: size=100m,uid=102,gid=102
88
122
  esrepos8:
89
123
  driver: local
90
124
  driver_opts:
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ["lib"]
23
23
 
24
24
  spec.add_dependency "addressable", "~> 2.5"
25
- spec.add_dependency "faraday", ">= 0.17"
26
- spec.add_dependency "faraday_middleware", ">= 0.14"
25
+ spec.add_dependency "faraday", ">= 1.0", "< 3"
26
+ spec.add_dependency "faraday-gzip", ">= 1.0"
27
27
  spec.add_dependency "multi_json", "~> 1.12"
28
28
  spec.add_dependency "semantic", "~> 1.6"
29
29
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Tests elastomer-client against Faraday 1.x.
4
+ #
5
+ # faraday-gzip works on both Faraday 1.x and 2.x and provides the :gzip request middleware
6
+ # used for response decompression (replacing the deprecated faraday_middleware).
7
+ source "https://rubygems.org"
8
+
9
+ gem "faraday", "~> 1.10"
10
+
11
+ gemspec path: ".."
12
+
13
+ group :development do
14
+ gem "activesupport", ">= 7.0"
15
+ gem "bundler", "~> 2.0"
16
+ gem "debug", "~> 1.7"
17
+ gem "minitest", "~> 5.17"
18
+ gem "minitest-focus", "~> 1.3"
19
+ gem "rake"
20
+ gem "rubocop", "~> 1.63.0"
21
+ gem "rubocop-github", "~> 0.20.0"
22
+ gem "rubocop-minitest", "~> 0.35.0"
23
+ gem "rubocop-performance", "~> 1.21.0"
24
+ gem "rubocop-rake", "~> 0.6.0"
25
+ gem "simplecov", require: false
26
+ gem "webmock", "~> 3.5"
27
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Tests elastomer-client against Faraday 2.x.
4
+ #
5
+ # This is the configuration the monolith targets after the Faraday 2 upgrade. faraday-gzip
6
+ # provides the :gzip request middleware (response decompression) on Faraday 2.x.
7
+ source "https://rubygems.org"
8
+
9
+ gem "faraday", "~> 2.0"
10
+
11
+ gemspec path: ".."
12
+
13
+ group :development do
14
+ gem "activesupport", ">= 7.0"
15
+ gem "bundler", "~> 2.0"
16
+ gem "debug", "~> 1.7"
17
+ # On Faraday 2.x the :retry middleware lives in the faraday-retry gem (it is in core on
18
+ # 1.x). Consumers opt into retries via a connection block; the suite covers that path.
19
+ gem "faraday-retry", require: "faraday/retry"
20
+ gem "minitest", "~> 5.17"
21
+ gem "minitest-focus", "~> 1.3"
22
+ gem "rake"
23
+ gem "rubocop", "~> 1.63.0"
24
+ gem "rubocop-github", "~> 0.20.0"
25
+ gem "rubocop-minitest", "~> 0.35.0"
26
+ gem "rubocop-performance", "~> 1.21.0"
27
+ gem "rubocop-rake", "~> 0.6.0"
28
+ gem "simplecov", require: false
29
+ gem "webmock", "~> 3.5"
30
+ end