elasticsearch-transport 0.4.9 → 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -80,6 +80,7 @@ module Elasticsearch
80
80
  arguments[:retry_on_failure] ||= false
81
81
  arguments[:reload_on_failure] ||= false
82
82
  arguments[:randomize_hosts] ||= false
83
+ arguments[:transport_options] ||= {}
83
84
 
84
85
  @transport = arguments[:transport] || \
85
86
  transport_class.new(:hosts => __extract_hosts(hosts, arguments), :options => arguments)
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Transport
3
- VERSION = "0.4.9"
3
+ VERSION = "0.4.10"
4
4
  end
5
5
  end
@@ -48,6 +48,14 @@ class Elasticsearch::Transport::ClientTest < Test::Unit::TestCase
48
48
  assert_respond_to client.transport.tracer, :info
49
49
  end
50
50
 
51
+ should "initialize the default transport class" do
52
+ Elasticsearch::Transport::Client::DEFAULT_TRANSPORT_CLASS.any_instance.
53
+ unstub(:__build_connections)
54
+
55
+ client = Elasticsearch::Client.new
56
+ assert_match /Faraday/, client.transport.connections.first.connection.headers['User-Agent']
57
+ end
58
+
51
59
  context "when passed hosts" do
52
60
  should "have localhost by default" do
53
61
  c = Elasticsearch::Transport::Client.new
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: 0.4.9
4
+ version: 0.4.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: