elasticsearch-transport 5.0.2 → 5.0.3

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
  SHA1:
3
- metadata.gz: e41972a48c8437f78891cb2d82ec8b2a623d825f
4
- data.tar.gz: 7093946c35ecfe27353f4678b7194951c378addf
3
+ metadata.gz: 789ec1e3bb9aed97ffd4479cbf02bbad55265088
4
+ data.tar.gz: 3578fd13952bc2c03b3047114e3e461f87d50410
5
5
  SHA512:
6
- metadata.gz: 14f15746ec09b0ea4389298e15326ef3026a8adf683198d5b2fdc2b40114bf5390d76b60ae8cd5a587e05b5776a22b365ccd0736ef0a348a56db7c63760c3b68
7
- data.tar.gz: 355d03fafbeb574b421448e683bfe6c34b5fac51be774513ee3c62ed397b0769de90ee422d1bb8627e73ca4646fc465feb6e45fd082dff66572ddec11051bab0
6
+ metadata.gz: 08aed8209e065f8c50dcf6bbf1a9cd91b6f78b8e3f574c08f73bd04a6c48427548ea3f164721ec093af3ced98a96c029cdc7ef0a808f8c86426ee8a4294371eb
7
+ data.tar.gz: 6b99e2a8451e1b5aade9e276b95269b703601eea58d119df7e098c65a6794ecbfa8034057420ef1cad271abbafb4345147dcb5ebf7da70d1471224249acfb3fe
@@ -93,6 +93,10 @@ module Elasticsearch
93
93
  def __build_connections
94
94
  @request_options = {}
95
95
 
96
+ if options[:transport_options] && options[:transport_options][:headers]
97
+ @request_options[:headers] = options[:transport_options][:headers]
98
+ end
99
+
96
100
  if options.key?(:headers)
97
101
  @request_options[:headers] = options[:headers]
98
102
  end
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Transport
3
- VERSION = "5.0.2"
3
+ VERSION = "5.0.3"
4
4
  end
5
5
  end
@@ -75,6 +75,19 @@ else
75
75
  assert_equal response.status, 200
76
76
  end
77
77
 
78
+ should "set headers from 'transport_options'" do
79
+ options = {
80
+ :transport_options => {
81
+ :headers => { "Content-Type" => "foo/bar"}
82
+ }
83
+ }
84
+
85
+ transport = Manticore.new :hosts => [ { :host => 'localhost', :port => 8080 } ], :options => options
86
+
87
+ assert_equal('foo/bar', transport.connections.first.connection.instance_variable_get(:@options)[:headers]['Content-Type'])
88
+ # TODO: Needs to check @request_options
89
+ end
90
+
78
91
  should "handle HTTP methods" do
79
92
  @transport.connections.first.connection.expects(:delete).with('http://127.0.0.1:8080//', {}).returns(stub_everything)
80
93
  @transport.connections.first.connection.expects(:head).with('http://127.0.0.1:8080//', {}).returns(stub_everything)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-transport
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
@@ -332,24 +332,8 @@ dependencies:
332
332
  - - ">="
333
333
  - !ruby/object:Gem::Version
334
334
  version: '0'
335
- - !ruby/object:Gem::Dependency
336
- name: test-unit
337
- requirement: !ruby/object:Gem::Requirement
338
- requirements:
339
- - - "~>"
340
- - !ruby/object:Gem::Version
341
- version: '2'
342
- type: :development
343
- prerelease: false
344
- version_requirements: !ruby/object:Gem::Requirement
345
- requirements:
346
- - - "~>"
347
- - !ruby/object:Gem::Version
348
- version: '2'
349
- description: 'Ruby client for Elasticsearch. See the `elasticsearch` gem for full
350
- integration.
351
-
352
- '
335
+ description: |
336
+ Ruby client for Elasticsearch. See the `elasticsearch` gem for full integration.
353
337
  email:
354
338
  - karel.minarik@elasticsearch.org
355
339
  executables: []
@@ -415,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
399
  version: '0'
416
400
  requirements: []
417
401
  rubyforge_project:
418
- rubygems_version: 2.6.8
402
+ rubygems_version: 2.2.2
419
403
  signing_key:
420
404
  specification_version: 4
421
405
  summary: Ruby client for Elasticsearch.