elasticsearch 8.12.1 → 8.12.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: 2c541958c6747c3eb05c4700476f842b7552e4dc4898207837674d05a1cbb9a4
4
- data.tar.gz: d0a8a6805fbc1b16956aee0df9de13053512dcc61fea47947116d6c8f78a2811
3
+ metadata.gz: 5241bcaae583bd2a3f2a333c2694de1b05af8428d572a74b127baa08f000a172
4
+ data.tar.gz: 57ba5a1bd7d8f43d65671dd7adc9e90c4db1b056164f38a5a4bf7b979bb29631
5
5
  SHA512:
6
- metadata.gz: 1afa288859288d36059b065a9e31c87e4ba9cb3e37e22ac48d3bab072d790fd3a2f4919e8386b186316cc346a6cc9ee1ce9dcac5e0817d2e32806d3dbbbbd058
7
- data.tar.gz: ea0ab1a02f2749023bc599e0713d9dd5ca6bc3dc6ef1dd9bc276a29d973db32d8b48fb624631402cbe4c235013c4cf59083038fc620bd9124383828a28b41f41
6
+ metadata.gz: 7190459564453bab3661d6e8528d8cd0ab612654846467fd9d2c81cc05dab49f36d04d57dc7ac2120cf3e5d49b1ed1b005f33c9a383f62c4451f60d5b93aa660
7
+ data.tar.gz: '01921137542be51cd96dd1bd5edf0b5f65e1bdf457673236e62167a559bf9b64312bae6c15a69cfc97b468a5f02a1e8f05bf57801d19aeeb2b984dc1ab83d4ba'
@@ -46,10 +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.12.2'
49
50
 
50
- s.add_dependency 'elasticsearch-api', '8.12.1'
51
- s.add_dependency 'base64'
52
-
51
+ s.add_development_dependency 'base64'
53
52
  s.add_development_dependency 'bundler'
54
53
  s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION) || defined?(Rubinius)
55
54
  s.add_development_dependency 'pry'
@@ -16,5 +16,5 @@
16
16
  # under the License.
17
17
 
18
18
  module Elasticsearch
19
- VERSION = '8.12.1'.freeze
19
+ VERSION = '8.12.2'.freeze
20
20
  end
data/lib/elasticsearch.rb CHANGED
@@ -18,7 +18,6 @@
18
18
  require 'elasticsearch/version'
19
19
  require 'elastic/transport'
20
20
  require 'elasticsearch/api'
21
- require 'base64'
22
21
 
23
22
  module Elasticsearch
24
23
  NOT_ELASTICSEARCH_WARNING = 'The client noticed that the server is not Elasticsearch and we do not support this unknown product.'.freeze
@@ -112,7 +111,8 @@ module Elasticsearch
112
111
 
113
112
  def setup_cloud_host(cloud_id, user, password, port)
114
113
  name = cloud_id.split(':')[0]
115
- 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('$')
116
116
 
117
117
  if cloud_url.include?(':')
118
118
  url, port = cloud_url.split(':')
@@ -154,7 +154,8 @@ module Elasticsearch
154
154
  # Credentials is the base64 encoding of id and api_key joined by a colon
155
155
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
156
156
  def encode(api_key)
157
- 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')
158
159
  end
159
160
 
160
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.12.1
4
+ version: 8.12.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: 2024-01-25 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,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 8.12.1
33
+ version: 8.12.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.12.1
40
+ version: 8.12.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: base64
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -45,7 +45,7 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
- type: :runtime
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements: