elasticsearch-transport 7.7.0 → 7.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +16 -3
  3. data/README.md +4 -4
  4. data/Rakefile +16 -3
  5. data/elasticsearch-transport.gemspec +17 -4
  6. data/lib/elasticsearch-transport.rb +16 -3
  7. data/lib/elasticsearch/transport.rb +16 -3
  8. data/lib/elasticsearch/transport/client.rb +16 -3
  9. data/lib/elasticsearch/transport/redacted.rb +16 -3
  10. data/lib/elasticsearch/transport/transport/base.rb +32 -12
  11. data/lib/elasticsearch/transport/transport/connections/collection.rb +16 -3
  12. data/lib/elasticsearch/transport/transport/connections/connection.rb +19 -5
  13. data/lib/elasticsearch/transport/transport/connections/selector.rb +16 -3
  14. data/lib/elasticsearch/transport/transport/errors.rb +16 -3
  15. data/lib/elasticsearch/transport/transport/http/curb.rb +16 -3
  16. data/lib/elasticsearch/transport/transport/http/faraday.rb +16 -3
  17. data/lib/elasticsearch/transport/transport/http/manticore.rb +16 -3
  18. data/lib/elasticsearch/transport/transport/loggable.rb +16 -3
  19. data/lib/elasticsearch/transport/transport/response.rb +16 -4
  20. data/lib/elasticsearch/transport/transport/serializer/multi_json.rb +16 -3
  21. data/lib/elasticsearch/transport/transport/sniffer.rb +35 -15
  22. data/lib/elasticsearch/transport/version.rb +17 -4
  23. data/spec/elasticsearch/connections/collection_spec.rb +16 -3
  24. data/spec/elasticsearch/connections/selector_spec.rb +16 -3
  25. data/spec/elasticsearch/transport/base_spec.rb +16 -10
  26. data/spec/elasticsearch/transport/client_spec.rb +84 -7
  27. data/spec/elasticsearch/transport/sniffer_spec.rb +16 -16
  28. data/spec/spec_helper.rb +16 -3
  29. data/test/integration/transport_test.rb +16 -3
  30. data/test/profile/client_benchmark_test.rb +16 -3
  31. data/test/test_helper.rb +16 -3
  32. data/test/unit/connection_test.rb +16 -3
  33. data/test/unit/response_test.rb +17 -4
  34. data/test/unit/serializer_test.rb +16 -3
  35. data/test/unit/transport_base_test.rb +16 -3
  36. data/test/unit/transport_curb_test.rb +16 -3
  37. data/test/unit/transport_faraday_test.rb +16 -3
  38. data/test/unit/transport_manticore_test.rb +16 -3
  39. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da865359c6aced81327cb91d756390d81abfcdf80a17bf53f793029f715cbcb9
4
- data.tar.gz: 0e1c8c2d258035e17eb6433b561d29042e657ec22e7ae3a690d3faad60a90452
3
+ metadata.gz: 9248a875060a4bd8e85ffb8f146beff61553150c155b0144e6c1c85112cdc640
4
+ data.tar.gz: 517e365d3b98a44646daea7e89ae1d457220b2be00f5a432c780e6f556b36728
5
5
  SHA512:
6
- metadata.gz: 8e75fffd89eebce5a48cc0a6a793c9919bcf7ade42ebc6daa0b6fd8253d4d98903ed2149c00287ae3c48a0373741a66a67554825e1b025ec2bdf8f401cbf0001
7
- data.tar.gz: 75fc8862f80d6ccf794fe0614f5ee04f3c767d0fcbbdc6e8294bcfa4c203cd366f0b972750b148d7f2e2d582a059fad651af2f1e385b4e1c9cb65bd8b73a9f24
6
+ metadata.gz: 4921027c53dcf8b98a0d7e2051c4dfe879f4d169f1e0d1c02c0aefe874f9f5b649f1ed6b6f82409e045582cccb8e69c87ab00dcd73a9e2f200f16ef07a04f59e
7
+ data.tar.gz: 7951d5d57c08454ddaa514fb2af1e12703d4028149853d928609af9f3fae8d6252fd50f18514e78a9d335bf47da6660a272445d4cd4b5c93fe3f6ba71422808f
data/Gemfile CHANGED
@@ -1,6 +1,19 @@
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
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
  source 'https://rubygems.org'
6
19
 
data/README.md CHANGED
@@ -28,16 +28,16 @@ Features overview:
28
28
  * Node reloading (based on cluster state) on errors or on demand
29
29
 
30
30
  For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections,
31
- such as [patron](https://github.com/toland/patron).
32
- Just require the library (`require 'patron'`) in your code,
33
- and it will be automatically used.
31
+ such as [patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus).
32
+ Just require the library (`require 'patron'`) in your code, and it will be automatically used.
34
33
 
35
34
  Currently these libraries will be automatically detected and used:
36
35
  - [Patron](https://github.com/toland/patron)
36
+ - [Typhoeus](https://github.com/typhoeus/typhoeus)
37
37
  - [HTTPClient](https://rubygems.org/gems/httpclient)
38
38
  - [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent)
39
39
 
40
- **Note on [Typhoeus](https://github.com/typhoeus/typhoeus)**: Typhoeus is compatible and will be automatically detected too. However, the latest release (v1.3.1 at the moment of writing this) is not compatible with Faraday 1.0. [It still uses the deprecated `Faraday::Error` namespace](https://github.com/typhoeus/typhoeus/blob/v1.3.1/lib/typhoeus/adapters/faraday.rb#L100). If you want to use it with this gem, we suggest getting `master` from GitHub, since this has been fixed for v1.4.0. We'll update this if/when v1.4.0 is released.a
40
+ **Note on [Typhoeus](https://github.com/typhoeus/typhoeus)**: You need to use v1.4.0 or up since older versions are not compatible with Faraday 1.0.
41
41
 
42
42
  For detailed information, see example configurations [below](#transport-implementations).
43
43
 
data/Rakefile CHANGED
@@ -1,6 +1,19 @@
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
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 "bundler/gem_tasks"
6
19
 
@@ -1,6 +1,19 @@
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
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
  # coding: utf-8
6
19
  lib = File.expand_path('../lib', __FILE__)
@@ -54,7 +67,7 @@ Gem::Specification.new do |s|
54
67
  s.add_development_dependency 'pry'
55
68
  s.add_development_dependency 'shoulda-context'
56
69
  s.add_development_dependency 'test-unit', '~> 2'
57
- s.add_development_dependency 'typhoeus', '~> 0.6'
70
+ s.add_development_dependency 'typhoeus', '~> 1.4'
58
71
  s.add_development_dependency 'yard'
59
72
  s.add_development_dependency 'bundler'
60
73
 
@@ -1,5 +1,18 @@
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
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 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
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 "uri"
6
19
  require "time"
@@ -1,6 +1,19 @@
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
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 'base64'
6
19
 
@@ -1,6 +1,19 @@
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
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 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
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
@@ -34,7 +47,7 @@ module Elasticsearch
34
47
  #
35
48
  # @see Client#initialize
36
49
  #
37
- def initialize(arguments={}, &block)
50
+ def initialize(arguments = {}, &block)
38
51
  @state_mutex = Mutex.new
39
52
 
40
53
  @hosts = arguments[:hosts] || []
@@ -221,9 +234,9 @@ module Elasticsearch
221
234
  def __full_url(host)
222
235
  url = "#{host[:protocol]}://"
223
236
  url += "#{CGI.escape(host[:user])}:#{CGI.escape(host[:password])}@" if host[:user]
224
- url += "#{host[:host]}"
237
+ url += host[:host]
225
238
  url += ":#{host[:port]}" if host[:port]
226
- url += "#{host[:path]}" if host[:path]
239
+ url += host[:path] if host[:path]
227
240
  url
228
241
  end
229
242
 
@@ -245,8 +258,9 @@ module Elasticsearch
245
258
  # @raise [ServerError] If request failed on server
246
259
  # @raise [Error] If no connection is available
247
260
  #
248
- def perform_request(method, path, params={}, body=nil, headers=nil, opts={}, &block)
249
- raise NoMethodError, "Implement this method in your transport class" unless block_given?
261
+ def perform_request(method, path, params = {}, body = nil, headers = nil, opts = {}, &block)
262
+ raise NoMethodError, 'Implement this method in your transport class' unless block_given?
263
+
250
264
  start = Time.now
251
265
  tries = 0
252
266
  reload_on_failure = opts.fetch(:reload_on_failure, @options[:reload_on_failure])
@@ -263,15 +277,15 @@ module Elasticsearch
263
277
 
264
278
  begin
265
279
  tries += 1
266
- connection = get_connection or raise Error.new("Cannot get new connection from pool.")
280
+ connection = get_connection or raise Error.new('Cannot get new connection from pool.')
267
281
 
268
282
  if connection.connection.respond_to?(:params) && connection.connection.params.respond_to?(:to_hash)
269
283
  params = connection.connection.params.merge(params.to_hash)
270
284
  end
271
285
 
272
- url = connection.full_url(path, params)
286
+ url = connection.full_url(path, params)
273
287
 
274
- response = block.call(connection, url)
288
+ response = block.call(connection, url)
275
289
 
276
290
  connection.healthy! if connection.failures > 0
277
291
 
@@ -342,6 +356,8 @@ module Elasticsearch
342
356
 
343
357
  __trace method, path, params, connection.connection.headers, body, url, response, nil, 'N/A', duration if tracer
344
358
 
359
+ warnings(response.headers['warning']) if response.headers&.[]('warning')
360
+
345
361
  Response.new response.status, json || response.body, response.headers
346
362
  ensure
347
363
  @last_request_at = Time.now
@@ -415,7 +431,11 @@ module Elasticsearch
415
431
  "elasticsearch-ruby/#{VERSION} (#{meta.join('; ')})"
416
432
  end
417
433
  end
434
+
435
+ def warnings(warning)
436
+ warn("warning: #{warning}")
437
+ end
418
438
  end
419
439
  end
420
440
  end
421
- end
441
+ end
@@ -1,6 +1,19 @@
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
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 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
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
@@ -122,14 +135,15 @@ module Elasticsearch
122
135
  }
123
136
  end
124
137
 
125
- # Equality operator based on connection protocol, host and port
138
+ # Equality operator based on connection protocol, host, port and attributes
126
139
  #
127
140
  # @return [Boolean]
128
141
  #
129
142
  def ==(other)
130
143
  self.host[:protocol] == other.host[:protocol] && \
131
144
  self.host[:host] == other.host[:host] && \
132
- self.host[:port].to_i == other.host[:port].to_i
145
+ self.host[:port].to_i == other.host[:port].to_i && \
146
+ self.host[:attributes] == other.host[:attributes]
133
147
  end
134
148
 
135
149
  # @return [String]
@@ -1,6 +1,19 @@
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
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 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
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 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
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 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
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