elastic-enterprise-search 8.7.0 → 8.9.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: '018288980fbd3b9a4f39cabf6fe3f7adfcb62e616d6d374a9e56099629468386'
4
- data.tar.gz: eab15d1fa2e7d481b422a5fe3f843dfca8bb51e030ea6e70f690dd14ad757a09
3
+ metadata.gz: ba689b3ef05d303a636db6f9757b184c41de8232a625a9914dc521ae36ef10fe
4
+ data.tar.gz: 6b7bf74a47ce28ef549c77eb6f403cd9932f1001a6f82855230e407ddfc7e73b
5
5
  SHA512:
6
- metadata.gz: 80d0d275fd647abee39ce5b14fe2ea133d3595a4992ed744bd7727953c223f624a1fed18550d950aed6c6dc034d63f756dfafc678c02dfaa4e15468ed0306bd0
7
- data.tar.gz: aeb3fe71149d88fd9cc82005af8beef7295b9c15812eb53e67a0c702b1b012e82b2ff869d66e5f56c804c21793548acbc13162ffb4ad962060c6f64d632637a4
6
+ metadata.gz: ead1921648fc89eaa32ecbb5fff41509779df7377afddc8bfc8b96c9bdfd418eb4f3d8d854d6a6ca082933be830185404efe31548f074cf94de87b722451758e
7
+ data.tar.gz: b9865952c106e33d61add399ea50fe84818ba6baa84aa4084b7a61c2ff9f9cc047bea86a86783d11608493a7a8b33bdf0d20f0d81d699ce04d535385af6b88d8
@@ -8,8 +8,8 @@ files="tmp/*.html"
8
8
  for f in $files; do
9
9
  SERVICE=`echo $f | grep -o "\(appsearch\|enterprisesearch\|workplacesearch\)"`
10
10
  RUBY_VERSION=`echo $f | grep -Po "(\d+\.)+\d+"`
11
- EXAMPLES=`cat $f | grep -o "[0-9]\+ example" | tail -1`
12
- FAILURES=`cat $f | grep -o "[0-9]\+ failure" | tail -1`
11
+ EXAMPLES=`cat $f | grep -o "[0-9]\+ examples\?" | tail -1`
12
+ FAILURES=`cat $f | grep -o "[0-9]\+ failures\?" | tail -1`
13
13
  PENDING=`cat $f | grep -o "[0-9]\+ pending" | tail -1`
14
14
  echo "--- :rspec: $EXAMPLES - :x: $FAILURES - :pinched_fingers: $PENDING :test_tube: $SERVICE :ruby: $RUBY_VERSION"
15
15
  done
@@ -4,14 +4,13 @@ steps:
4
4
  provider: "gcp"
5
5
  env:
6
6
  RUBY_VERSION: "{{ matrix.ruby }}"
7
- STACK_VERSION: 8.7.0-SNAPSHOT
7
+ STACK_VERSION: 8.9-SNAPSHOT
8
8
  matrix:
9
9
  setup:
10
10
  ruby:
11
11
  - "3.2"
12
12
  - "3.1"
13
13
  - "3.0"
14
- - "2.7"
15
14
  command: ./.buildkite/run-tests.sh
16
15
  artifact_paths: "tmp/*"
17
16
  - wait: ~
@@ -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
 
@@ -7,7 +7,7 @@ jobs:
7
7
  ENDPOINT: http://localhost:8080
8
8
  strategy:
9
9
  matrix:
10
- ruby: [ '2.7', '3.0', '3.1', '3.2' ]
10
+ ruby: [ '3.0', '3.1', '3.2' ]
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: actions/checkout@v2
data/CONTRIBUTING.md CHANGED
@@ -45,28 +45,27 @@ RUNSCRIPTS=enterprise-search STACK_VERSION=7.10.0 ./.ci/run-tests
45
45
  your code without restriction. We ask this of all contributors in order to
46
46
  assure our users of the origin and continuing existence of the code. You only
47
47
  need to sign the CLA once.
48
-
48
+
49
49
  2. Run rubocop and the test suite to ensure your changes do not break existing
50
50
  code:
51
-
51
+
52
52
  ```
53
53
  $ bundle exec rubocop
54
54
  ```
55
-
55
+
56
56
  Check [Running
57
57
  tests](https://github.com/elastic/enterprise-search-ruby/#run-tests) on the
58
58
  README for instructions on how to run all the tests.
59
59
 
60
60
  3. Rebase your changes. Update your local repository with the most recent code
61
61
  from the main `enterprise-search-ruby` repository and rebase your branch
62
- on top of the latest `main` branch. All of your changes will be squashed
63
- into a single commit so don't worry about pushing multiple times.
64
-
62
+ on top of the latest `main` branch.
63
+
65
64
  4. Submit a pull request. Push your local changes to your forked repository
66
- and [submit a pull request](https://github.com/elastic/enterprise-search-python/pulls)
65
+ and [submit a pull request](https://github.com/elastic/enterprise-search-ruby/pulls)
67
66
  and mention the issue number if any (`Closes #123`) Make sure that you
68
67
  add or modify tests related to your changes so that CI will pass.
69
-
68
+
70
69
  5. Sit back and wait. There may be some discussion on your pull request and
71
70
  if changes are needed we would love to work with you to get your pull request
72
71
  merged into enterprise-search-ruby.
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.7.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.7.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-04-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
@@ -478,7 +480,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
478
480
  - !ruby/object:Gem::Version
479
481
  version: '0'
480
482
  requirements: []
481
- rubygems_version: 3.4.10
483
+ rubygems_version: 3.4.13
482
484
  signing_key:
483
485
  specification_version: 4
484
486
  summary: Official API client for Elastic Enterprise Search