elasticsearch 8.11.0 → 8.11.2

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: 8e8bbf40a0f2da8710d2f57476fd1658109665e96c8e35b04964a741b626e092
4
- data.tar.gz: 423c0ef59ca0a9e471dce78e3c3e0ade5d2830293ec993f5fcd8f0541e92d0ab
3
+ metadata.gz: be1bf7ae035f00bb37885d3ded23a3de42f99dd7d4fda475ada414510fa06b83
4
+ data.tar.gz: 519c765f51d969560c756eb5565da9777054653899ddcd329d87e7ddf4f89f68
5
5
  SHA512:
6
- metadata.gz: 9e3d4bb16461d24dd9a26f4b89cf0b3aa8e52c409a9efa3eb795b6b331037bf45ea9c72fc18658c9ec227e6b2ddcbdb56473f64a8f4629443f33143444a40104
7
- data.tar.gz: 590781bcc65166e649144c3ecbd77659186688d486cee58f9260809f3fb3c411061a536ebeeb24a78e393c0682c7d95b332c67be81760775353dafd5377ae470
6
+ metadata.gz: 9109b0595b0041193f84c2ea3f2c448d7ac43533dce256b871bd951d3e08967241aaa03faf3daa9e7e0fe21474f6159d7a97692384ddd1b93b6c2a18d5821437
7
+ data.tar.gz: '046668e8dcff47df92a190d294f9cd58f3508df74db1ca04305e93c0199575cef006ce29902d811ab98146c9bb280a1331f5b3b4c88cdc1d37bd45a1f1114262'
@@ -46,9 +46,9 @@ Gem::Specification.new do |s|
46
46
  s.required_ruby_version = '>= 2.5'
47
47
 
48
48
  s.add_dependency 'elastic-transport', '~> 8.3'
49
+ s.add_dependency 'elasticsearch-api', '8.11.2'
49
50
 
50
- s.add_dependency 'elasticsearch-api', '8.11.0'
51
-
51
+ s.add_development_dependency 'base64'
52
52
  s.add_development_dependency 'bundler'
53
53
  s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius)
54
54
  s.add_development_dependency 'pry'
@@ -16,5 +16,5 @@
16
16
  # under the License.
17
17
 
18
18
  module Elasticsearch
19
- VERSION = '8.11.0'.freeze
19
+ VERSION = '8.11.2'.freeze
20
20
  end
data/lib/elasticsearch.rb CHANGED
@@ -111,7 +111,8 @@ module Elasticsearch
111
111
 
112
112
  def setup_cloud_host(cloud_id, user, password, port)
113
113
  name = cloud_id.split(':')[0]
114
- cloud_url, elasticsearch_instance = Base64.decode64(cloud_id.gsub("#{name}:", '')).split('$')
114
+ base64_decoded = cloud_id.gsub("#{name}:", '').unpack1('m')
115
+ cloud_url, elasticsearch_instance = base64_decoded.split('$')
115
116
 
116
117
  if cloud_url.include?(':')
117
118
  url, port = cloud_url.split(':')
@@ -153,7 +154,8 @@ module Elasticsearch
153
154
  # Credentials is the base64 encoding of id and api_key joined by a colon
154
155
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
155
156
  def encode(api_key)
156
- Base64.strict_encode64([api_key[:id], api_key[:api_key]].join(':'))
157
+ credentials = [api_key[:id], api_key[:api_key]].join(':')
158
+ [credentials].pack('m0')
157
159
  end
158
160
 
159
161
  def elasticsearch_validation_request
@@ -16,6 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  require 'spec_helper'
19
+ require 'base64'
19
20
 
20
21
  describe Elasticsearch::Client do
21
22
  context 'when using API Key' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.11.0
4
+ version: 8.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic Client Library Maintainers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-07 00:00:00.000000000 Z
11
+ date: 2024-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 8.11.0
33
+ version: 8.11.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 8.11.0
40
+ version: 8.11.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: base64
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
253
  - !ruby/object:Gem::Version
240
254
  version: '0'
241
255
  requirements: []
242
- rubygems_version: 3.4.19
256
+ rubygems_version: 3.5.3
243
257
  signing_key:
244
258
  specification_version: 4
245
259
  summary: Ruby integrations for Elasticsearch