censor_bear 0.1.11 → 0.1.12
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 +4 -4
- data/lib/censor_bear/censor.rb +9 -9
- data/lib/censor_bear/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58d7a9f6214a5f560794d6bca513cf288d01e7444aa293e243a3cf3e33e8e8d8
|
|
4
|
+
data.tar.gz: c1385ce54281b8d764f191f262c7941b32c0590b304d57976ef8e661f24c49ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97924df8a0ab45a7afc36d483e20bba15ecd98c23134d629bb4c93e44c233eff45e935871579303b68f107ba3b555d5b595c7f5e0a129bf107b4b213b4827272
|
|
7
|
+
data.tar.gz: e964103ec3434614e1d7eea7829efebf1bc66b6ad2b8bec9c8e6b2c8868b637c13baa2aad85ccc7f3427437ba3e04eb5a8f649f4f8c85dc947246d50c1bd4494
|
data/lib/censor_bear/censor.rb
CHANGED
|
@@ -30,15 +30,15 @@ module CensorBear
|
|
|
30
30
|
return Result.new(@content) unless CensorBear::StopWord::FIELDS.include?(@type)
|
|
31
31
|
|
|
32
32
|
# 正则过滤
|
|
33
|
-
if @content.match(QQ_REG)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
if @content.match(WX_REG)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
end
|
|
33
|
+
# if @content.match(QQ_REG)
|
|
34
|
+
# CensorBear.info(@content, @type, 'BANNED', 'qq_regex', ip: @ip, user_id: @user_id)
|
|
35
|
+
# raise NotPassedException
|
|
36
|
+
# end
|
|
37
|
+
|
|
38
|
+
# if @content.match(WX_REG)
|
|
39
|
+
# CensorBear.info(@content, @type, 'BANNED', 'wx_regex', ip: @ip, user_id: @user_id)
|
|
40
|
+
# raise NotPassedException
|
|
41
|
+
# end
|
|
42
42
|
|
|
43
43
|
# 本地自定义词库粗查
|
|
44
44
|
local_check
|
data/lib/censor_bear/version.rb
CHANGED