fluent-plugin-mysql 0.1.2 → 0.1.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: 46b2ab27b2b88e54ba4f7ca82307f817d62ec94e
4
- data.tar.gz: 402da207e1091d937b39c8e6d64d19f7b44183a5
3
+ metadata.gz: 610af4a47fce2d59e6127e3807852d88f1b4cc10
4
+ data.tar.gz: cb4877084c4d8b577d88a3419458fb64a58e9775
5
5
  SHA512:
6
- metadata.gz: f32a22df72c4b9bb20167e3cf0f9b803c04b579185675fe7820face0ddb4bfe00d7c97dfc43500d1979ee07fd6b181deb055136ea4422b295c75f1515840a768
7
- data.tar.gz: 32d688f19e937d51943db69c85e643955810d160d02f4e2490911efb41a60833e9f3d239816af4af824a5a5d918d8bcb33c58f17745d69794e4a8da70539f66d
6
+ metadata.gz: fe22ceb42d179872696486c6629196235a3f0d17048aac1bc0c57b9b5865c4075faf0a1d6f1fb2d79cbb243bd2945aaa4e5045289f1de83620f1dcd3463c2b5f
7
+ data.tar.gz: deca6e5d9007061d43c16c055246759aa6dc3eac42aa1809431d30cf85e23de9d844b9f5c113cb0bde882148e90fa54c42b025168786fd2a728ce993aa56e5c8
@@ -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.2"
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.2
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-05 00:00:00.000000000 Z
12
+ date: 2016-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd