fluent-plugin-postgres 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +7 -1
- data/fluent-plugin-postgres.gemspec +2 -1
- data/lib/fluent/plugin/out_postgres.rb +1 -1
- data/test/plugin/test_out_postgres.rb +13 -0
- metadata +28 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7dc444608cda7a7c9564dfef3351887db330fd89fd07544dc70e63c05a50804f
|
4
|
+
data.tar.gz: b8ab67866697933b5f04e5715b82d9a0a5cc9773e04a5d1b8c5c8994e74ed4da
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 49d8fc658ee51563dec9310093ffa0bee409b7a5a8f401103bf6b78c39a5198956f80b47b45d02f2dfbdcb0d6d5bbab3231ad68ed893ca67310262887919df63
|
7
|
+
data.tar.gz: 465de8a0e4a8f31d808cb19c359a7bbd59a45111a35c90559be620130accba79b76052a887ef6fa22aa8dd3ed0c4532050f363da935c37bbfc5c1ae2ed075434
|
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
-
# fluent-plugin-postgres
|
1
|
+
# fluent-plugin-postgres, a plugin for [Fluentd](http://fluentd.org)
|
2
2
|
|
3
|
+
## Installation:
|
4
|
+
|
5
|
+
- Prereq: Install postgresql headers: `apt-get install libpq-dev`
|
6
|
+
- Install the gem:
|
7
|
+
- `gem install fluent-plugin-postgres` or
|
8
|
+
- `/usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-postgres`
|
3
9
|
|
4
10
|
## Changes from mysql:
|
5
11
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'fluent-plugin-postgres'
|
4
|
-
s.version = '0.0.
|
4
|
+
s.version = '0.0.2'
|
5
5
|
s.authors = ['TAGOMORI Satoshi', 'Diogo Terror', 'pitr']
|
6
6
|
s.email = ['team@uken.com']
|
7
7
|
s.description = %q{fluent plugin to insert on PostgreSQL}
|
@@ -18,4 +18,5 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'pg'
|
19
19
|
|
20
20
|
s.add_development_dependency 'rake'
|
21
|
+
s.add_development_dependency 'test-unit', '~> 3.2.0'
|
21
22
|
end
|
@@ -31,7 +31,7 @@ class Fluent::PostgresOutput < Fluent::BufferedOutput
|
|
31
31
|
if @format == 'json'
|
32
32
|
@format_proc = Proc.new{|tag, time, record| record.to_json}
|
33
33
|
else
|
34
|
-
@key_names = @key_names.split(
|
34
|
+
@key_names = @key_names.split(/\s*,\s*/)
|
35
35
|
@format_proc = Proc.new{|tag, time, record| @key_names.map{|k| record[k]}}
|
36
36
|
end
|
37
37
|
|
@@ -57,6 +57,19 @@ key_names field1,field2,field3
|
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
60
|
+
def test_key_names_with_spaces
|
61
|
+
d = create_driver %[
|
62
|
+
host database.local
|
63
|
+
database foo
|
64
|
+
username bar
|
65
|
+
password mogera
|
66
|
+
table baz
|
67
|
+
key_names time, tag, field1, field2, field3, field4
|
68
|
+
sql INSERT INTO baz (coltime,coltag,col1,col2,col3,col4) VALUES (?,?,?,?,?,?)
|
69
|
+
]
|
70
|
+
assert_equal ["time", "tag", "field1", "field2", "field3", "field4"], d.instance.key_names
|
71
|
+
end
|
72
|
+
|
60
73
|
def test_time_and_tag_key
|
61
74
|
d = create_driver %[
|
62
75
|
host database.local
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- TAGOMORI Satoshi
|
@@ -11,56 +10,64 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: fluentd
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
|
-
- -
|
19
|
+
- - ">="
|
22
20
|
- !ruby/object:Gem::Version
|
23
21
|
version: '0'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
|
-
- -
|
26
|
+
- - ">="
|
30
27
|
- !ruby/object:Gem::Version
|
31
28
|
version: '0'
|
32
29
|
- !ruby/object:Gem::Dependency
|
33
30
|
name: pg
|
34
31
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
32
|
requirements:
|
37
|
-
- -
|
33
|
+
- - ">="
|
38
34
|
- !ruby/object:Gem::Version
|
39
35
|
version: '0'
|
40
36
|
type: :runtime
|
41
37
|
prerelease: false
|
42
38
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
39
|
requirements:
|
45
|
-
- -
|
40
|
+
- - ">="
|
46
41
|
- !ruby/object:Gem::Version
|
47
42
|
version: '0'
|
48
43
|
- !ruby/object:Gem::Dependency
|
49
44
|
name: rake
|
50
45
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
46
|
requirements:
|
53
|
-
- -
|
47
|
+
- - ">="
|
54
48
|
- !ruby/object:Gem::Version
|
55
49
|
version: '0'
|
56
50
|
type: :development
|
57
51
|
prerelease: false
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
53
|
requirements:
|
61
|
-
- -
|
54
|
+
- - ">="
|
62
55
|
- !ruby/object:Gem::Version
|
63
56
|
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: test-unit
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 3.2.0
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 3.2.0
|
64
71
|
description: fluent plugin to insert on PostgreSQL
|
65
72
|
email:
|
66
73
|
- team@uken.com
|
@@ -68,7 +75,7 @@ executables: []
|
|
68
75
|
extensions: []
|
69
76
|
extra_rdoc_files: []
|
70
77
|
files:
|
71
|
-
- .gitignore
|
78
|
+
- ".gitignore"
|
72
79
|
- Gemfile
|
73
80
|
- LICENSE.txt
|
74
81
|
- README.md
|
@@ -80,33 +87,26 @@ files:
|
|
80
87
|
homepage: https://github.com/uken/fluent-plugin-postgres
|
81
88
|
licenses:
|
82
89
|
- Apache 2.0
|
90
|
+
metadata: {}
|
83
91
|
post_install_message:
|
84
92
|
rdoc_options: []
|
85
93
|
require_paths:
|
86
94
|
- lib
|
87
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
96
|
requirements:
|
90
|
-
- -
|
97
|
+
- - ">="
|
91
98
|
- !ruby/object:Gem::Version
|
92
99
|
version: '0'
|
93
|
-
segments:
|
94
|
-
- 0
|
95
|
-
hash: 4318069174566996150
|
96
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
101
|
requirements:
|
99
|
-
- -
|
102
|
+
- - ">="
|
100
103
|
- !ruby/object:Gem::Version
|
101
104
|
version: '0'
|
102
|
-
segments:
|
103
|
-
- 0
|
104
|
-
hash: 4318069174566996150
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version:
|
107
|
+
rubygems_version: 2.7.6
|
108
108
|
signing_key:
|
109
|
-
specification_version:
|
109
|
+
specification_version: 4
|
110
110
|
summary: fluent plugin to insert on PostgreSQL
|
111
111
|
test_files:
|
112
112
|
- test/helper.rb
|