elasticsearch-api 7.7.0.pre → 7.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/elasticsearch-api.gemspec +7 -2
  3. data/lib/elasticsearch/api/actions/bulk.rb +1 -1
  4. data/lib/elasticsearch/api/actions/cat/aliases.rb +1 -1
  5. data/lib/elasticsearch/api/actions/cat/allocation.rb +1 -1
  6. data/lib/elasticsearch/api/actions/cat/count.rb +1 -1
  7. data/lib/elasticsearch/api/actions/cat/fielddata.rb +1 -1
  8. data/lib/elasticsearch/api/actions/cat/health.rb +1 -1
  9. data/lib/elasticsearch/api/actions/cat/help.rb +1 -1
  10. data/lib/elasticsearch/api/actions/cat/indices.rb +1 -1
  11. data/lib/elasticsearch/api/actions/cat/master.rb +1 -1
  12. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +1 -1
  13. data/lib/elasticsearch/api/actions/cat/nodes.rb +1 -1
  14. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +1 -1
  15. data/lib/elasticsearch/api/actions/cat/plugins.rb +1 -1
  16. data/lib/elasticsearch/api/actions/cat/recovery.rb +1 -1
  17. data/lib/elasticsearch/api/actions/cat/repositories.rb +1 -1
  18. data/lib/elasticsearch/api/actions/cat/segments.rb +1 -1
  19. data/lib/elasticsearch/api/actions/cat/shards.rb +1 -1
  20. data/lib/elasticsearch/api/actions/cat/snapshots.rb +1 -1
  21. data/lib/elasticsearch/api/actions/cat/tasks.rb +1 -1
  22. data/lib/elasticsearch/api/actions/cat/templates.rb +1 -1
  23. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +1 -1
  24. data/lib/elasticsearch/api/actions/clear_scroll.rb +1 -1
  25. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +1 -1
  26. data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +1 -1
  27. data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +1 -1
  28. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +1 -1
  29. data/lib/elasticsearch/api/actions/cluster/health.rb +1 -1
  30. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +1 -1
  31. data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +1 -1
  32. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +1 -1
  33. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +1 -1
  34. data/lib/elasticsearch/api/actions/cluster/reroute.rb +1 -1
  35. data/lib/elasticsearch/api/actions/cluster/state.rb +1 -1
  36. data/lib/elasticsearch/api/actions/cluster/stats.rb +1 -1
  37. data/lib/elasticsearch/api/actions/count.rb +1 -1
  38. data/lib/elasticsearch/api/actions/create.rb +1 -1
  39. data/lib/elasticsearch/api/actions/delete.rb +1 -1
  40. data/lib/elasticsearch/api/actions/delete_by_query.rb +1 -1
  41. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +1 -1
  42. data/lib/elasticsearch/api/actions/delete_script.rb +1 -1
  43. data/lib/elasticsearch/api/actions/exists.rb +1 -1
  44. data/lib/elasticsearch/api/actions/exists_source.rb +1 -1
  45. data/lib/elasticsearch/api/actions/explain.rb +1 -1
  46. data/lib/elasticsearch/api/actions/field_caps.rb +1 -1
  47. data/lib/elasticsearch/api/actions/get.rb +1 -1
  48. data/lib/elasticsearch/api/actions/get_script.rb +1 -1
  49. data/lib/elasticsearch/api/actions/get_script_context.rb +1 -1
  50. data/lib/elasticsearch/api/actions/get_script_languages.rb +1 -1
  51. data/lib/elasticsearch/api/actions/get_source.rb +1 -1
  52. data/lib/elasticsearch/api/actions/index.rb +1 -1
  53. data/lib/elasticsearch/api/actions/indices/analyze.rb +1 -1
  54. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +1 -1
  55. data/lib/elasticsearch/api/actions/indices/clone.rb +1 -1
  56. data/lib/elasticsearch/api/actions/indices/close.rb +1 -1
  57. data/lib/elasticsearch/api/actions/indices/create.rb +1 -1
  58. data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +1 -1
  59. data/lib/elasticsearch/api/actions/indices/delete.rb +1 -1
  60. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +1 -1
  61. data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +1 -1
  62. data/lib/elasticsearch/api/actions/indices/delete_template.rb +1 -1
  63. data/lib/elasticsearch/api/actions/indices/exists.rb +1 -1
  64. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +1 -1
  65. data/lib/elasticsearch/api/actions/indices/exists_template.rb +1 -1
  66. data/lib/elasticsearch/api/actions/indices/exists_type.rb +1 -1
  67. data/lib/elasticsearch/api/actions/indices/flush.rb +1 -1
  68. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +1 -1
  69. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +1 -1
  70. data/lib/elasticsearch/api/actions/indices/freeze.rb +4 -0
  71. data/lib/elasticsearch/api/actions/indices/get.rb +1 -1
  72. data/lib/elasticsearch/api/actions/indices/get_alias.rb +1 -1
  73. data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +1 -1
  74. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +1 -1
  75. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +1 -1
  76. data/lib/elasticsearch/api/actions/indices/get_settings.rb +1 -1
  77. data/lib/elasticsearch/api/actions/indices/get_template.rb +1 -1
  78. data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +1 -1
  79. data/lib/elasticsearch/api/actions/indices/open.rb +1 -1
  80. data/lib/elasticsearch/api/actions/indices/put_alias.rb +1 -1
  81. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +1 -1
  82. data/lib/elasticsearch/api/actions/indices/put_settings.rb +1 -1
  83. data/lib/elasticsearch/api/actions/indices/put_template.rb +1 -1
  84. data/lib/elasticsearch/api/actions/indices/recovery.rb +1 -1
  85. data/lib/elasticsearch/api/actions/indices/refresh.rb +1 -1
  86. data/lib/elasticsearch/api/actions/indices/rollover.rb +1 -1
  87. data/lib/elasticsearch/api/actions/indices/segments.rb +1 -1
  88. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +1 -1
  89. data/lib/elasticsearch/api/actions/indices/shrink.rb +1 -1
  90. data/lib/elasticsearch/api/actions/indices/split.rb +1 -1
  91. data/lib/elasticsearch/api/actions/indices/stats.rb +1 -1
  92. data/lib/elasticsearch/api/actions/indices/unfreeze.rb +4 -0
  93. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +1 -1
  94. data/lib/elasticsearch/api/actions/indices/upgrade.rb +1 -1
  95. data/lib/elasticsearch/api/actions/indices/validate_query.rb +1 -1
  96. data/lib/elasticsearch/api/actions/info.rb +1 -1
  97. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +1 -1
  98. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +1 -1
  99. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +1 -1
  100. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +1 -1
  101. data/lib/elasticsearch/api/actions/ingest/simulate.rb +1 -1
  102. data/lib/elasticsearch/api/actions/mget.rb +1 -1
  103. data/lib/elasticsearch/api/actions/msearch.rb +1 -1
  104. data/lib/elasticsearch/api/actions/msearch_template.rb +1 -1
  105. data/lib/elasticsearch/api/actions/mtermvectors.rb +1 -1
  106. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +1 -1
  107. data/lib/elasticsearch/api/actions/nodes/info.rb +1 -1
  108. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +3 -2
  109. data/lib/elasticsearch/api/actions/nodes/stats.rb +1 -1
  110. data/lib/elasticsearch/api/actions/nodes/usage.rb +1 -1
  111. data/lib/elasticsearch/api/actions/ping.rb +1 -1
  112. data/lib/elasticsearch/api/actions/put_script.rb +1 -1
  113. data/lib/elasticsearch/api/actions/rank_eval.rb +1 -1
  114. data/lib/elasticsearch/api/actions/reindex.rb +1 -1
  115. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +1 -1
  116. data/lib/elasticsearch/api/actions/render_search_template.rb +1 -1
  117. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +1 -1
  118. data/lib/elasticsearch/api/actions/scroll.rb +1 -1
  119. data/lib/elasticsearch/api/actions/search.rb +1 -1
  120. data/lib/elasticsearch/api/actions/search_shards.rb +1 -1
  121. data/lib/elasticsearch/api/actions/search_template.rb +1 -1
  122. data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +1 -1
  123. data/lib/elasticsearch/api/actions/snapshot/create.rb +1 -1
  124. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +1 -1
  125. data/lib/elasticsearch/api/actions/snapshot/delete.rb +1 -1
  126. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +1 -1
  127. data/lib/elasticsearch/api/actions/snapshot/get.rb +1 -1
  128. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +1 -1
  129. data/lib/elasticsearch/api/actions/snapshot/restore.rb +1 -1
  130. data/lib/elasticsearch/api/actions/snapshot/status.rb +1 -1
  131. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +1 -1
  132. data/lib/elasticsearch/api/actions/tasks/cancel.rb +1 -1
  133. data/lib/elasticsearch/api/actions/tasks/get.rb +1 -1
  134. data/lib/elasticsearch/api/actions/tasks/list.rb +1 -1
  135. data/lib/elasticsearch/api/actions/termvectors.rb +1 -1
  136. data/lib/elasticsearch/api/actions/update.rb +1 -1
  137. data/lib/elasticsearch/api/actions/update_by_query.rb +1 -1
  138. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +1 -1
  139. data/lib/elasticsearch/api/version.rb +1 -1
  140. data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +4 -0
  141. data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +4 -0
  142. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +12 -7
  143. data/spec/rest_yaml_tests_helper.rb +4 -0
  144. data/utils/thor/generator/endpoint_specifics.rb +0 -2
  145. data/utils/thor/generator/files_helper.rb +10 -0
  146. data/utils/thor/templates/_documentation_top.erb +1 -1
  147. metadata +10 -6
@@ -13,7 +13,7 @@ module Elasticsearch
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
14
  # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
17
17
  #
18
18
  def verify_repository(arguments = {})
19
19
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
@@ -14,7 +14,7 @@ module Elasticsearch
14
14
  # @option arguments [String] :parent_task_id Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
15
15
  # @option arguments [Hash] :headers Custom HTTP headers
16
16
  #
17
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
18
18
  #
19
19
  def cancel(arguments = {})
20
20
  headers = arguments.delete(:headers) || {}
@@ -13,7 +13,7 @@ module Elasticsearch
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
14
  # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
17
17
  #
18
18
  def get(arguments = {})
19
19
  headers = arguments.delete(:headers) || {}
@@ -19,7 +19,7 @@ module Elasticsearch
19
19
  # @option arguments [Time] :timeout Explicit operation timeout
20
20
  # @option arguments [Hash] :headers Custom HTTP headers
21
21
  #
22
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
22
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
23
23
  #
24
24
  def list(arguments = {})
25
25
  headers = arguments.delete(:headers) || {}
@@ -31,7 +31,7 @@ module Elasticsearch
31
31
  # Deprecated since version 7.0.0
32
32
  #
33
33
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-termvectors.html
35
35
  #
36
36
  def termvectors(arguments = {})
37
37
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
@@ -31,7 +31,7 @@ module Elasticsearch
31
31
  # Deprecated since version 7.0.0
32
32
  #
33
33
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update.html
35
35
  #
36
36
  def update(arguments = {})
37
37
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
@@ -61,7 +61,7 @@ module Elasticsearch
61
61
  # Deprecated since version 7.0.0
62
62
  #
63
63
  #
64
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
64
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update-by-query.html
65
65
  #
66
66
  def update_by_query(arguments = {})
67
67
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
@@ -11,7 +11,7 @@ module Elasticsearch
11
11
  # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*)
12
12
  # @option arguments [Hash] :headers Custom HTTP headers
13
13
  #
14
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
14
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update-by-query.html
15
15
  #
16
16
  def update_by_query_rethrottle(arguments = {})
17
17
  raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
@@ -4,6 +4,6 @@
4
4
 
5
5
  module Elasticsearch
6
6
  module API
7
- VERSION = "7.7.0.pre"
7
+ VERSION = "7.7.0"
8
8
  end
9
9
  end
@@ -1,3 +1,7 @@
1
+ # Licensed to Elasticsearch B.V under one or more agreements.
2
+ # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
+ # See the LICENSE file in the project root for more information
4
+
1
5
  require 'spec_helper'
2
6
 
3
7
  describe 'client.indices#freeze' do
@@ -1,3 +1,7 @@
1
+ # Licensed to Elasticsearch B.V under one or more agreements.
2
+ # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
+ # See the LICENSE file in the project root for more information
4
+
1
5
  require 'spec_helper'
2
6
 
3
7
  describe 'client.indices#unfreeze' do
@@ -5,13 +5,12 @@
5
5
  require 'spec_helper'
6
6
 
7
7
  describe 'client#reload_secure_settings' do
8
-
9
8
  let(:expected_args) do
10
9
  [
11
10
  'POST',
12
11
  url,
13
12
  params,
14
- nil,
13
+ body,
15
14
  {}
16
15
  ]
17
16
  end
@@ -20,6 +19,8 @@ describe 'client#reload_secure_settings' do
20
19
  {}
21
20
  end
22
21
 
22
+ let(:body) { nil }
23
+
23
24
  let(:url) do
24
25
  '_nodes/reload_secure_settings'
25
26
  end
@@ -29,7 +30,6 @@ describe 'client#reload_secure_settings' do
29
30
  end
30
31
 
31
32
  context 'when a node id is specified' do
32
-
33
33
  let(:url) do
34
34
  '_nodes/foo/reload_secure_settings'
35
35
  end
@@ -40,31 +40,36 @@ describe 'client#reload_secure_settings' do
40
40
  end
41
41
 
42
42
  context 'when more than one node id is specified as a string' do
43
-
44
43
  let(:url) do
45
44
  '_nodes/foo,bar/reload_secure_settings'
46
45
  end
47
46
 
47
+ let(:body) do
48
+ { foo: 'bar' }
49
+ end
50
+
48
51
  it 'performs the request' do
49
52
  expect(client_double.nodes.reload_secure_settings(node_id: 'foo,bar', body: { foo: 'bar' })).to eq({})
50
53
  end
51
54
  end
52
55
 
53
56
  context 'when more than one node id is specified as a list' do
54
-
55
57
  let(:url) do
56
58
  '_nodes/foo,bar/reload_secure_settings'
57
59
  end
58
60
 
61
+ let(:body) do
62
+ { foo: 'bar' }
63
+ end
64
+
59
65
  it 'performs the request' do
60
66
  expect(client_double.nodes.reload_secure_settings(node_id: ['foo', 'bar'], body: { foo: 'bar' })).to eq({})
61
67
  end
62
68
  end
63
69
 
64
70
  context 'when a timeout param is specified' do
65
-
66
71
  let(:params) do
67
- { timeout: '30s'}
72
+ { timeout: '30s' }
68
73
  end
69
74
 
70
75
  it 'performs the request' do
@@ -85,6 +85,10 @@ skipped_tests << { file: 'cluster.health/10_basic.yml',
85
85
  skipped_tests << { file: 'cat.indices/10_basic.yml',
86
86
  description: 'Test cat indices output for closed index (pre 7.2.0)' }
87
87
 
88
+ # support for reloading password protected keystores was introduced in 8.0.0
89
+ skipped_tests << { file: 'nodes.reload_secure_settings/10_basic.yml',
90
+ description: 'node_reload_secure_settings test wrong password' }
91
+
88
92
  SKIPPED_TESTS = skipped_tests
89
93
 
90
94
  # The directory of rest api YAML files.
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # Licensed to Elasticsearch B.V under one or more agreements.
4
2
  # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
5
3
  # See the LICENSE file in the project root for more information
@@ -1,4 +1,9 @@
1
+ # Licensed to Elasticsearch B.V under one or more agreements.
2
+ # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
+ # See the LICENSE file in the project root for more information
4
+
1
5
  require 'pathname'
6
+ require_relative '../../../lib/elasticsearch/api/version.rb'
2
7
 
3
8
  module Elasticsearch
4
9
  module API
@@ -32,6 +37,11 @@ module Elasticsearch
32
37
  File.extname(f) != '.json'
33
38
  end
34
39
  end
40
+
41
+ def self.gem_version
42
+ regex = /([0-9]{1,2}\.[0-9x]{1,2})/
43
+ Elasticsearch::API::VERSION.match(regex)[0]
44
+ end
35
45
  end
36
46
  end
37
47
  end
@@ -24,5 +24,5 @@
24
24
  <% end -%>
25
25
  <%= ' '*(@namespace_depth+3) -%>#
26
26
  <%# Documentation link -%>
27
- <%= ' '*(@namespace_depth+3) %># @see <%= @spec['documentation']['url'] ? @spec['documentation']['url'] : "[TODO]" %>
27
+ <%= ' '*(@namespace_depth+3) %># @see <%= @spec['documentation']['url'] ? @spec['documentation']['url'].gsub(/\/(current|master)\//, "/#{Elasticsearch::API::FilesHelper.gem_version}/") : "[TODO]" %>
28
28
  <%= ' '*(@namespace_depth+3) %>#
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.7.0.pre
4
+ version: 7.7.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: 2020-04-15 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -654,10 +654,14 @@ files:
654
654
  - utils/thor/templates/method.erb
655
655
  - utils/thor/templates/test.erb
656
656
  - utils/thor/templates/test_helper.rb
657
- homepage: https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-api
657
+ homepage: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.x/index.html
658
658
  licenses:
659
659
  - Apache-2.0
660
- metadata: {}
660
+ metadata:
661
+ homepage_uri: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.x/index.html
662
+ changelog_uri: https://github.com/elastic/elasticsearch-ruby/blob/7.x/CHANGELOG.md
663
+ source_code_uri: https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-api
664
+ bug_tracker_uri: https://github.com/elastic/elasticsearch-ruby/issues
661
665
  post_install_message:
662
666
  rdoc_options:
663
667
  - "--charset=UTF-8"
@@ -670,9 +674,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
670
674
  version: '2.4'
671
675
  required_rubygems_version: !ruby/object:Gem::Requirement
672
676
  requirements:
673
- - - ">"
677
+ - - ">="
674
678
  - !ruby/object:Gem::Version
675
- version: 1.3.1
679
+ version: '0'
676
680
  requirements: []
677
681
  rubygems_version: 3.1.2
678
682
  signing_key: