NoNo 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,21 +1,38 @@
1
1
  NoNo
2
2
  ================
3
3
 
4
- NoNo is a simple Profanity Filter is a black-list based validator. Given a list of fields to check against, NoNo will ensure no content with any profanity is entered into the system.
4
+ NoNo is a simple black-list profanity filter. Given a list of fields to check against, NoNo will ensure no content with any profanity is entered into the system.
5
5
 
6
6
  ## Installation ##
7
7
 
8
8
  Latest stable release:
9
9
 
10
- gem "nono"
10
+ gem "NoNo"
11
11
 
12
12
  ## Usage ##
13
13
 
14
14
  In the model you want to check for profanity its as simple as one line in the model.
15
15
 
16
- class Article < ActiveRecord::Base
17
- check_profanity
18
- attr_accessible :body, :title
19
- end
16
+ class Article < ActiveRecord::Base
17
+ check_profanity
18
+ attr_accessible :body, :title
19
+ end
20
20
 
21
21
  This will ensure no record will be saved into the system.
22
+
23
+ $ > Article.create(title: "<p>boob</p>", body: "<p><em>b</em>oob</p>")
24
+ $ (0.1ms) begin transaction
25
+ $ (0.1ms) rollback transaction
26
+ $ => #<Article id: nil, title: "<p>boob</p>", body: "<p><em>b</em>oob</p>", created_at: nil, updated_at: nil>
27
+
28
+ This also strips all HTML tags to check againsts the literal text to prevent any work arounds to the filter.
29
+
30
+ ## How to Modify ##
31
+
32
+ To add or remove words from the filter simply override or extend the array in lib/nono/banned_word.rb
33
+
34
+ ## TO DO ##
35
+
36
+ Extend functionality to allow for records to be saved, but simply overriden with *'s.
37
+
38
+
@@ -1,48 +1,48 @@
1
1
  module NoNo
2
- WORDS = %w(
3
- 4r5e 5ht 5hit a55 anal anus ar5e arrse arse ass ass-fucker
4
- asses assfucker assfukka asshole assholes asswhole a_s_s b!tch b00bs
5
- b7ch btch ballbag balls ballsack bastard beastial beastiality bellend
6
- bestial bestiality bi+ch biatch bitch bitcher bitchers bitches bitchin
7
- bitching bloody blowjob blowjob blowjobs boiolas bollock bollok boner
8
- boob boobs booobs boooobs booooobs booooooobs breasts buceta bugger bum
9
- bunnyfucker butt butthole buttmuch buttplug c0ck c0cksucker carpetmuncher
10
- cawk chink cipa clt clit clitoris clits cnut cock cock-sucker cockface
11
- cockhead cockmunch cockmuncher cocks cocksuck cocksucked cocksucker
12
- cocksucking cocksucks cocksuka cocksukka cok cokmuncher coksucka coon
13
- cox crap cum cummer cumming cums cumshot cunilingus cunillingus cunnilingus
14
- cunt cuntlick cuntlicker cuntlicking cunts cyalis cyberfuc
15
- cyberfuck cyberfucked cyberfucker cyberfuckers cyberfucking dck
16
- damn dick dickhead dildo dildos dink dinks dirsa dlck dog-fucker doggin
17
- dogging donkeyribber doosh duche dyke ejaculate ejaculated ejaculates
18
- ejaculating ejaculatings ejaculation ejakulate fuck fucker f4nny fag fagging
19
- faggitt faggot faggs fagot fagots fags fanny fannyflaps fannyfucker fanyy fatass
20
- fcuk fcuker fcuking feck fecker felching fellate fellatio fingerfuck fingerfucked
21
- fingerfucker fingerfuckers fingerfucking fingerfucks fistfuck fistfucked
22
- fistfucker fistfuckers fistfucking fistfuckings fistfucks flange fook fooker
23
- fuck fucka fucked fucker fuckers fuckhead fuckheads fuckin fucking fuckings
24
- fuckingshitmotherfucker fuckme fucks fuckwhit fuckwit fudgepacker
25
- fudgepacker fuk fuker fukker fukkin fuks fukwhit fukwit fux fux0r f_u_c_k gangbang
26
- gangbanged gangbangs gaylord gaysex goatse God god-dam god-damned goddamn goddamned
27
- hardcoresex hell heshe hoar hoare hoer homo hore horniest horny hotsex jack-off jackoff jap
28
- jerk-off jism jiz jizm jizz kawk knob knobead knobed knobend knobhead knobjocky knobjokey kock kondum
29
- kondums kum kummer kumming kums kunilingus l3i+ch l3itch labia lmfao lust lusting m0f0 m0fo
30
- m45terbate ma5terb8 ma5terbate masochist master-bate masterb8 masterbat* masterbat3 masterbate
31
- masterbation masterbations masturbate mo-fo mof0 mofo mothafuck mothafucka mothafuckas mothafuckaz
32
- mothafucked mothafucker mothafuckers mothafuckin mothafucking mothafuckings mothafucks motherfucker
33
- motherfuck motherfucked motherfucker motherfuckers motherfuckin motherfucking motherfuckings
34
- motherfuckka motherfucks muff mutha muthafecker muthafuckker muther mutherfucker ngga ngger nazi
35
- nigg3r nigg4h nigga niggah niggas niggaz nigger niggers nob nobjokey nobhead nobjocky nobjokey
36
- numbnuts nutsack orgasim orgasims orgasm orgasms p0rn pawn pecker penis penisfucker phonesex
37
- phuck phuk phuked phuking phukked phukking phuks phuq pigfucker pimpis piss pissed pisser pissers
38
- pisses pissflaps pissin pissing pissoff porn porno pornography pornos prick
39
- pricks pron pube pusse pussi pussies pussy pussys rectum retard rimjaw rimming shit
40
- s.o.b. sadist schlong screwing scroat scrote scrotum semen sex sh!+ sh!t sht shag shagger
41
- shaggin shagging shemale shi+ shit shitdick shite shited shitey shitfuck shitfull shithead
42
- shiting shitings shits shitted shitter shitters shitting shittings shitty skank slut sluts
43
- smegma smut snatch son-of-a-bitch spac spunk s_h_i_t ttte5 ttties teets teez testical
44
- testicle tit titfuck tits titt tittie5 tittiefucker titties tittyfuck tittywank titwank
45
- tosser turd tw4t twat twathead twatty twunt twunter v4gra vgra vagina viagra vulva w00se wang
46
- wank wanker wanky whoar whore willies willy xrated xxx
47
- )
2
+ WORDS = %w(
3
+ 4r5e 5ht 5hit a55 anal anus ar5e arrse arse ass ass-fucker
4
+ asses assfucker assfukka asshole assholes asswhole a_s_s b!tch b00bs
5
+ b7ch btch ballbag balls ballsack bastard beastial beastiality bellend
6
+ bestial bestiality bi+ch biatch bitch bitcher bitchers bitches bitchin
7
+ bitching bloody blowjob blowjob blowjobs boiolas bollock bollok boner
8
+ boob boobs booobs boooobs booooobs booooooobs breasts buceta bugger bum
9
+ bunnyfucker butt butthole buttmuch buttplug c0ck c0cksucker carpetmuncher
10
+ cawk chink cipa clt clit clitoris clits cnut cock cock-sucker cockface
11
+ cockhead cockmunch cockmuncher cocks cocksuck cocksucked cocksucker
12
+ cocksucking cocksucks cocksuka cocksukka cok cokmuncher coksucka coon
13
+ cox crap cum cummer cumming cums cumshot cunilingus cunillingus cunnilingus
14
+ cunt cuntlick cuntlicker cuntlicking cunts cyalis cyberfuc
15
+ cyberfuck cyberfucked cyberfucker cyberfuckers cyberfucking dck
16
+ damn dick dickhead dildo dildos dink dinks dirsa dlck dog-fucker doggin
17
+ dogging donkeyribber doosh duche dyke ejaculate ejaculated ejaculates
18
+ ejaculating ejaculatings ejaculation ejakulate fuck fucker f4nny fag fagging
19
+ faggitt faggot faggs fagot fagots fags fanny fannyflaps fannyfucker fanyy fatass
20
+ fcuk fcuker fcuking feck fecker felching fellate fellatio fingerfuck fingerfucked
21
+ fingerfucker fingerfuckers fingerfucking fingerfucks fistfuck fistfucked
22
+ fistfucker fistfuckers fistfucking fistfuckings fistfucks flange fook fooker
23
+ fuck fucka fucked fucker fuckers fuckhead fuckheads fuckin fucking fuckings
24
+ fuckingshitmotherfucker fuckme fucks fuckwhit fuckwit fudgepacker
25
+ fudgepacker fuk fuker fukker fukkin fuks fukwhit fukwit fux fux0r f_u_c_k gangbang
26
+ gangbanged gangbangs gaylord gaysex goatse God god-dam god-damned goddamn goddamned
27
+ hardcoresex hell heshe hoar hoare hoer homo hore horniest horny hotsex jack-off jackoff jap
28
+ jerk-off jism jiz jizm jizz kawk knob knobead knobed knobend knobhead knobjocky knobjokey kock kondum
29
+ kondums kum kummer kumming kums kunilingus l3i+ch l3itch labia lmfao lust lusting m0f0 m0fo
30
+ m45terbate ma5terb8 ma5terbate masochist master-bate masterb8 masterbat* masterbat3 masterbate
31
+ masterbation masterbations masturbate mo-fo mof0 mofo mothafuck mothafucka mothafuckas mothafuckaz
32
+ mothafucked mothafucker mothafuckers mothafuckin mothafucking mothafuckings mothafucks motherfucker
33
+ motherfuck motherfucked motherfucker motherfuckers motherfuckin motherfucking motherfuckings
34
+ motherfuckka motherfucks muff mutha muthafecker muthafuckker muther mutherfucker ngga ngger nazi
35
+ nigg3r nigg4h nigga niggah niggas niggaz nigger niggers nob nobjokey nobhead nobjocky nobjokey
36
+ numbnuts nutsack orgasim orgasims orgasm orgasms p0rn pawn pecker penis penisfucker phonesex
37
+ phuck phuk phuked phuking phukked phukking phuks phuq pigfucker pimpis piss pissed pisser pissers
38
+ pisses pissflaps pissin pissing pissoff porn porno pornography pornos prick
39
+ pricks pron pube pusse pussi pussies pussy pussys rectum retard rimjaw rimming shit
40
+ s.o.b. sadist schlong screwing scroat scrote scrotum semen sex sh!+ sh!t sht shag shagger
41
+ shaggin shagging shemale shi+ shit shitdick shite shited shitey shitfuck shitfull shithead
42
+ shiting shitings shits shitted shitter shitters shitting shittings shitty skank slut sluts
43
+ smegma smut snatch son-of-a-bitch spac spunk s_h_i_t ttte5 ttties teets teez testical
44
+ testicle tit titfuck tits titt tittie5 tittiefucker titties tittyfuck tittywank titwank
45
+ tosser turd tw4t twat twathead twatty twunt twunter v4gra vgra vagina viagra vulva w00se wang
46
+ wank wanker wanky whoar whore willies willy xrated xxx
47
+ )
48
48
  end
data/lib/nono/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module NoNo
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/nono.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = NoNo::VERSION
8
8
  s.authors = ["Garrett Heinlen"]
9
9
  s.email = ["heinleng@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "http://gggarrett.com"
11
11
  s.summary = %q{NoNo a simple profanity filter}
12
12
  #s.description = %q{}
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: NoNo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-03 00:00:00.000000000 Z
12
+ date: 2013-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sanitize
16
- requirement: &70286680657020 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70286680657020
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  description:
26
31
  email:
27
32
  - heinleng@gmail.com
@@ -37,7 +42,7 @@ files:
37
42
  - lib/nono/banned_word.rb
38
43
  - lib/nono/version.rb
39
44
  - nono.gemspec
40
- homepage: ''
45
+ homepage: http://gggarrett.com
41
46
  licenses: []
42
47
  post_install_message:
43
48
  rdoc_options: []
@@ -57,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
62
  version: '0'
58
63
  requirements: []
59
64
  rubyforge_project: nono
60
- rubygems_version: 1.8.15
65
+ rubygems_version: 1.8.24
61
66
  signing_key:
62
67
  specification_version: 3
63
68
  summary: NoNo a simple profanity filter