fluent-plugin-sql 0.4.2 → 0.4.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: 5d35a1931fa076730bb3da90a4e9ae072e019866
4
- data.tar.gz: cd00c52a1259ecd397f1ee9453d960453c12a384
3
+ metadata.gz: 1164b9f0936bfc883dacd8bf5d504554504a321d
4
+ data.tar.gz: 7fdbfcba109bb92ffdb57f77b090e40fa6d428c0
5
5
  SHA512:
6
- metadata.gz: 0732e2114274d1fd02dcd9eefba2dc2a4ab3dce6f8991c515ecdff01cae00948fdf3ec1710e018b16c38ed87fc927cf57b5df30bab7829635f28febbbef523a7
7
- data.tar.gz: 7e897e86da17c3d869557e463e03bd4d87919bc9178de0544d1d99f150a3cf3368fb9346ca9ba3c8c3b01348a2662e370e9d04cd77da42bd673dd499330fa24a
6
+ metadata.gz: 0a494953850f51f86a31904598d48afeab585b9e24dfb7da97219b16754be65cc2998badab8cc6d8c1f3eda6937012f7e9d32f7d1c5adc092a6adc2e480735ec
7
+ data.tar.gz: 0cf61ed541be1dd407102baf2f43b4ff79d1383132f77db6c34a17e53cf57fb6947f7bdfd9643c1615a108bcc928816b3d7f6266f0d0391c119d17beddee7018
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -15,9 +15,9 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  gem.require_paths = ['lib']
18
- gem.license = "Apache 2.0"
18
+ gem.license = "Apache-2.0"
19
19
 
20
- gem.add_dependency "fluentd", [">= 0.10.0", "< 2"]
20
+ gem.add_dependency "fluentd", [">= 0.10.58", "< 2"]
21
21
  gem.add_dependency 'activerecord', "~> 4.2"
22
22
  gem.add_dependency 'activerecord-import', "~> 0.7"
23
23
  gem.add_development_dependency "rake", ">= 0.9.2"
@@ -52,7 +52,8 @@ module Fluent
52
52
  super
53
53
  end
54
54
 
55
- def init(tag_prefix, base_model)
55
+ def init(tag_prefix, base_model, router)
56
+ @router = router
56
57
  @tag = "#{tag_prefix}.#{@tag}" if tag_prefix
57
58
 
58
59
  # creates a model for this table
@@ -100,7 +101,8 @@ module Fluent
100
101
  if last_record && last_update_value = last_record[@update_column]
101
102
  relation = relation.where("#{@update_column} > ?", last_update_value)
102
103
  end
103
- relation = relation.order("#{@update_column} ASC").limit(limit)
104
+ relation = relation.order("#{@update_column} ASC")
105
+ relation = relation.limit(limit) if limit > 0
104
106
 
105
107
  now = Engine.now
106
108
  entry_name = @model.table_name.singularize
@@ -124,7 +126,7 @@ module Fluent
124
126
  end
125
127
 
126
128
  last_record = last_record.dup # some plugin rewrites record :(
127
- Engine.emit_stream(@tag, me)
129
+ @router.emit_stream(@tag, me)
128
130
 
129
131
  return last_record
130
132
  end
@@ -202,7 +204,7 @@ module Fluent
202
204
  # ignore tables if TableElement#init failed
203
205
  @tables.reject! do |te|
204
206
  begin
205
- te.init(@tag_prefix, @base_model)
207
+ te.init(@tag_prefix, @base_model, router)
206
208
  log.info "Selecting '#{te.table}' table"
207
209
  false
208
210
  rescue => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.0
19
+ version: 0.10.58
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.10.0
29
+ version: 0.10.58
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'
@@ -87,7 +87,7 @@ files:
87
87
  - lib/fluent/plugin/out_sql.rb
88
88
  homepage: https://github.com/frsyuki/fluent-plugin-sql
89
89
  licenses:
90
- - Apache 2.0
90
+ - Apache-2.0
91
91
  metadata: {}
92
92
  post_install_message:
93
93
  rdoc_options: []
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.2.2
108
+ rubygems_version: 2.4.5.1
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: SQL input/output plugin for Fluentd event collector