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 CHANGED
@@ -24,4 +24,8 @@
24
24
 
25
25
  === 0.1.7 / 2010-07-12
26
26
 
27
- * Allows words matching ".*lass.*" (e.g. classified, glassware)
27
+ * Allows words matching ".*lass.*" (e.g. classified, glassware)
28
+
29
+ === 0.1.8 / 2010-07-13
30
+
31
+ * Allows words matching "(l|m)ass." (massachusetts)
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ Hoe.plugins.delete :rubyforge
10
10
  Hoe.plugin :hg
11
11
 
12
12
  Hoe.spec 'saintly' do
13
+ developer('Andy Kvamme', 'akvamme@gmail.com')
13
14
  developer('Justin Coyne', 'jcoyne@justincoyne.com')
14
15
  extra_dev_deps << %w(shoulda >=2.10.0) << %w(mocha >=0.9.8)
15
16
  end
data/lib/saintly.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Saintly
2
- VERSION = "0.1.7"
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 = [ '.*lass.*', 'bass', 'scunthorpe', 'assum.+', 'assassin.*', 'ass(et|oc).*', 'shitake.*']
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: 21
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
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-12 00:00:00 -05:00
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