ngwords 0.1.2 → 0.1.3
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/ngwords/validator.rb +1 -1
- data/lib/ngwords/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d41521a6fa019d9f1c345282ca96a59c620ea26d
|
|
4
|
+
data.tar.gz: 5df7db85c0e4717f730e7201c045577ec0e2fe46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5c71701212670ebf4f40c4948f7c68e69e87ff305cc0c4eac85c81700073446fba65e0ab61e50b03785940a8f0ca6ddd265293345ea32847d968aed64592cb0
|
|
7
|
+
data.tar.gz: 9f1632726b8d8c57427b3c155022d7349bdcea0e2268b14c20726f3a951318487c8983359f984ee37da0078a92cee548ca8410c9dbd790a5080680a1b45e054d
|
data/lib/ngwords/validator.rb
CHANGED
|
@@ -21,7 +21,7 @@ module ActiveModel
|
|
|
21
21
|
delim = lang == :en ? '\\b' : ''
|
|
22
22
|
Array(list).reject(&:blank?).each do |ngword|
|
|
23
23
|
escaped_ngword = ngword.split(/\p{blank}/).reject(&:blank?).map { |word| '(?=.*' + delim + Regexp.escape(word) + delim + ')' }.join('')
|
|
24
|
-
ngwords.push(Regexp.compile("^#{escaped_ngword}", Regexp::IGNORECASE))
|
|
24
|
+
ngwords.push(Regexp.compile("^#{escaped_ngword}", Regexp::IGNORECASE | Regexp::MULTILINE))
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
@@ngwords = Regexp.union(ngwords)
|
data/lib/ngwords/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ngwords
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- chitamano
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-10-
|
|
11
|
+
date: 2018-10-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: moji
|
|
@@ -70,7 +70,7 @@ description: Ngwords prevents prohibited words from being registered in your app
|
|
|
70
70
|
The prohibited word list can be set in the YAML data format. Ngwords currently only
|
|
71
71
|
works with Rails.
|
|
72
72
|
email:
|
|
73
|
-
-
|
|
73
|
+
- chitamanokokoro@gmail.com
|
|
74
74
|
executables: []
|
|
75
75
|
extensions: []
|
|
76
76
|
extra_rdoc_files: []
|