Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elasticsearch-transport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Features overview:

For optimal performance, you should use a HTTP library which supports persistent ("keep-alive") connections,
e.g. [Patron](https://github.com/toland/patron) or [Typhoeus](https://github.com/typhoeus/typhoeus).
Just `require 'patron'` or `require 'typhoeus'; require 'typhoeus/adapters/faraday'` in your code,
Just `require 'patron'` or `require 'typhoeus'` in your code,
and it will be automatically used; other automatically used libraries are
[HTTPClient](https://rubygems.org/gems/httpclient) and
[Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def initialize(arguments={})
@transport = arguments[:transport] || begin
if transport_class == Transport::HTTP::Faraday
transport_class.new(:hosts => __extract_hosts(hosts, arguments), :options => arguments) do |faraday|
faraday.adapter(arguments[:adapter] || __auto_detect_adapter)
adapter = arguments[:adapter] || __auto_detect_adapter
require "typhoeus/adapters/faraday" if adapter == :typhoeus
faraday.adapter(adapter)
end
else
transport_class.new(:hosts => __extract_hosts(hosts, arguments), :options => arguments)
Expand Down