fluent-plugin-pghstore 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-pghstore.gemspec +3 -1
- data/lib/fluent/plugin/out_pghstore.rb +3 -3
- metadata +23 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 785352a064f74e021addfef298d4c959da92e083
|
4
|
+
data.tar.gz: 53a73f39afd52b80c7f7893a749daa7573550b49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 540997718094263792c3d48c36a908a52ae5f5c661e6fa715e7053b7d1b88b84280e3e6554f184d438619f36c2eafdd7dea4eeecb0debd6d48a927bba43af6de
|
7
|
+
data.tar.gz: 5a88274bd246d42b48b226120f9c2d657cfde601773c52eba46f2bda1246801abce4e8c243b128bf3300a70a8859ea0c45318a83d8fccee490fb15e228619081
|
@@ -3,12 +3,13 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-pghstore"
|
6
|
-
s.version = "0.2.
|
6
|
+
s.version = "0.2.5"
|
7
7
|
s.authors = ["WAKAYAMA Shirou"]
|
8
8
|
s.email = ["shirou.faw@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/shirou/fluent-plugin-pghstore"
|
10
10
|
s.summary = %q{Output to PostgreSQL database which has a hstore extension}
|
11
11
|
s.description = %q{Output to PostgreSQL database which has a hstore extension}
|
12
|
+
s.license = "Apache-2.0"
|
12
13
|
|
13
14
|
s.rubyforge_project = "fluent-plugin-pghstore"
|
14
15
|
|
@@ -22,6 +23,7 @@ Gem::Specification.new do |s|
|
|
22
23
|
# s.add_runtime_dependency "rest-client"
|
23
24
|
s.add_development_dependency "fluentd", "~> 0.12.5"
|
24
25
|
s.add_development_dependency "pg", "~> 0.18.1"
|
26
|
+
s.add_development_dependency "test-unit", "~> 3.1.0"
|
25
27
|
# s.add_runtime_dependency "fluentd", "~> 0.12.5"
|
26
28
|
# s.add_runtime_dependency "pg", "~> 0.18.1"
|
27
29
|
end
|
@@ -6,7 +6,7 @@ class Fluent::PgHStoreOutput < Fluent::BufferedOutput
|
|
6
6
|
config_param :host, :string, :default => 'localhost'
|
7
7
|
config_param :port, :integer, :default => 5432
|
8
8
|
config_param :user, :string, :default => nil
|
9
|
-
config_param :password, :string, :default => nil
|
9
|
+
config_param :password, :string, :default => nil, :secret => true
|
10
10
|
|
11
11
|
config_param :table_option, :string, :default => nil
|
12
12
|
|
@@ -38,7 +38,7 @@ class Fluent::PgHStoreOutput < Fluent::BufferedOutput
|
|
38
38
|
return if conn == nil # TODO: chunk will be dropped. should retry?
|
39
39
|
|
40
40
|
chunk.msgpack_each {|(tag, time_str, record)|
|
41
|
-
sql = generate_sql(tag, time_str, record)
|
41
|
+
sql = generate_sql(conn, tag, time_str, record)
|
42
42
|
begin
|
43
43
|
conn.exec(sql)
|
44
44
|
rescue PGError => e
|
@@ -51,7 +51,7 @@ class Fluent::PgHStoreOutput < Fluent::BufferedOutput
|
|
51
51
|
|
52
52
|
private
|
53
53
|
|
54
|
-
def generate_sql(tag, time, record)
|
54
|
+
def generate_sql(conn, tag, time, record)
|
55
55
|
kv_list = []
|
56
56
|
record.each {|(key,value)|
|
57
57
|
kv_list.push("\"#{conn.escape_string(key)}\" => \"#{conn.escape_string(value)}\"")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-pghstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WAKAYAMA Shirou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.18.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: test-unit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.1.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.1.0
|
55
69
|
description: Output to PostgreSQL database which has a hstore extension
|
56
70
|
email:
|
57
71
|
- shirou.faw@gmail.com
|
@@ -71,7 +85,8 @@ files:
|
|
71
85
|
- test/plugin/test_out_pghstore.rb
|
72
86
|
- test/plugin/test_out_pghstore.rb.bak
|
73
87
|
homepage: https://github.com/shirou/fluent-plugin-pghstore
|
74
|
-
licenses:
|
88
|
+
licenses:
|
89
|
+
- Apache-2.0
|
75
90
|
metadata: {}
|
76
91
|
post_install_message:
|
77
92
|
rdoc_options: []
|
@@ -89,8 +104,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
104
|
version: '0'
|
90
105
|
requirements: []
|
91
106
|
rubyforge_project: fluent-plugin-pghstore
|
92
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.2.2
|
93
108
|
signing_key:
|
94
109
|
specification_version: 4
|
95
110
|
summary: Output to PostgreSQL database which has a hstore extension
|
96
|
-
test_files:
|
111
|
+
test_files:
|
112
|
+
- test/helper.rb
|
113
|
+
- test/plugin/test_out_pghstore.rb
|
114
|
+
- test/plugin/test_out_pghstore.rb.bak
|