mysql2_query_filter 0.1.0 → 0.1.1

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: 0d022676c32d776a551477f215d2cf8497bf1f0c
4
- data.tar.gz: 34358b98e6940db5055810320e4d2d477f22bf63
3
+ metadata.gz: c8cc3540bc5d855e512762968dcef2da52ff6fd7
4
+ data.tar.gz: 31a83ca10c3aad475088fb0793ef0891ff73b97f
5
5
  SHA512:
6
- metadata.gz: 1b5a352c96146904d8dfe339957bd2cdbbc1bc07b6b81c829631074d48d56767a351175549d4936a8a9620fce0fc86008c07ec276f7f119f7b35d2a6d087d717
7
- data.tar.gz: 66584176d34607f657f8d88268f8d6a3d78f994f4244538a70e068d6210c32793624303aea7fae03ce6b9cbd1885b740cb7a96daf604fbd71fef9eec138fbfd5
6
+ metadata.gz: b0d949eb2539f84dec234586d2d9ebe8a37fd6bf09f666f94cab76889b865a78dc4b971d688f9e40d20af11e5fda3c6131893bafb2adefd5fc6ad1a7a49d65bb
7
+ data.tar.gz: 3430517ea7a6df57077b2a3992cdb45e42857bf4fed257138798b19b28a7c52615707feed59acefbf8dce218a3f7c7fa418493e444fa3d654513dfcd0d3ef018
data/README.md CHANGED
@@ -27,9 +27,9 @@ Or install it yourself as:
27
27
  require 'mysql2_query_filter'
28
28
 
29
29
  class MyFilter < Mysql2QueryFilter::Base
30
- def filter(sql, query_options)
30
+ def filter(sql, client)
31
31
  p sql
32
- p query_options
32
+ p client
33
33
  end
34
34
  end
35
35
 
@@ -5,7 +5,7 @@ module Mysql2QueryFilter::Mysql2ClientExt
5
5
 
6
6
  def query(*args)
7
7
  sql = args.first
8
- Mysql2QueryFilter.filter(sql, @query_options)
8
+ Mysql2QueryFilter.filter(sql, self)
9
9
  query_without_filter(*args)
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Mysql2QueryFilter
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -2,7 +2,7 @@ module Mysql2QueryFilter::Plugin
2
2
  class Test < Mysql2QueryFilter::Base
3
3
  Mysql2QueryFilter::Plugin.register(:test_plugin, self)
4
4
 
5
- def filter(sql, query_options)
5
+ def filter(sql, client)
6
6
  sql << ' through plugin'
7
7
  end
8
8
  end
@@ -4,13 +4,13 @@ describe Mysql2QueryFilter do
4
4
  context 'when using filters' do
5
5
  let(:filter1) do
6
6
  Class.new(Mysql2QueryFilter::Base) do
7
- def filter(sql, query_options); sql << ' through filter1'; end
7
+ def filter(sql, client); sql << ' through filter1'; end
8
8
  end
9
9
  end
10
10
 
11
11
  let(:filter2) do
12
12
  Class.new(Mysql2QueryFilter::Base) do
13
- def filter(sql, query_options); sql << ' through filter2'; end
13
+ def filter(sql, client); sql << ' through filter2'; end
14
14
  end
15
15
  end
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql2_query_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara