elastic-enterprise-search 8.8.0 → 8.9.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: 031cec00d19f25b476ac32ea1074c5f8d1a79ee09e631ee9dc9097e3b53dbf59
4
- data.tar.gz: 459bb77b77b89ef66a781adeb1aed5289d21b0399bd0e5bfa5c7405e1a3c6e5f
3
+ metadata.gz: ba689b3ef05d303a636db6f9757b184c41de8232a625a9914dc521ae36ef10fe
4
+ data.tar.gz: 6b7bf74a47ce28ef549c77eb6f403cd9932f1001a6f82855230e407ddfc7e73b
5
5
  SHA512:
6
- metadata.gz: 61e665be5a259b3a1bcafe382c4b54938c3d1f04d458df6037a593b32ff07a18e9d6a2d197cd55467e4d2c28c5cd7685754bba46e8b0be3a84b2827574b568bb
7
- data.tar.gz: 6029c93e184f0f0a5e96d02b251b1d9bf40322bad0e677cfaccb8b9475ea246db9e96bf4ccf2c7a6e652bc39aebbc8595cae63c9b243af342d66ec4955a8cdbf
6
+ metadata.gz: ead1921648fc89eaa32ecbb5fff41509779df7377afddc8bfc8b96c9bdfd418eb4f3d8d854d6a6ca082933be830185404efe31548f074cf94de87b722451758e
7
+ data.tar.gz: b9865952c106e33d61add399ea50fe84818ba6baa84aa4084b7a61c2ff9f9cc047bea86a86783d11608493a7a8b33bdf0d20f0d81d699ce04d535385af6b88d8
@@ -4,7 +4,7 @@ steps:
4
4
  provider: "gcp"
5
5
  env:
6
6
  RUBY_VERSION: "{{ matrix.ruby }}"
7
- STACK_VERSION: 8.8-SNAPSHOT
7
+ STACK_VERSION: 8.9-SNAPSHOT
8
8
  matrix:
9
9
  setup:
10
10
  ruby:
@@ -29,8 +29,12 @@ set -euo pipefail
29
29
  echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m"
30
30
  cleanup_node $es_node_name
31
31
 
32
- # Set vm.max_map_count kernel setting to 262144
33
- sudo sysctl -w vm.max_map_count=262144
32
+ BUILDKITE=${BUILDKITE-false}
33
+
34
+ # Set vm.max_map_count kernel setting to 262144 if we're in CI
35
+ if [[ "$BUILDKITE" == "true" ]]; then
36
+ sudo sysctl -w vm.max_map_count=262144
37
+ fi
34
38
 
35
39
  master_node_name=${es_node_name}
36
40
  cluster_name=${moniker}${suffix}
@@ -11,9 +11,6 @@ script_path=$(dirname $(realpath -s $0))
11
11
  source $script_path/functions/imports.sh
12
12
  set -euo pipefail
13
13
 
14
- echo "--- Create the elastic network"
15
- docker network create elastic
16
-
17
14
  echo "--- :docker: :elasticsearch: Starting Elasticsearch"
18
15
  DETACH=true bash $script_path/run-elasticsearch.sh
19
16
 
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Elastic Enterprise Search Client
2
2
 
3
- ![build](https://github.com/elastic/enterprise-search-ruby/workflows/main/badge.svg)
4
3
  ![rubocop](https://github.com/elastic/enterprise-search-ruby/workflows/rubocop/badge.svg)
5
4
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)
5
+ ![build](https://github.com/elastic/enterprise-search-ruby/workflows/main/badge.svg)
6
+ [![Build status](https://badge.buildkite.com/a6c44f2af741c866381fb3c845e8d4b0e9b5c5883ef84ac30e.svg)](https://buildkite.com/elastic/enterprise-search-ruby)
6
7
 
7
8
  Official Ruby API client for [Elastic Enterprise Search](https://www.elastic.co/enterprise-search). Use this gem to integrate App Search and Workplace Search into your Ruby code.
8
9
 
@@ -0,0 +1,9 @@
1
+ [[release_notes_88]]
2
+ === 8.8 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_880]]
6
+ === 8.8.0 Release notes
7
+
8
+ - Tested versions of Ruby for 8.8.0: Ruby (MRI) 3.0, 3.1 and 3.2, JRuby 9.3 and JRuby 9.4.
9
+ - Updated for compatibility with Elastic Enterprise Search 8.8's API.
@@ -0,0 +1,10 @@
1
+ [[release_notes_89]]
2
+ === 8.9 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_890]]
6
+ === 8.9.0 Release notes
7
+
8
+ - Refactored User-Agent code, it is now set up on initializing the client instead of every request.
9
+ - Tested versions of Ruby for 8.9.0: Ruby (MRI) 3.0, 3.1 and 3.2, JRuby 9.3 and JRuby 9.4.
10
+ - Updated for compatibility with Elastic Enterprise Search 8.9's API.
@@ -4,6 +4,8 @@
4
4
  [discrete]
5
5
  === 8.x
6
6
 
7
+ * <<release_notes_89, 8.9.0 Release Notes>>
8
+ * <<release_notes_88, 8.8.0 Release Notes>>
7
9
  * <<release_notes_87, 8.7.0 Release Notes>>
8
10
  * <<release_notes_86, 8.6.0 Release Notes>>
9
11
  * <<release_notes_85, 8.5.0 Release Notes>>
@@ -25,6 +27,8 @@
25
27
  * <<release_notes_711, 7.11.0 Release Notes>>
26
28
  * <<release_notes_710, 7.10.0.beta.1 Release Notes>>
27
29
 
30
+ include::89.asciidoc[]
31
+ include::88.asciidoc[]
28
32
  include::87.asciidoc[]
29
33
  include::86.asciidoc[]
30
34
  include::85.asciidoc[]
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
  s.name = 'elastic-enterprise-search'
27
27
  s.version = Elastic::EnterpriseSearch::VERSION
28
28
  s.authors = ['Fernando Briano']
29
- s.email = ['support@elastic.co']
29
+ s.email = ['clients-team@elastic.co']
30
30
  s.homepage = 'https://github.com/elastic/enterprise-search-ruby'
31
31
  s.summary = 'Official API client for Elastic Enterprise Search'
32
32
  s.description = <<~DESCRIPTION
@@ -77,7 +77,8 @@ module Elastic
77
77
  request_timeout: overall_timeout,
78
78
  adapter: adapter,
79
79
  transport_options: {
80
- request: { open_timeout: open_timeout }
80
+ request: { open_timeout: open_timeout },
81
+ headers: { user_agent: user_agent }
81
82
  },
82
83
  enable_meta_header: @options[:enable_meta_header] || true,
83
84
  trace: trace,
@@ -128,6 +129,19 @@ module Elastic
128
129
 
129
130
  @options[:host]
130
131
  end
132
+
133
+ private
134
+
135
+ def user_agent
136
+ ua = "#{CLIENT_NAME}/#{CLIENT_VERSION}"
137
+ meta = ["RUBY_VERSION: #{RUBY_VERSION}"]
138
+ if RbConfig::CONFIG && RbConfig::CONFIG['host_os']
139
+ meta << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} " \
140
+ "#{RbConfig::CONFIG['target_cpu']}"
141
+ end
142
+ meta << "elastic-transport: #{Elastic::Transport::VERSION}"
143
+ "#{ua} (#{meta.join('; ')})"
144
+ end
131
145
  end
132
146
  end
133
147
  end
@@ -48,7 +48,7 @@ module Elastic
48
48
 
49
49
  # Construct and send a request to the API.
50
50
  def request(method, path, params = {}, body = {}, headers = {})
51
- meta_headers = { authorization: decide_authorization(params), user_agent: request_user_agent }
51
+ meta_headers = { authorization: decide_authorization(params) }
52
52
  headers = if !headers.is_a?(Hash)
53
53
  meta_headers
54
54
  else
@@ -79,17 +79,6 @@ module Elastic
79
79
 
80
80
  private
81
81
 
82
- def request_user_agent
83
- ua = "#{CLIENT_NAME}/#{CLIENT_VERSION}"
84
- meta = ["RUBY_VERSION: #{RUBY_VERSION}"]
85
- if RbConfig::CONFIG && RbConfig::CONFIG['host_os']
86
- meta << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} " \
87
- "#{RbConfig::CONFIG['target_cpu']}"
88
- end
89
- meta << "elastic-transport: #{Elastic::Transport::VERSION}"
90
- "#{ua} (#{meta.join('; ')})"
91
- end
92
-
93
82
  def decide_authorization(params)
94
83
  if params[:grant_type] == 'authorization_code'
95
84
  "Bearer #{params[:code]}"
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- VERSION = '8.8.0'
22
+ VERSION = '8.9.0'
23
23
  end
24
24
  end
@@ -104,5 +104,16 @@ describe Elastic::EnterpriseSearch::Client do
104
104
  end
105
105
  end
106
106
 
107
+ context 'user-agent' do
108
+ context 'default' do
109
+ let(:transport) { Elastic::EnterpriseSearch::Client.new.instance_variable_get('@transport') }
110
+ let(:subject) { transport.transport.connections.first.connection.headers }
111
+
112
+ it 'includes the user-agent in transport' do
113
+ expect(subject['user-agent']).to match("elastic-enterprise-search-ruby/#{Elastic::EnterpriseSearch::VERSION}")
114
+ end
115
+ end
116
+ end
117
+
107
118
  include_examples 'adapters compatibility'
108
119
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-enterprise-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.8.0
4
+ version: 8.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -202,7 +202,7 @@ description: 'Official API client for Elastic Enterprise Search APIs.
202
202
 
203
203
  '
204
204
  email:
205
- - support@elastic.co
205
+ - clients-team@elastic.co
206
206
  executables: []
207
207
  extensions: []
208
208
  extra_rdoc_files: []
@@ -266,6 +266,8 @@ files:
266
266
  - docs/guide/release_notes/85.asciidoc
267
267
  - docs/guide/release_notes/86.asciidoc
268
268
  - docs/guide/release_notes/87.asciidoc
269
+ - docs/guide/release_notes/88.asciidoc
270
+ - docs/guide/release_notes/89.asciidoc
269
271
  - docs/guide/release_notes/index.asciidoc
270
272
  - docs/guide/workplace-search-api.asciidoc
271
273
  - elastic-enterprise-search.gemspec