fluent-plugin-sql 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/README.md +4 -1
- data/VERSION +1 -1
- data/fluent-plugin-sql.gemspec +4 -4
- data/lib/fluent/plugin/in_sql.rb +3 -0
- data/lib/fluent/plugin/out_sql.rb +3 -0
- data/test/plugin/test_in_sql.rb +4 -0
- data/test/plugin/test_out_sql.rb +4 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23ecce81f2ec2830716c45445688e709d0b16cf4
|
4
|
+
data.tar.gz: 0fd2ea1be49a7a67428727138840905a932db1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e033466e88f576493744f89e4153ca6fe9258ca4ef70372892aaaefa212c354965577308b8c4efa43b8489c571c51ac9ad9cf1a28496d03892c90c710a22cf79
|
7
|
+
data.tar.gz: 4f527cb05b629a9a0d9558ee9940ecd7b127a45b91f9d5f3276e74de6f7cee0617bcc13e3d4c716f101f0463787fb90d75c238309fd4180bb494ac9ddb86cae1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -19,12 +19,15 @@ NOTE: fluent-plugin-sql v1.0.0 is now RC. We will release stable v1.0.0 soon.
|
|
19
19
|
## Installation
|
20
20
|
|
21
21
|
$ fluent-gem install fluent-plugin-sql --no-document
|
22
|
-
$ fluent-gem install pg --no-document # for postgresql
|
22
|
+
$ fluent-gem install pg -v 0.21.0 --no-document # for postgresql
|
23
23
|
|
24
24
|
You should install actual RDBMS driver gem together. `pg` gem for postgresql adapter or `mysql2` gem for `mysql2` adapter. Other adapters supported by [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord) should work.
|
25
25
|
|
26
26
|
We recommend that mysql2 gem is higher than `0.3.12` and pg gem is higher than `0.16.0`.
|
27
27
|
|
28
|
+
We must use pg gem 0.21.0 (< 1.0.0) because ActiveRecord 5.0 or later doesn't support Ruby 2.1.
|
29
|
+
NOTE: ActiveRecord has supported pg 1.0.0 since ActiveRecord 5.1.5.
|
30
|
+
|
28
31
|
## Input: How It Works
|
29
32
|
|
30
33
|
This plugin runs following SQL periodically:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.1
|
data/fluent-plugin-sql.gemspec
CHANGED
@@ -4,7 +4,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = "fluent-plugin-sql"
|
6
6
|
gem.description = "SQL input/output plugin for Fluentd event collector"
|
7
|
-
gem.homepage = "https://github.com/
|
7
|
+
gem.homepage = "https://github.com/fluent/fluent-plugin-sql"
|
8
8
|
gem.summary = gem.description
|
9
9
|
gem.version = File.read("VERSION").strip
|
10
10
|
gem.authors = ["Sadayuki Furuhashi"]
|
@@ -18,11 +18,11 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.license = "Apache-2.0"
|
19
19
|
|
20
20
|
gem.add_dependency "fluentd", [">= 0.12.17", "< 2"]
|
21
|
-
gem.add_dependency 'activerecord', "~>
|
21
|
+
gem.add_dependency 'activerecord', "~> 5.1"
|
22
22
|
gem.add_dependency 'activerecord-import', "~> 0.7"
|
23
23
|
gem.add_development_dependency "rake", ">= 0.9.2"
|
24
|
-
gem.add_development_dependency "test-unit", "
|
24
|
+
gem.add_development_dependency "test-unit", "> 3.1.0"
|
25
25
|
gem.add_development_dependency "test-unit-rr"
|
26
26
|
gem.add_development_dependency "test-unit-notify"
|
27
|
-
gem.add_development_dependency "pg", '~>
|
27
|
+
gem.add_development_dependency "pg", '~> 1.0'
|
28
28
|
end
|
data/lib/fluent/plugin/in_sql.rb
CHANGED
@@ -39,6 +39,8 @@ module Fluent::Plugin
|
|
39
39
|
config_param :password, :string, default: nil, secret: true
|
40
40
|
desc 'RDBMS socket path'
|
41
41
|
config_param :socket, :string, default: nil
|
42
|
+
desc 'PostgreSQL schema search path'
|
43
|
+
config_param :schema_search_path, :string, default: nil
|
42
44
|
|
43
45
|
desc 'path to a file to store last rows'
|
44
46
|
config_param :state_file, :string, default: nil
|
@@ -176,6 +178,7 @@ module Fluent::Plugin
|
|
176
178
|
username: @username,
|
177
179
|
password: @password,
|
178
180
|
socket: @socket,
|
181
|
+
schema_search_path: @schema_search_path,
|
179
182
|
}
|
180
183
|
|
181
184
|
# creates subclass of ActiveRecord::Base so that it can have different
|
@@ -22,6 +22,8 @@ module Fluent::Plugin
|
|
22
22
|
config_param :database, :string
|
23
23
|
desc 'RDBMS socket path'
|
24
24
|
config_param :socket, :string, default: nil
|
25
|
+
desc 'PostgreSQL schema search path'
|
26
|
+
config_param :schema_search_path, :string, default: nil
|
25
27
|
desc 'remove the given prefix from the events'
|
26
28
|
config_param :remove_tag_prefix, :string, default: nil
|
27
29
|
desc 'enable fallback'
|
@@ -187,6 +189,7 @@ module Fluent::Plugin
|
|
187
189
|
username: @username,
|
188
190
|
password: @password,
|
189
191
|
socket: @socket,
|
192
|
+
schema_search_path: @schema_search_path,
|
190
193
|
}
|
191
194
|
|
192
195
|
@base_model = Class.new(ActiveRecord::Base) do
|
data/test/plugin/test_in_sql.rb
CHANGED
@@ -18,6 +18,8 @@ class SqlInputTest < Test::Unit::TestCase
|
|
18
18
|
username fluentd
|
19
19
|
password fluentd
|
20
20
|
|
21
|
+
schema_search_path public
|
22
|
+
|
21
23
|
tag_prefix db
|
22
24
|
|
23
25
|
<table>
|
@@ -41,6 +43,7 @@ class SqlInputTest < Test::Unit::TestCase
|
|
41
43
|
database: "fluentd_test",
|
42
44
|
username: "fluentd",
|
43
45
|
password: "fluentd",
|
46
|
+
schema_search_path: "public",
|
44
47
|
tag_prefix: "db"
|
45
48
|
}
|
46
49
|
actual = {
|
@@ -50,6 +53,7 @@ class SqlInputTest < Test::Unit::TestCase
|
|
50
53
|
database: d.instance.database,
|
51
54
|
username: d.instance.username,
|
52
55
|
password: d.instance.password,
|
56
|
+
schema_search_path: d.instance.schema_search_path,
|
53
57
|
tag_prefix: d.instance.tag_prefix
|
54
58
|
}
|
55
59
|
assert_equal(expected, actual)
|
data/test/plugin/test_out_sql.rb
CHANGED
@@ -18,6 +18,8 @@ class SqlOutputTest < Test::Unit::TestCase
|
|
18
18
|
username fluentd
|
19
19
|
password fluentd
|
20
20
|
|
21
|
+
schema_search_path public
|
22
|
+
|
21
23
|
remove_tag_prefix db
|
22
24
|
|
23
25
|
<table>
|
@@ -39,6 +41,7 @@ class SqlOutputTest < Test::Unit::TestCase
|
|
39
41
|
database: "fluentd_test",
|
40
42
|
username: "fluentd",
|
41
43
|
password: "fluentd",
|
44
|
+
schema_search_path: 'public',
|
42
45
|
remove_tag_suffix: /^db/,
|
43
46
|
enable_fallback: true
|
44
47
|
}
|
@@ -49,6 +52,7 @@ class SqlOutputTest < Test::Unit::TestCase
|
|
49
52
|
database: d.instance.database,
|
50
53
|
username: d.instance.username,
|
51
54
|
password: d.instance.password,
|
55
|
+
schema_search_path: d.instance.schema_search_path,
|
52
56
|
remove_tag_suffix: d.instance.remove_tag_prefix,
|
53
57
|
enable_fallback: d.instance.enable_fallback
|
54
58
|
}
|
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: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '5.1'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '5.1'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activerecord-import
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,14 +76,14 @@ dependencies:
|
|
76
76
|
name: test-unit
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - ">"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: 3.1.0
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - ">"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 3.1.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: '1.0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: '1.0'
|
131
131
|
description: SQL input/output plugin for Fluentd event collector
|
132
132
|
email: frsyuki@gmail.com
|
133
133
|
executables: []
|
@@ -147,7 +147,7 @@ files:
|
|
147
147
|
- test/helper.rb
|
148
148
|
- test/plugin/test_in_sql.rb
|
149
149
|
- test/plugin/test_out_sql.rb
|
150
|
-
homepage: https://github.com/
|
150
|
+
homepage: https://github.com/fluent/fluent-plugin-sql
|
151
151
|
licenses:
|
152
152
|
- Apache-2.0
|
153
153
|
metadata: {}
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
169
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.6.
|
170
|
+
rubygems_version: 2.6.14.1
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: SQL input/output plugin for Fluentd event collector
|