fluent-plugin-elasticsearch 0.7.0 → 0.8.0

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: db7ae2774a9228b9590ed370a165dce4b02cffb9
4
- data.tar.gz: 0a3fdd28683a0c7a63169b2ed9b9188876d205f2
3
+ metadata.gz: c59dd5df9cd9a3ae7cb7e32b79fce58855888dbe
4
+ data.tar.gz: 3bb7808c913b37088eb610bb62a59394da068f0a
5
5
  SHA512:
6
- metadata.gz: 97264a9bd9817e7cd4b43e413f6ac492d61dfac495256008209f08453db1f889a188c2f46d15c674c9c619fc488deeec343169312f01daabd6654b7d31d06586
7
- data.tar.gz: 42f10a91ad47b1927411cef10ddd33d093b7e56608940feb3e032c06110945b74c7d1484bcc6d1a5a136d4c59ceb85912f4ebfcc1d85cc83f2586b6e6b706041
6
+ metadata.gz: dcd423ab475f32322b88467b74456c290196d5dc9ffb9afddbaa845a91852875f64eedaf84edd77f68c56a56db99102d96077cd31e8ce3fc691a370976ed905e
7
+ data.tar.gz: f7bd63fe77c03c7d9e889869c1cc06d1f4a266be4eb503bfdd708b6cee133c1dde5bb03e0415ff85606a8d94f377837ed2962b5d912d90eb45fbfd36635a2542
data/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ # EditorConfig: http://EditorConfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ end_of_line = lf
7
+ insert_final_newline = true
8
+ indent_style = space
9
+ indent_size = 2
data/History.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ### Future
4
4
 
5
+ ### 0.8.0
6
+ - Replace Patron with Excon HTTP client
7
+
5
8
  ### 0.7.0
6
9
  - Add new option `time_key` (#85)
7
10
 
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'fluent-plugin-elasticsearch'
6
- s.version = '0.7.0'
6
+ s.version = '0.8.0'
7
7
  s.authors = ['diogo', 'pitr']
8
8
  s.email = ['pitr@uken.com', 'diogo@uken.com']
9
9
  s.description = %q{ElasticSearch output plugin for Fluent event collector}
@@ -17,9 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.require_paths = ['lib']
18
18
 
19
19
  s.add_runtime_dependency 'fluentd', '>= 0.10.43'
20
- s.add_runtime_dependency 'patron', '~> 0'
20
+ s.add_runtime_dependency 'excon', '>= 0'
21
21
  s.add_runtime_dependency 'elasticsearch', '>= 0'
22
22
 
23
+
23
24
  s.add_development_dependency 'rake', '~> 0'
24
25
  s.add_development_dependency 'webmock', '~> 1'
25
26
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
  require 'date'
3
- require 'patron'
3
+ require 'excon'
4
4
  require 'elasticsearch'
5
5
  require 'uri'
6
6
 
@@ -46,7 +46,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
46
46
 
47
47
  def client
48
48
  @_es ||= begin
49
- adapter_conf = lambda {|f| f.adapter :patron }
49
+ adapter_conf = lambda {|f| f.adapter :excon }
50
50
  transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new(get_connection_options.merge(
51
51
  options: {
52
52
  reload_connections: @reload_connections,
@@ -60,7 +60,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
60
60
 
61
61
  begin
62
62
  raise ConnectionFailure, "Can not reach Elasticsearch cluster (#{connection_options_description})!" unless es.ping
63
- rescue Faraday::ConnectionFailed => e
63
+ rescue *es.transport.host_unreachable_exceptions => e
64
64
  raise ConnectionFailure, "Can not reach Elasticsearch cluster (#{connection_options_description})! #{e.message}"
65
65
  end
66
66
 
@@ -166,7 +166,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
166
166
  retries = 0
167
167
  begin
168
168
  client.bulk body: data
169
- rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
169
+ rescue *client.transport.host_unreachable_exceptions => e
170
170
  if retries < 2
171
171
  retries += 1
172
172
  @_es = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - diogo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-23 00:00:00.000000000 Z
12
+ date: 2015-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -26,17 +26,17 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.10.43
28
28
  - !ruby/object:Gem::Dependency
29
- name: patron
29
+ name: excon
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
@@ -89,6 +89,7 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - ".editorconfig"
92
93
  - ".gitignore"
93
94
  - ".travis.yml"
94
95
  - Gemfile
@@ -127,3 +128,4 @@ summary: ElasticSearch output plugin for Fluent event collector
127
128
  test_files:
128
129
  - test/helper.rb
129
130
  - test/plugin/test_out_elasticsearch.rb
131
+ has_rdoc: