elasticsearch-transport 7.5.0 → 7.17.7
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/Gemfile +26 -13
- data/README.md +159 -64
- data/Rakefile +25 -13
- data/elasticsearch-transport.gemspec +57 -63
- data/lib/elasticsearch/transport/client.rb +183 -58
- data/lib/elasticsearch/transport/meta_header.rb +135 -0
- data/lib/elasticsearch/transport/redacted.rb +16 -3
- data/lib/elasticsearch/transport/transport/base.rb +69 -30
- data/lib/elasticsearch/transport/transport/connections/collection.rb +18 -8
- data/lib/elasticsearch/transport/transport/connections/connection.rb +25 -9
- data/lib/elasticsearch/transport/transport/connections/selector.rb +16 -3
- data/lib/elasticsearch/transport/transport/errors.rb +17 -3
- data/lib/elasticsearch/transport/transport/http/curb.rb +60 -35
- data/lib/elasticsearch/transport/transport/http/faraday.rb +32 -9
- data/lib/elasticsearch/transport/transport/http/manticore.rb +51 -31
- data/lib/elasticsearch/transport/transport/loggable.rb +16 -3
- data/lib/elasticsearch/transport/transport/response.rb +16 -4
- data/lib/elasticsearch/transport/transport/serializer/multi_json.rb +16 -3
- data/lib/elasticsearch/transport/transport/sniffer.rb +35 -15
- data/lib/elasticsearch/transport/version.rb +17 -4
- data/lib/elasticsearch/transport.rb +35 -33
- data/lib/elasticsearch-transport.rb +16 -3
- data/spec/elasticsearch/connections/collection_spec.rb +28 -3
- data/spec/elasticsearch/connections/selector_spec.rb +16 -3
- data/spec/elasticsearch/transport/base_spec.rb +104 -43
- data/spec/elasticsearch/transport/client_spec.rb +727 -163
- data/spec/elasticsearch/transport/http/curb_spec.rb +126 -0
- data/spec/elasticsearch/transport/http/faraday_spec.rb +141 -0
- data/spec/elasticsearch/transport/http/manticore_spec.rb +143 -0
- data/spec/elasticsearch/transport/meta_header_spec.rb +301 -0
- data/spec/elasticsearch/transport/sniffer_spec.rb +16 -16
- data/spec/spec_helper.rb +28 -6
- data/test/integration/jruby_test.rb +43 -0
- data/test/integration/transport_test.rb +46 -29
- data/test/profile/client_benchmark_test.rb +16 -3
- data/test/test_helper.rb +22 -25
- data/test/unit/connection_test.rb +23 -5
- data/test/unit/response_test.rb +18 -5
- data/test/unit/serializer_test.rb +16 -3
- data/test/unit/transport_base_test.rb +33 -11
- data/test/unit/transport_curb_test.rb +16 -4
- data/test/unit/transport_faraday_test.rb +18 -5
- data/test/unit/transport_manticore_test.rb +258 -158
- metadata +80 -71
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
require 'manticore'
|
6
19
|
|
@@ -49,13 +62,20 @@ module Elasticsearch
|
|
49
62
|
class Manticore
|
50
63
|
include Base
|
51
64
|
|
52
|
-
def initialize(arguments={}, &block)
|
65
|
+
def initialize(arguments = {}, &block)
|
66
|
+
@request_options = {
|
67
|
+
headers: (
|
68
|
+
arguments.dig(:transport_options, :headers) ||
|
69
|
+
arguments.dig(:options, :transport_options, :headers) ||
|
70
|
+
{}
|
71
|
+
)
|
72
|
+
}
|
53
73
|
@manticore = build_client(arguments[:options] || {})
|
54
74
|
super(arguments, &block)
|
55
75
|
end
|
56
76
|
|
57
77
|
# Should just be run once at startup
|
58
|
-
def build_client(options={})
|
78
|
+
def build_client(options = {})
|
59
79
|
client_options = options[:transport_options] || {}
|
60
80
|
client_options[:ssl] = options[:ssl] || {}
|
61
81
|
|
@@ -69,24 +89,27 @@ module Elasticsearch
|
|
69
89
|
#
|
70
90
|
def perform_request(method, path, params={}, body=nil, headers=nil, opts={})
|
71
91
|
super do |connection, url|
|
72
|
-
|
92
|
+
body = body ? __convert_to_json(body) : nil
|
93
|
+
body, headers = compress_request(body, @request_options[:headers])
|
94
|
+
|
95
|
+
params[:body] = body if body
|
73
96
|
params[:headers] = headers if headers
|
74
|
-
params = params.merge
|
97
|
+
params = params.merge(@request_options)
|
75
98
|
case method
|
76
|
-
when
|
99
|
+
when 'GET'
|
77
100
|
resp = connection.connection.get(url, params)
|
78
|
-
when
|
101
|
+
when 'HEAD'
|
79
102
|
resp = connection.connection.head(url, params)
|
80
|
-
when
|
103
|
+
when 'PUT'
|
81
104
|
resp = connection.connection.put(url, params)
|
82
|
-
when
|
105
|
+
when 'POST'
|
83
106
|
resp = connection.connection.post(url, params)
|
84
|
-
when
|
107
|
+
when 'DELETE'
|
85
108
|
resp = connection.connection.delete(url, params)
|
86
109
|
else
|
87
110
|
raise ArgumentError.new "Method #{method} not supported"
|
88
111
|
end
|
89
|
-
Response.new
|
112
|
+
Response.new(resp.code, resp.read_body, resp.headers)
|
90
113
|
end
|
91
114
|
end
|
92
115
|
|
@@ -96,24 +119,21 @@ module Elasticsearch
|
|
96
119
|
# @return [Connections::Collection]
|
97
120
|
#
|
98
121
|
def __build_connections
|
99
|
-
|
100
|
-
apply_headers(@request_options, options[:transport_options])
|
101
|
-
apply_headers(@request_options, options)
|
122
|
+
apply_headers(options)
|
102
123
|
|
103
|
-
Connections::Collection.new
|
104
|
-
:
|
105
|
-
host[:protocol]
|
106
|
-
host[:port]
|
124
|
+
Connections::Collection.new(
|
125
|
+
connections: hosts.map do |host|
|
126
|
+
host[:protocol] = host[:scheme] || DEFAULT_PROTOCOL
|
127
|
+
host[:port] ||= DEFAULT_PORT
|
107
128
|
|
108
129
|
host.delete(:user) # auth is not supported here.
|
109
130
|
host.delete(:password) # use the headers
|
110
131
|
|
111
|
-
Connections::Connection.new
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
:selector => options[:selector]
|
132
|
+
Connections::Connection.new(host: host, connection: @manticore)
|
133
|
+
end,
|
134
|
+
selector_class: options[:selector_class],
|
135
|
+
selector: options[:selector]
|
136
|
+
)
|
117
137
|
end
|
118
138
|
|
119
139
|
# Closes all connections by marking them as dead
|
@@ -141,16 +161,16 @@ module Elasticsearch
|
|
141
161
|
|
142
162
|
private
|
143
163
|
|
144
|
-
def apply_headers(
|
145
|
-
headers =
|
164
|
+
def apply_headers(options)
|
165
|
+
headers = options[:headers] || options.dig(:transport_options, :headers) || {}
|
146
166
|
headers[CONTENT_TYPE_STR] = find_value(headers, CONTENT_TYPE_REGEX) || DEFAULT_CONTENT_TYPE
|
147
|
-
headers[USER_AGENT_STR] = find_value(headers, USER_AGENT_REGEX) || user_agent_header
|
167
|
+
headers[USER_AGENT_STR] = find_value(headers, USER_AGENT_REGEX) || find_value(@request_options[:headers], USER_AGENT_REGEX) || user_agent_header
|
148
168
|
headers[ACCEPT_ENCODING] = GZIP if use_compression?
|
149
|
-
request_options.merge!(headers
|
169
|
+
@request_options[:headers].merge!(headers)
|
150
170
|
end
|
151
171
|
|
152
172
|
def user_agent_header
|
153
|
-
@
|
173
|
+
@user_agent_header ||= begin
|
154
174
|
meta = ["RUBY_VERSION: #{JRUBY_VERSION}"]
|
155
175
|
if RbConfig::CONFIG && RbConfig::CONFIG['host_os']
|
156
176
|
meta << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} #{RbConfig::CONFIG['target_cpu']}"
|
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
module Elasticsearch
|
6
19
|
|
@@ -1,11 +1,23 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
module Elasticsearch
|
6
19
|
module Transport
|
7
20
|
module Transport
|
8
|
-
|
9
21
|
# Wraps the response from Elasticsearch.
|
10
22
|
#
|
11
23
|
class Response
|
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
module Elasticsearch
|
6
19
|
module Transport
|
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
module Elasticsearch
|
6
19
|
module Transport
|
@@ -32,21 +45,21 @@ module Elasticsearch
|
|
32
45
|
#
|
33
46
|
def hosts
|
34
47
|
Timeout::timeout(timeout, SnifferTimeoutError) do
|
35
|
-
nodes =
|
36
|
-
reload_on_failure: false).body
|
48
|
+
nodes = perform_sniff_request.body
|
37
49
|
|
38
50
|
hosts = nodes['nodes'].map do |id, info|
|
39
|
-
|
40
|
-
|
51
|
+
next unless info[PROTOCOL]
|
52
|
+
host, port = parse_publish_address(info[PROTOCOL]['publish_address'])
|
41
53
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
54
|
+
{
|
55
|
+
id: id,
|
56
|
+
name: info['name'],
|
57
|
+
version: info['version'],
|
58
|
+
host: host,
|
59
|
+
port: port,
|
60
|
+
roles: info['roles'],
|
61
|
+
attributes: info['attributes']
|
62
|
+
}
|
50
63
|
end.compact
|
51
64
|
|
52
65
|
hosts.shuffle! if transport.options[:randomize_hosts]
|
@@ -56,6 +69,13 @@ module Elasticsearch
|
|
56
69
|
|
57
70
|
private
|
58
71
|
|
72
|
+
def perform_sniff_request
|
73
|
+
transport.perform_request(
|
74
|
+
'GET', '_nodes/http', {}, nil, nil,
|
75
|
+
reload_on_failure: false
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
59
79
|
def parse_publish_address(publish_address)
|
60
80
|
# publish_address is in the format hostname/ip:port
|
61
81
|
if publish_address =~ /\//
|
@@ -1,9 +1,22 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
module Elasticsearch
|
6
19
|
module Transport
|
7
|
-
VERSION =
|
20
|
+
VERSION = '7.17.7'.freeze
|
8
21
|
end
|
9
22
|
end
|
@@ -1,36 +1,38 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
18
|
+
require 'uri'
|
19
|
+
require 'time'
|
20
|
+
require 'timeout'
|
21
|
+
require 'zlib'
|
22
|
+
require 'multi_json'
|
23
|
+
require 'faraday'
|
10
24
|
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require
|
16
|
-
require
|
17
|
-
require
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require
|
22
|
-
require
|
25
|
+
require 'elasticsearch/transport/transport/loggable'
|
26
|
+
require 'elasticsearch/transport/transport/serializer/multi_json'
|
27
|
+
require 'elasticsearch/transport/transport/sniffer'
|
28
|
+
require 'elasticsearch/transport/transport/response'
|
29
|
+
require 'elasticsearch/transport/transport/errors'
|
30
|
+
require 'elasticsearch/transport/transport/base'
|
31
|
+
require 'elasticsearch/transport/transport/connections/selector'
|
32
|
+
require 'elasticsearch/transport/transport/connections/connection'
|
33
|
+
require 'elasticsearch/transport/transport/connections/collection'
|
34
|
+
require 'elasticsearch/transport/transport/http/faraday'
|
35
|
+
require 'elasticsearch/transport/client'
|
36
|
+
require 'elasticsearch/transport/redacted'
|
23
37
|
|
24
|
-
require
|
25
|
-
|
26
|
-
module Elasticsearch
|
27
|
-
module Client
|
28
|
-
|
29
|
-
# A convenience wrapper for {::Elasticsearch::Transport::Client#initialize}.
|
30
|
-
#
|
31
|
-
def new(arguments={}, &block)
|
32
|
-
Elasticsearch::Transport::Client.new(arguments, &block)
|
33
|
-
end
|
34
|
-
extend self
|
35
|
-
end
|
36
|
-
end
|
38
|
+
require 'elasticsearch/transport/version'
|
@@ -1,5 +1,18 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
require 'elasticsearch/transport'
|
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
require 'spec_helper'
|
6
19
|
|
@@ -236,6 +249,18 @@ describe Elasticsearch::Transport::Transport::Connections::Collection do
|
|
236
249
|
collection.get_connection.host[:host]
|
237
250
|
end).to eq((0..9).to_a)
|
238
251
|
end
|
252
|
+
|
253
|
+
it 'always returns a connection' do
|
254
|
+
threads = 20.times.map do
|
255
|
+
Thread.new do
|
256
|
+
20.times.map do
|
257
|
+
collection.get_connection.dead!
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
expect(threads.flat_map(&:value).size).to eq(400)
|
263
|
+
end
|
239
264
|
end
|
240
265
|
end
|
241
266
|
end
|
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
4
17
|
|
5
18
|
require 'spec_helper'
|
6
19
|
|