fluent-plugin-mysql 0.1.2 → 0.1.3
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 +4 -4
- data/fluent-plugin-mysql.gemspec +1 -1
- data/lib/fluent/plugin/out_mysql_bulk.rb +2 -2
- data/test/plugin/test_out_mysql_bulk.rb +25 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 610af4a47fce2d59e6127e3807852d88f1b4cc10
|
|
4
|
+
data.tar.gz: cb4877084c4d8b577d88a3419458fb64a58e9775
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe22ceb42d179872696486c6629196235a3f0d17048aac1bc0c57b9b5865c4075faf0a1d6f1fb2d79cbb243bd2945aaa4e5045289f1de83620f1dcd3463c2b5f
|
|
7
|
+
data.tar.gz: deca6e5d9007061d43c16c055246759aa6dc3eac42aa1809431d30cf85e23de9d844b9f5c113cb0bde882148e90fa54c42b025168786fd2a728ce993aa56e5c8
|
data/fluent-plugin-mysql.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
2
|
Gem::Specification.new do |gem|
|
|
3
3
|
gem.name = "fluent-plugin-mysql"
|
|
4
|
-
gem.version = "0.1.
|
|
4
|
+
gem.version = "0.1.3"
|
|
5
5
|
gem.authors = ["TAGOMORI Satoshi", "Toyama Hiroshi"]
|
|
6
6
|
gem.email = ["tagomoris@gmail.com", "toyama0919@gmail.com"]
|
|
7
7
|
gem.description = %q{fluent plugin to insert mysql as json(single column) or insert statement}
|
|
@@ -65,8 +65,8 @@ DESC
|
|
|
65
65
|
@on_duplicate_key_update_sql += updates.join(',')
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
-
@column_names = @column_names.split(',')
|
|
69
|
-
@key_names = @key_names.nil? ? @column_names : @key_names.split(',')
|
|
68
|
+
@column_names = @column_names.split(',').collect(&:strip)
|
|
69
|
+
@key_names = @key_names.nil? ? @column_names : @key_names.split(',').collect(&:strip)
|
|
70
70
|
@json_key_names = @json_key_names.split(',') if @json_key_names
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -184,4 +184,29 @@ class MysqlBulkOutputTest < Test::Unit::TestCase
|
|
|
184
184
|
assert_equal ['request_headers','params'], d.instance.json_key_names
|
|
185
185
|
assert_nil d.instance.instance_variable_get(:@on_duplicate_key_update_sql)
|
|
186
186
|
end
|
|
187
|
+
|
|
188
|
+
def test_spaces_in_columns
|
|
189
|
+
d = create_driver %[
|
|
190
|
+
database test_app_development
|
|
191
|
+
username root
|
|
192
|
+
password hogehoge
|
|
193
|
+
column_names id, user_name, created_at, updated_at
|
|
194
|
+
table users
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
assert_equal ['id','user_name','created_at','updated_at'], d.instance.key_names
|
|
198
|
+
assert_equal ['id','user_name','created_at','updated_at'], d.instance.column_names
|
|
199
|
+
|
|
200
|
+
d = create_driver %[
|
|
201
|
+
database test_app_development
|
|
202
|
+
username root
|
|
203
|
+
password hogehoge
|
|
204
|
+
key_names id, user_name, created_at, updated_at
|
|
205
|
+
column_names id, user_name, created_at, updated_at
|
|
206
|
+
table users
|
|
207
|
+
]
|
|
208
|
+
|
|
209
|
+
assert_equal ['id','user_name','created_at','updated_at'], d.instance.key_names
|
|
210
|
+
assert_equal ['id','user_name','created_at','updated_at'], d.instance.column_names
|
|
211
|
+
end
|
|
187
212
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-mysql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- TAGOMORI Satoshi
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-05-
|
|
12
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: fluentd
|