elasticsearch-api 7.14.0.pre → 7.14.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 +4 -4
- data/README.md +4 -4
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/rest_api_yaml_spec.rb +1 -1
- data/spec/rest_yaml_tests_helper.rb +1 -0
- data/utils/README.md +6 -1
- data/utils/thor/generator/files_helper.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40edb6c499443146d7357e59934bca279932a90cba5d116910ad69b5228e50ee
|
4
|
+
data.tar.gz: 8c37cae5e1677d1b0fa74820d67f80ef119bf7b1b8daa1dfebbe8544357dd09e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5dc511df2d03c7a6bb3553d1365a2f6d1956b503bd0a7b3dd02142b9f95c1dbb2f955fb968f9970dcc3171d6f14b26b6e0a6ebad952d6b94940f8425070fffe
|
7
|
+
data.tar.gz: 39b3426a3668a404d017c800e53009805ae58c98ddc131692083adae96d6ed02998b648af957895419e706c3c28dd312e245e25778df6ad7cc7ed6944352eb19
|
data/README.md
CHANGED
@@ -55,12 +55,12 @@ the library modules have been already included**, so you just call the API metho
|
|
55
55
|
```ruby
|
56
56
|
require 'elasticsearch'
|
57
57
|
|
58
|
-
client = Elasticsearch::Client.new
|
58
|
+
client = Elasticsearch::Client.new(log: true)
|
59
59
|
|
60
|
-
client.index
|
60
|
+
client.index(index: 'myindex', type: 'mytype', id: 1, body: { title: 'Test' })
|
61
61
|
# => {"_index"=>"myindex", ... "created"=>true}
|
62
62
|
|
63
|
-
client.search
|
63
|
+
client.search(index: 'myindex', body: { query: { match: { title: 'test' } } })
|
64
64
|
# => {"took"=>2, ..., "hits"=>{"total":5, ...}}
|
65
65
|
```
|
66
66
|
|
@@ -200,7 +200,7 @@ time rake test:integration
|
|
200
200
|
|
201
201
|
We run the test suite for Elasticsearch's Rest API tests. You can read more about this in [the test runner README](https://github.com/elastic/elasticsearch-ruby/tree/master/api-spec-testing#rest-api-yaml-test-runner).
|
202
202
|
|
203
|
-
The `rest_api` needs the test files from Elasticsearch. You can run the rake task to download the test artifacts in the root folder of the project. This task needs a running cluster to determine which version and build hash of Elasticsearch to use and test against. `TEST_ES_SERVER=http://localhost:9200 rake
|
203
|
+
The `rest_api` needs the test files from Elasticsearch. You can run the rake task to download the test artifacts in the root folder of the project. This task needs a running cluster to determine which version and build hash of Elasticsearch to use and test against. `TEST_ES_SERVER=http://localhost:9200 rake elasticsearch:download_artifacts`. This will download the necessary files used for the integration tests to `./tmp`.
|
204
204
|
|
205
205
|
## License
|
206
206
|
|
@@ -22,7 +22,7 @@ describe 'Rest API YAML tests' do
|
|
22
22
|
if REST_API_YAML_FILES.empty?
|
23
23
|
logger = Logger.new($stdout)
|
24
24
|
logger.error 'No test files found!'
|
25
|
-
logger.info 'Use rake rake
|
25
|
+
logger.info 'Use rake rake elasticsearch:download_artifacts in the root directory of the project to download the test artifacts.'
|
26
26
|
exit 1
|
27
27
|
end
|
28
28
|
|
data/utils/README.md
CHANGED
@@ -6,7 +6,12 @@ This directory hosts The Generator, a tool that generates the classes for each A
|
|
6
6
|
|
7
7
|
### Generate
|
8
8
|
|
9
|
-
To generate the code, you need to run
|
9
|
+
To generate the code, you need to have the Elasticsearch REST API spec files in `tmp/rest-api-spec` in the root of the project. You can run a rake task from the root of the project to download the specs corresponding to the current running cluster:
|
10
|
+
```bash
|
11
|
+
$ rake elasticsearch:download_artifacts
|
12
|
+
```
|
13
|
+
|
14
|
+
Once the JSON files have been downloaded, you need to run (from this folder):
|
10
15
|
```bash
|
11
16
|
$ thor api:code:generate
|
12
17
|
```
|
@@ -22,7 +22,7 @@ module Elasticsearch
|
|
22
22
|
module API
|
23
23
|
module FilesHelper
|
24
24
|
PROJECT_PATH = File.join(File.dirname(__FILE__), '..')
|
25
|
-
SRC_PATH = File.join(PROJECT_PATH, '..', '..', '..', 'tmp/
|
25
|
+
SRC_PATH = File.join(PROJECT_PATH, '..', '..', '..', 'tmp/rest-api-spec/api/')
|
26
26
|
OSS_OUTPUT_DIR = '../../elasticsearch-api/lib/elasticsearch/api/actions'.freeze
|
27
27
|
XPACK_OUTPUT_DIR = '../../elasticsearch-xpack/lib/elasticsearch/xpack/api/actions'.freeze
|
28
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.14.0
|
4
|
+
version: 7.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -688,9 +688,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
688
688
|
version: '2.4'
|
689
689
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
690
690
|
requirements:
|
691
|
-
- - "
|
691
|
+
- - ">="
|
692
692
|
- !ruby/object:Gem::Version
|
693
|
-
version:
|
693
|
+
version: '0'
|
694
694
|
requirements: []
|
695
695
|
rubygems_version: 3.2.15
|
696
696
|
signing_key:
|