mysql2_query_filter-plugin-log 0.0.2 → 0.0.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: b27cbed50fdecbd2acf32f94e1784ada0764c8a2
4
- data.tar.gz: b55cb6f99bd48359a701ce6e19349f36ce8dd6b2
3
+ metadata.gz: fb87d5e0b71b3658268912fe4d25d50656b6c2d4
4
+ data.tar.gz: 46e6d17620847e58c5b5a04d28570d6a9182aef7
5
5
  SHA512:
6
- metadata.gz: 38cc8b7e214689776e971f25068a24c9374a3457f85c1331ff704563cba8a39d6deb693fbf5ae5a287e8ea3030bc06f7e878da090e86e5091cc16cb1f79809ca
7
- data.tar.gz: e8551ee93f8a45d5b5d4b7b3f167b4ee1534a5ac3e20b978051b3a041c2706fd15120b05470b8eff4b3fc3b847f8f067d0645a07c2262229ddbc290bf6d6b5e1
6
+ metadata.gz: 44f676547a10e86180876ad42d978d0336cf1ef1f67e6d053339e9bf0de69996332260b754ac265124b45adbd24d7ca27b7629c89b43811e0af245b74bec9332
7
+ data.tar.gz: 11408100d6f4a6dbf6c45a250aaf3e78836a6d33993068f94fe775e403efad1f824b70cf3054f2782425babc67b2c7801e013ef8a09d5a84764e055f2f6fa1b8
@@ -4,9 +4,13 @@ module Mysql2QueryFilter::Plugin
4
4
  class Log < Filter
5
5
  Mysql2QueryFilter.register(:log, self)
6
6
 
7
+ def initialize(options)
8
+ super
9
+ @out = @options[:out] || $stderr
10
+ end
11
+
7
12
  def filter(sql)
8
- out = @options[:out] || $stderr
9
- out.puts(sql)
13
+ @out << "#{sql}\n"
10
14
  end
11
15
  end
12
16
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = 'mysql2_query_filter-plugin-log'
4
- spec.version = '0.0.2'
4
+ spec.version = '0.0.3'
5
5
  spec.authors = ['Genki Sugawara']
6
6
  spec.email = ['sgwr_dts@yahoo.co.jp']
7
7
  spec.summary = %q{Logging plug-in for Mysql2QueryFilter.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql2_query_filter-plugin-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara