saintly 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -1
- data/Rakefile +1 -0
- data/lib/saintly.rb +3 -4
- data/test/saintly_test.rb +3 -0
- metadata +6 -4
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/saintly.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Saintly
|
2
|
-
VERSION = "0.1.
|
2
|
+
VERSION = "0.1.8"
|
3
3
|
|
4
4
|
def self.sanitize(text)
|
5
5
|
return if text.nil?
|
@@ -18,19 +18,18 @@ module Saintly
|
|
18
18
|
end
|
19
19
|
|
20
20
|
|
21
|
-
ALLOWED_WORDS = [ '
|
21
|
+
ALLOWED_WORDS = [ 'scunthorpe', 'shitake.*']
|
22
22
|
|
23
23
|
|
24
24
|
RESTRICTED_PARTIALS = [
|
25
25
|
'fuck',
|
26
26
|
'shit',
|
27
|
-
'ass',
|
28
27
|
'nigger',
|
29
28
|
'cunt'
|
30
29
|
]
|
31
30
|
|
32
31
|
RESTRICTED_WORDS = [
|
33
|
-
'twat'
|
32
|
+
'twat', 'ass', 'dumbass', 'jackass', 'asshole'
|
34
33
|
]
|
35
34
|
|
36
35
|
module Rails
|
data/test/saintly_test.rb
CHANGED
@@ -14,6 +14,7 @@ class SaintlyTest < Test::Unit::TestCase
|
|
14
14
|
assert_equal '****', Saintly.sanitize('twat')
|
15
15
|
assert_equal '******', Saintly.sanitize('nigger')
|
16
16
|
assert_equal '*******', Saintly.sanitize('dumbass')
|
17
|
+
assert_equal '*******', Saintly.sanitize('jackass')
|
17
18
|
end
|
18
19
|
should "sanitize partial words" do
|
19
20
|
assert_equal '*******', Saintly.sanitize('fucking')
|
@@ -36,6 +37,8 @@ class SaintlyTest < Test::Unit::TestCase
|
|
36
37
|
assert_equal 'associate', Saintly.sanitize('associate')
|
37
38
|
|
38
39
|
assert_equal 'bass', Saintly.sanitize('bass')
|
40
|
+
assert_equal 'massachusetts', Saintly.sanitize('massachusetts')
|
41
|
+
assert_equal 'mass', Saintly.sanitize('mass')
|
39
42
|
|
40
43
|
assert_equal 'scunthorpe', Saintly.sanitize('scunthorpe')
|
41
44
|
assert_equal 'lightwater', Saintly.sanitize('lightwater')
|
metadata
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saintly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
+
- Andy Kvamme
|
13
14
|
- Justin Coyne
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-13 00:00:00 -05:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -68,6 +69,7 @@ dependencies:
|
|
68
69
|
version_requirements: *id003
|
69
70
|
description: A library for censoring naughty words
|
70
71
|
email:
|
72
|
+
- akvamme@gmail.com
|
71
73
|
- jcoyne@justincoyne.com
|
72
74
|
executables: []
|
73
75
|
|