fluent-plugin-mysql-replicator 0.4.0 → 0.4.1

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.
data/README.md CHANGED
@@ -93,6 +93,17 @@ See tutorial at [Tutorial-mysql_replicator_multi.md](https://github.com/y-ken/fl
93
93
  * [mysql_multi_table_to_elasticsearch.md](https://github.com/y-ken/fluent-plugin-mysql-replicator/blob/master/example/mysql_multi_table_to_elasticsearch.md)
94
94
  * [mysql_multi_table_to_solr.md](https://github.com/y-ken/fluent-plugin-mysql-replicator/blob/master/example/mysql_multi_table_to_solr.md)
95
95
 
96
+ ## Articles
97
+
98
+ * MySQLテーブルへの更新/削除イベントを逐次取得するFluentdプラグイン「fluent-plugin-mysql-replicator」をリリースしました - Y-Ken Studio<br />
99
+ http://y-ken.hatenablog.com/entry/fluent-plugin-mysql-replicator-has-released
100
+
101
+ * MySQLユーザ視点での小さく始めるElasticsearch<br />
102
+ http://www.slideshare.net/y-ken/introducing-elasticsearch-for-mysql-users
103
+
104
+ * MySQLからelasticsearchへ、レコードをネスト構造化しつつ同期出来る fluent-plugin-mysql-replicator v0.4.0 を公開しました - Y-Ken Studio<br />
105
+ http://y-ken.hatenablog.com/entry/fluent-plugin-mysql-repicator-v0.4.0
106
+
96
107
  ## TODO
97
108
 
98
109
  Pull requests are very welcome like below!!
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "fluent-plugin-mysql-replicator"
4
- s.version = "0.4.0"
4
+ s.version = "0.4.1"
5
5
  s.authors = ["Kentaro Yoshida"]
6
6
  s.email = ["y.ken.studio@gmail.com"]
7
7
  s.homepage = "https://github.com/y-ken/fluent-plugin-mysql-replicator"
@@ -66,7 +66,7 @@ module Fluent
66
66
  current_ids << row[@primary_key]
67
67
  current_hash = Digest::SHA1.hexdigest(row.flatten.join)
68
68
  row.each {|k, v| row[k] = v.to_s if v.is_a?(Time) || v.is_a?(Date)}
69
- row.select {|k, v| v.to_s.match(/^SELECT/i) }.each do |k, v|
69
+ row.select {|k, v| v.to_s.strip.match(/^SELECT/i) }.each do |k, v|
70
70
  row[k] = [] unless row[k].is_a?(Array)
71
71
  prepared_con.query(v.gsub(/\$\{([^\}]+)\}/, row[$1].to_s)).each do |nest_row|
72
72
  row[k] << nest_row
@@ -84,7 +84,7 @@ module Fluent
84
84
  db = get_origin_connection(config)
85
85
  db.query(config['query']).each do |row|
86
86
  row.each {|k, v| row[k] = v.to_s if v.is_a?(Time) || v.is_a?(Date)}
87
- row.select {|k, v| v.to_s.match(/^SELECT/i) }.each do |k, v|
87
+ row.select {|k, v| v.to_s.strip.match(/^SELECT/i) }.each do |k, v|
88
88
  row[k] = [] unless row[k].is_a?(Array)
89
89
  nest_db.query(v.gsub(/\$\{([^\}]+)\}/) {|matched| row[$1].to_s}).each do |nest_row|
90
90
  row[k] << nest_row
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-mysql-replicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-08 00:00:00.000000000 Z
12
+ date: 2014-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake