fluent-plugin-query-fingerprint 0.0.1 → 0.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a75e56c9b27edd0e549090a5f7531ad2bc37281108fc19ead249486fc6288f2
|
4
|
+
data.tar.gz: 71a4a0d1c00d465c33cb8a45747369cc533021ed1acaaf61a45509a74388548f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93acfb01c010b5e8ac846ad0601ba21c64b4dcc55b966acd880b39b57a9019e7670d2d30c7acab49c554f5180f75d31eda2232236b7ecaf33dd0817e93054c8c
|
7
|
+
data.tar.gz: 93b2d90976df82794aeb49bb79da25bbc8709435291f5e411be3f3b718c592780b439bd995ddf7ca6c323f23292e28b67fe46bcf9ae28344a6d0371c51624c8a
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-query-fingerprint"
|
6
|
-
spec.version = "0.0.
|
6
|
+
spec.version = "0.0.2"
|
7
7
|
spec.authors = ["Genta Kamitani"]
|
8
8
|
spec.email = ["oftn.mofumofu@gmail.com"]
|
9
9
|
|
@@ -50,8 +50,8 @@ module Fluent
|
|
50
50
|
return query if query.gsub!(/\Ause \S+\Z/i, "use ?")
|
51
51
|
|
52
52
|
query.gsub!(/\\["']/, "")
|
53
|
-
query.gsub!(/".*?"/
|
54
|
-
query.gsub!(/'.*?'/
|
53
|
+
query.gsub!(/".*?"/m, "?")
|
54
|
+
query.gsub!(/'.*?'/m, "?")
|
55
55
|
|
56
56
|
query.gsub!(/\btrue\b|\bfalse\b/i, "?")
|
57
57
|
|
@@ -402,6 +402,13 @@ class QueryFingerprintFilterTest < Test::Unit::TestCase
|
|
402
402
|
"select * from hoge where fuga = ?"
|
403
403
|
)
|
404
404
|
end
|
405
|
+
|
406
|
+
test "unicode" do
|
407
|
+
assert_equal(
|
408
|
+
FP.fingerprint("SELECT * FROM hoge where value = 'ほげふが'"),
|
409
|
+
"select * from hoge where value = ?"
|
410
|
+
)
|
411
|
+
end
|
405
412
|
end
|
406
413
|
|
407
414
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-query-fingerprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genta Kamitani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|