Skip to content

Commit dcfbe7a

Browse files
committed
Update READMES
1 parent cbe3748 commit dcfbe7a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ Both of these libraries are extensively documented.
8484
and the [`elasticsearch-api`](http://rubydoc.info/gems/elasticsearch-api) documentation carefully.**
8585

8686
_Keep in mind, that for optimal performance, you should use a HTTP library which supports persistent
87-
("keep-alive") connections, e.g. [Patron](https://github.com/toland/patron) or
88-
[Typhoeus](https://github.com/typhoeus/typhoeus)._ These libraries are not dependencies of the elasticsearch gems, so
89-
be sure to define a dependency in your own application.
87+
("keep-alive") connections, e.g. [Patron](https://github.com/toland/patron)._ These libraries are not dependencies of the elasticsearch gems, so be sure to define a dependency in your own application.
9088

9189
This repository contains these additional Ruby libraries:
9290

elasticsearch-transport/README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ Features overview:
2828
* Node reloading (based on cluster state) on errors or on demand
2929

3030
For optimal performance, use a HTTP library which supports persistent ("keep-alive") connections,
31-
such as [Typhoeus](https://github.com/typhoeus/typhoeus).
32-
Just require the library (`require 'typhoeus'; require 'typhoeus/adapters/faraday'`) in your code,
33-
and it will be automatically used; currently these libraries will be automatically detected and used:
34-
[Patron](https://github.com/toland/patron),
35-
[HTTPClient](https://rubygems.org/gems/httpclient) and
36-
[Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent).
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.
34+
35+
Currently these libraries will be automatically detected and used:
36+
- [Patron](https://github.com/toland/patron)
37+
- [HTTPClient](https://rubygems.org/gems/httpclient)
38+
- [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent)
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
3741

3842
For detailed information, see example configurations [below](#transport-implementations).
3943

@@ -436,12 +440,11 @@ client = Elasticsearch::Client.new transport_options: {
436440
To configure the _Faraday_ instance directly, use a block:
437441

438442
```ruby
439-
require 'typhoeus'
440-
require 'typhoeus/adapters/faraday'
443+
require 'patron'
441444

442445
client = Elasticsearch::Client.new(host: 'localhost', port: '9200') do |f|
443446
f.response :logger
444-
f.adapter :typhoeus
447+
f.adapter :patron
445448
end
446449
```
447450

@@ -451,12 +454,11 @@ You can also initialize the transport class yourself, and pass it to the client
451454
as the `transport` argument:
452455

453456
```ruby
454-
require 'typhoeus'
455-
require 'typhoeus/adapters/faraday'
457+
require 'patron'
456458

457459
transport_configuration = lambda do |f|
458460
f.response :logger
459-
f.adapter :typhoeus
461+
f.adapter :patron
460462
end
461463

462464
transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new \

0 commit comments

Comments
 (0)