es-elasticity 1.0.1 → 1.1.0

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: 8c13e2b279bf48ef4d133c348954b1b8b19c07a9e3f8af7e539d3bf0e359f485
4
- data.tar.gz: d9ca4629b1c2c091fb77cac05213b944ef4d877a845f3d6c8e606a37cfbc6fec
3
+ metadata.gz: 199962dd3d7976f5fcefe948bed04e6c568d332c3ac6a9ecd1e5c89893a5f01a
4
+ data.tar.gz: e8a326cfa07858cb01a82ff47e735787fa517e36bebb1606d9c2965ce5b0966d
5
5
  SHA512:
6
- metadata.gz: 01d086f62d915982aeae1fa1135836f8442c6eb578ff8c6daa1bfcb8bd4d70b0e54647a38e3b8d22fac0a477afc6ff11cfcc832215acca5d93f8db4d70344065
7
- data.tar.gz: 8df1713fd97df4ce332d48a72b6ae9e364a591cc17ca19f6e6a3c621157f595936c84122b8d515ccc18044e2f272da891e2ab22bce4445cc24c00cd112cb74c0
6
+ metadata.gz: ad6cd3a7af2e3f74f9f7f66670071400ae03576125f525a7c54c70a85a56507b7a8b2dce5bd7140a19c21c82e301ed64ee5b6e10421c703701b549a3a64c6647
7
+ data.tar.gz: 8a88dbdf4c9c0809e31c3aab5c6b1f315d47e21edc286540b30c1891371a0176fee5a6943c2a7e95f60c14da350a50a1d8ba272eaf70fcb34a122fac3a588aba
data/.circleci/config.yml CHANGED
@@ -19,7 +19,7 @@ executors:
19
19
  - image: cimg/ruby:2.7
20
20
  environment:
21
21
  BUNDLE_VERSION: '~> 2.3.4'
22
- - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
22
+ - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
23
23
  environment:
24
24
  - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
25
25
  - discovery.type=single-node
@@ -30,7 +30,7 @@ executors:
30
30
  - image: cimg/ruby:3.0
31
31
  environment:
32
32
  BUNDLE_VERSION: '~> 2.3.4'
33
- - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
33
+ - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
34
34
  environment:
35
35
  - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
36
36
  - discovery.type=single-node
@@ -42,7 +42,7 @@ executors:
42
42
  - image: cimg/ruby:3.1
43
43
  environment:
44
44
  BUNDLE_VERSION: '~> 2.3.4'
45
- - image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
45
+ - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
46
46
  environment:
47
47
  - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
48
48
  - discovery.type=single-node
data/CHANGELOG.md CHANGED
@@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [1.1.0] - 2023-05-02
8
+ ### Changed
9
+ - Updated the max elasticsearch dependency version to < 8.7
8
10
 
9
11
  ## [1.0.1] - 2022-08-16
10
12
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,21 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- es-elasticity (1.0.1)
4
+ es-elasticity (1.1.0)
5
5
  activemodel (>= 5.2.0, < 7.1)
6
6
  activerecord (>= 5.2.0, < 7.1)
7
7
  activesupport (>= 5.2.0, < 7.1)
8
- elasticsearch (>= 7, < 8)
8
+ elastic-transport (>= 8.0, < 8.7)
9
+ elasticsearch (>= 7, < 8.7)
9
10
 
10
11
  GEM
11
12
  remote: https://artifacts.dox.support/repository/gems/
12
13
  specs:
13
- activemodel (7.0.3.1)
14
- activesupport (= 7.0.3.1)
15
- activerecord (7.0.3.1)
16
- activemodel (= 7.0.3.1)
17
- activesupport (= 7.0.3.1)
18
- activesupport (7.0.3.1)
14
+ activemodel (7.0.4.3)
15
+ activesupport (= 7.0.4.3)
16
+ activerecord (7.0.4.3)
17
+ activemodel (= 7.0.4.3)
18
+ activesupport (= 7.0.4.3)
19
+ activesupport (7.0.4.3)
19
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
21
  i18n (>= 1.6, < 2)
21
22
  minitest (>= 5.1)
@@ -24,45 +25,25 @@ GEM
24
25
  codeclimate-test-reporter (1.0.9)
25
26
  simplecov (<= 0.13)
26
27
  coderay (1.1.2)
27
- concurrent-ruby (1.1.10)
28
+ concurrent-ruby (1.2.2)
28
29
  diff-lcs (1.3)
29
- elasticsearch (7.17.1)
30
- elasticsearch-api (= 7.17.1)
31
- elasticsearch-transport (= 7.17.1)
32
- elasticsearch-api (7.17.1)
30
+ elastic-transport (8.2.1)
31
+ faraday (< 3)
33
32
  multi_json
34
- elasticsearch-transport (7.17.1)
35
- faraday (~> 1)
33
+ elasticsearch (8.6.0)
34
+ elastic-transport (~> 8)
35
+ elasticsearch-api (= 8.6.0)
36
+ elasticsearch-api (8.6.0)
36
37
  multi_json
37
- faraday (1.10.1)
38
- faraday-em_http (~> 1.0)
39
- faraday-em_synchrony (~> 1.0)
40
- faraday-excon (~> 1.1)
41
- faraday-httpclient (~> 1.0)
42
- faraday-multipart (~> 1.0)
43
- faraday-net_http (~> 1.0)
44
- faraday-net_http_persistent (~> 1.0)
45
- faraday-patron (~> 1.0)
46
- faraday-rack (~> 1.0)
47
- faraday-retry (~> 1.0)
38
+ faraday (2.7.4)
39
+ faraday-net_http (>= 2.0, < 3.1)
48
40
  ruby2_keywords (>= 0.0.4)
49
- faraday-em_http (1.0.0)
50
- faraday-em_synchrony (1.0.0)
51
- faraday-excon (1.1.0)
52
- faraday-httpclient (1.0.1)
53
- faraday-multipart (1.0.4)
54
- multipart-post (~> 2)
55
- faraday-net_http (1.0.1)
56
- faraday-net_http_persistent (1.2.0)
57
- faraday-patron (1.0.0)
58
- faraday-rack (1.0.0)
59
- faraday-retry (1.0.3)
60
- i18n (1.12.0)
41
+ faraday-net_http (3.0.2)
42
+ i18n (1.13.0)
61
43
  concurrent-ruby (~> 1.0)
62
44
  method_source (0.9.2)
63
- minitest (5.16.2)
45
+ minitest (5.18.0)
64
46
  multi_json (1.15.0)
65
- multipart-post (2.2.3)
66
47
  oj (3.10.0)
67
48
  pry (0.12.2)
68
49
  coderay (~> 1.1.0)
@@ -89,7 +70,7 @@ GEM
89
70
  simplecov-html (~> 0.7.1)
90
71
  simplecov-html (0.7.1)
91
72
  timecop (0.9.5)
92
- tzinfo (2.0.5)
73
+ tzinfo (2.0.6)
93
74
  concurrent-ruby (~> 1.0)
94
75
 
95
76
  PLATFORMS
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <img src="https://s3.amazonaws.com/doximity/logos/elasticity-logotype.svg" width="35%">
1
+ <img src="https://dox-public-assets.s3.amazonaws.com/doximity/logos/elasticity-logotype.svg" width="35%">
2
2
 
3
3
  ---
4
4
 
@@ -36,5 +36,6 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "activemodel", ">= 5.2.0", "< 7.1"
37
37
  spec.add_dependency "activerecord", ">= 5.2.0", "< 7.1"
38
38
  spec.add_dependency "activesupport", ">= 5.2.0", "< 7.1"
39
- spec.add_dependency "elasticsearch", ">= 7", "< 8"
39
+ spec.add_dependency "elasticsearch", ">= 7", "< 8.7"
40
+ spec.add_dependency "elastic-transport", ">= 8.0", "< 8.7"
40
41
  end
@@ -16,7 +16,7 @@ module Elasticity
16
16
  private
17
17
 
18
18
  def self.error_for(status)
19
- Elasticsearch::Transport::Transport::ERRORS[status] || UnknownError
19
+ Elastic::Transport::Transport::ERRORS[status] || UnknownError
20
20
  end
21
21
  end
22
22
  end
@@ -108,7 +108,7 @@ module Elasticity
108
108
  waiting_duration = 0
109
109
  begin
110
110
  @client.index_delete(index: original_index)
111
- rescue Elasticsearch::Transport::Transport::ServerError => e
111
+ rescue Elastic::Transport::Transport::ServerError => e
112
112
  if retryable_error?(e) && retry_delete_on_recoverable_errors && waiting_duration < max_delay
113
113
  waiting_duration += retry_delay
114
114
  sleep(retry_delay)
@@ -174,13 +174,13 @@ module Elasticity
174
174
 
175
175
  def main_indexes
176
176
  @client.index_get_alias(index: "#{@main_alias}-*", name: @main_alias).keys
177
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
177
+ rescue Elastic::Transport::Transport::Errors::NotFound
178
178
  []
179
179
  end
180
180
 
181
181
  def update_indexes
182
182
  @client.index_get_alias(index: "#{@main_alias}-*", name: @update_alias).keys
183
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
183
+ rescue Elastic::Transport::Transport::Errors::NotFound
184
184
  []
185
185
  end
186
186
 
@@ -264,7 +264,7 @@ module Elasticity
264
264
 
265
265
  def settings
266
266
  @client.index_get_settings(index: @main_alias).values.first
267
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
267
+ rescue Elastic::Transport::Transport::Errors::NotFound
268
268
  nil
269
269
  end
270
270
 
@@ -278,7 +278,7 @@ module Elasticity
278
278
 
279
279
  def mapping
280
280
  @client.index_get_mapping(index: @main_alias).values.first
281
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
281
+ rescue Elastic::Transport::Transport::Errors::NotFound
282
282
  nil
283
283
  end
284
284
 
@@ -80,7 +80,7 @@ module Elasticity
80
80
 
81
81
  def settings
82
82
  @client.index_get_settings(index: @index_name).values.first
83
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
83
+ rescue Elastic::Transport::Transport::Errors::NotFound
84
84
  nil
85
85
  end
86
86
 
@@ -94,7 +94,7 @@ module Elasticity
94
94
 
95
95
  def mapping
96
96
  @client.index_get_mapping(index: @index_name).values.first
97
- rescue Elasticsearch::Transport::Transport::Errors::NotFound
97
+ rescue Elastic::Transport::Transport::Errors::NotFound
98
98
  nil
99
99
  end
100
100
 
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/elasticity.rb CHANGED
@@ -21,6 +21,7 @@ require "arel"
21
21
  require "active_support/core_ext"
22
22
  require "active_model"
23
23
  require "elasticsearch"
24
+ require "elastic/transport"
24
25
 
25
26
  module Elasticity
26
27
  autoload :Bulk, "elasticity/bulk"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2023-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -233,7 +233,7 @@ dependencies:
233
233
  version: '7'
234
234
  - - "<"
235
235
  - !ruby/object:Gem::Version
236
- version: '8'
236
+ version: '8.7'
237
237
  type: :runtime
238
238
  prerelease: false
239
239
  version_requirements: !ruby/object:Gem::Requirement
@@ -243,7 +243,27 @@ dependencies:
243
243
  version: '7'
244
244
  - - "<"
245
245
  - !ruby/object:Gem::Version
246
- version: '8'
246
+ version: '8.7'
247
+ - !ruby/object:Gem::Dependency
248
+ name: elastic-transport
249
+ requirement: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '8.0'
254
+ - - "<"
255
+ - !ruby/object:Gem::Version
256
+ version: '8.7'
257
+ type: :runtime
258
+ prerelease: false
259
+ version_requirements: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '8.0'
264
+ - - "<"
265
+ - !ruby/object:Gem::Version
266
+ version: '8.7'
247
267
  description: Elasticity provides a higher level abstraction on top of [elasticsearch-ruby](https://github.com/elasticsearch/elasticsearch-ruby)
248
268
  gem
249
269
  email:
@@ -304,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
324
  - !ruby/object:Gem::Version
305
325
  version: '0'
306
326
  requirements: []
307
- rubygems_version: 3.3.11
327
+ rubygems_version: 3.4.10
308
328
  signing_key:
309
329
  specification_version: 4
310
330
  summary: ActiveModel-based library for working with Elasticsearch