profane 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.md CHANGED
@@ -63,6 +63,10 @@ Profane::Filter.profane?('If you come to a fork in the road, take it.')
63
63
  => 'false'
64
64
  ```
65
65
 
66
+ ## Thanks
67
+
68
+ Special thanks to Joseph Hsu (https://github.com/jhsu) and James Tucker (https://github.com/raggi) for their contributions to this gem.
69
+
66
70
  ## Contributing
67
71
 
68
72
  1. Fork it
@@ -39,7 +39,6 @@ bitches: ''
39
39
  bitchin: ''
40
40
  bitching: ''
41
41
  bloody: ''
42
- blow job: ''
43
42
  blowjob: ''
44
43
  blowjobs: ''
45
44
  boiolas: ''
@@ -57,14 +56,12 @@ breasts: ''
57
56
  buceta: ''
58
57
  bugger: ''
59
58
  bum: ''
60
- bunny fucker: ''
61
59
  butt: ''
62
60
  butthole: ''
63
61
  buttmuch: ''
64
62
  buttplug: ''
65
63
  c0ck: ''
66
64
  c0cksucker: ''
67
- carpet muncher: ''
68
65
  cawk: ''
69
66
  chink: ''
70
67
  cipa: ''
@@ -80,11 +77,11 @@ cockhead: ''
80
77
  cockmunch: ''
81
78
  cockmuncher: ''
82
79
  cocks: ''
83
- ! 'cocksuck ': ''
84
- ! 'cocksucked ': ''
80
+ cocksuck: ''
81
+ cocksucked: ''
85
82
  cocksucker: ''
86
83
  cocksucking: ''
87
- ! 'cocksucks ': ''
84
+ cocksucks: ''
88
85
  cocksuka: ''
89
86
  cocksukka: ''
90
87
  cok: ''
@@ -102,17 +99,17 @@ cunilingus: ''
102
99
  cunillingus: ''
103
100
  cunnilingus: ''
104
101
  cunt: ''
105
- ! 'cuntlick ': ''
106
- ! 'cuntlicker ': ''
107
- ! 'cuntlicking ': ''
102
+ cuntlick: ''
103
+ cuntlicker: ''
104
+ cuntlicking: ''
108
105
  cunts: ''
109
106
  cyalis: ''
110
107
  cyberfuc: ''
111
- ! 'cyberfuck ': ''
112
- ! 'cyberfucked ': ''
108
+ cyberfuck: ''
109
+ cyberfucked: ''
113
110
  cyberfucker: ''
114
111
  cyberfuckers: ''
115
- ! 'cyberfucking ': ''
112
+ cyberfucking: ''
116
113
  d1ck: ''
117
114
  damn: ''
118
115
  dick: ''
@@ -132,13 +129,11 @@ duche: ''
132
129
  dyke: ''
133
130
  ejaculate: ''
134
131
  ejaculated: ''
135
- ! 'ejaculates ': ''
136
- ! 'ejaculating ': ''
132
+ ejaculates: ''
133
+ ejaculating: ''
137
134
  ejaculatings: ''
138
135
  ejaculation: ''
139
136
  ejakulate: ''
140
- f u c k: ''
141
- f u c k e r: ''
142
137
  f4nny: ''
143
138
  fag: ''
144
139
  fagging: ''
@@ -161,19 +156,19 @@ fecker: ''
161
156
  felching: ''
162
157
  fellate: ''
163
158
  fellatio: ''
164
- ! 'fingerfuck ': ''
165
- ! 'fingerfucked ': ''
166
- ! 'fingerfucker ': ''
159
+ fingerfuck: ''
160
+ fingerfucked: ''
161
+ fingerfucker: ''
167
162
  fingerfuckers: ''
168
- ! 'fingerfucking ': ''
169
- ! 'fingerfucks ': ''
163
+ fingerfucking: ''
164
+ fingerfucks: ''
170
165
  fistfuck: ''
171
- ! 'fistfucked ': ''
172
- ! 'fistfucker ': ''
173
- ! 'fistfuckers ': ''
174
- ! 'fistfucking ': ''
175
- ! 'fistfuckings ': ''
176
- ! 'fistfucks ': ''
166
+ fistfucked: ''
167
+ fistfucker: ''
168
+ fistfuckers: ''
169
+ fistfucking: ''
170
+ fistfuckings: ''
171
+ fistfucks: ''
177
172
  flange: ''
178
173
  fook: ''
179
174
  fooker: ''
@@ -188,11 +183,10 @@ fuckin: ''
188
183
  fucking: ''
189
184
  fuckings: ''
190
185
  fuckingshitmotherfucker: ''
191
- ! 'fuckme ': ''
186
+ fuckme: ''
192
187
  fucks: ''
193
188
  fuckwhit: ''
194
189
  fuckwit: ''
195
- fudge packer: ''
196
190
  fudgepacker: ''
197
191
  fuk: ''
198
192
  fuker: ''
@@ -205,8 +199,8 @@ fux: ''
205
199
  fux0r: ''
206
200
  f_u_c_k: ''
207
201
  gangbang: ''
208
- ! 'gangbanged ': ''
209
- ! 'gangbangs ': ''
202
+ gangbanged: ''
203
+ gangbangs: ''
210
204
  gaylord: ''
211
205
  gaysex: ''
212
206
  goatse: ''
@@ -215,7 +209,7 @@ god-dam: ''
215
209
  god-damned: ''
216
210
  goddamn: ''
217
211
  goddamned: ''
218
- ! 'hardcoresex ': ''
212
+ hardcoresex: ''
219
213
  hell: ''
220
214
  heshe: ''
221
215
  hoar: ''
@@ -226,13 +220,13 @@ hore: ''
226
220
  horniest: ''
227
221
  horny: ''
228
222
  hotsex: ''
229
- ! 'jack-off ': ''
223
+ jack-off: ''
230
224
  jackoff: ''
231
225
  jap: ''
232
- ! 'jerk-off ': ''
226
+ jerk-off: ''
233
227
  jism: ''
234
- ! 'jiz ': ''
235
- ! 'jizm ': ''
228
+ jiz: ''
229
+ jizm: ''
236
230
  jizz: ''
237
231
  kawk: ''
238
232
  knob: ''
@@ -277,14 +271,13 @@ mothafuck: ''
277
271
  mothafucka: ''
278
272
  mothafuckas: ''
279
273
  mothafuckaz: ''
280
- ! 'mothafucked ': ''
274
+ mothafucked: ''
281
275
  mothafucker: ''
282
276
  mothafuckers: ''
283
277
  mothafuckin: ''
284
- ! 'mothafucking ': ''
278
+ mothafucking: ''
285
279
  mothafuckings: ''
286
280
  mothafucks: ''
287
- mother fucker: ''
288
281
  motherfuck: ''
289
282
  motherfucked: ''
290
283
  motherfucker: ''
@@ -310,18 +303,17 @@ niggah: ''
310
303
  niggas: ''
311
304
  niggaz: ''
312
305
  nigger: ''
313
- ! 'niggers ': ''
306
+ niggers: ''
314
307
  nob: ''
315
- nob jokey: ''
316
308
  nobhead: ''
317
309
  nobjocky: ''
318
310
  nobjokey: ''
319
311
  numbnuts: ''
320
312
  nutsack: ''
321
- ! 'orgasim ': ''
322
- ! 'orgasims ': ''
313
+ orgasim: ''
314
+ orgasims: ''
323
315
  orgasm: ''
324
- ! 'orgasms ': ''
316
+ orgasms: ''
325
317
  p0rn: ''
326
318
  pawn: ''
327
319
  pecker: ''
@@ -342,30 +334,29 @@ piss: ''
342
334
  pissed: ''
343
335
  pisser: ''
344
336
  pissers: ''
345
- ! 'pisses ': ''
337
+ pisses: ''
346
338
  pissflaps: ''
347
- ! 'pissin ': ''
339
+ pissin: ''
348
340
  pissing: ''
349
- ! 'pissoff ': ''
341
+ pissoff: ''
350
342
  poop: ''
351
343
  porn: ''
352
344
  porno: ''
353
345
  pornography: ''
354
346
  pornos: ''
355
347
  prick: ''
356
- ! 'pricks ': ''
348
+ pricks: ''
357
349
  pron: ''
358
350
  pube: ''
359
351
  pusse: ''
360
352
  pussi: ''
361
353
  pussies: ''
362
354
  pussy: ''
363
- ! 'pussys ': ''
355
+ pussys: ''
364
356
  rectum: ''
365
357
  retard: ''
366
358
  rimjaw: ''
367
359
  rimming: ''
368
- s hit: ''
369
360
  s.o.b.: ''
370
361
  sadist: ''
371
362
  schlong: ''
@@ -397,10 +388,10 @@ shitings: ''
397
388
  shits: ''
398
389
  shitted: ''
399
390
  shitter: ''
400
- ! 'shitters ': ''
391
+ shitters: ''
401
392
  shitting: ''
402
393
  shittings: ''
403
- ! 'shitty ': ''
394
+ shitty: ''
404
395
  skank: ''
405
396
  slut: ''
406
397
  sluts: ''
@@ -8,7 +8,7 @@ module Profane
8
8
  end
9
9
 
10
10
  def filter(phrase)
11
- new_phrase = phrase.split(' ').map do |word|
11
+ new_phrase = phrase.split(/\s/).map do |word|
12
12
  cleanse!(word)
13
13
  end
14
14
 
@@ -16,7 +16,7 @@ module Profane
16
16
  end
17
17
 
18
18
  def profane?(phrase)
19
- phrase = phrase.downcase.split(' ')
19
+ phrase = phrase.downcase.split(/\s+/)
20
20
 
21
21
  dictionary.keys.each do |key|
22
22
  return true unless phrase.grep(/(\b|\W)#{key.downcase}(\b|\W)/).empty?
@@ -1,3 +1,3 @@
1
1
  module Profane
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/profane.rb CHANGED
@@ -3,7 +3,7 @@ require 'profane/version'
3
3
  require 'profane/filter'
4
4
 
5
5
  module Profane
6
- DICTIONARY_PATH = 'config/dictionary.yml'
6
+ DICTIONARY_PATH = File.expand_path('../../config/dictionary.yml', __FILE__)
7
7
 
8
8
  def self.configure(options)
9
9
  config.merge!(options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profane
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,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-01 00:00:00.000000000 Z
12
+ date: 2013-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -93,7 +93,6 @@ files:
93
93
  - lib/profane/filter.rb
94
94
  - lib/profane/version.rb
95
95
  - profane.gemspec
96
- - profanity.txt
97
96
  - spec/profane/filter_spec.rb
98
97
  - spec/profane_spec.rb
99
98
  - spec/spec_helper.rb
data/profanity.txt DELETED
@@ -1,452 +0,0 @@
1
- 4r5e
2
- 5h1t
3
- 5hit
4
- a55
5
- anal
6
- anus
7
- ar5e
8
- arrse
9
- arse
10
- ass
11
- ass-fucker
12
- asses
13
- assfucker
14
- assfukka
15
- asshole
16
- assholes
17
- asswhole
18
- a_s_s
19
- b!tch
20
- b00bs
21
- b17ch
22
- b1tch
23
- ballbag
24
- balls
25
- ballsack
26
- bastard
27
- beastial
28
- beastiality
29
- bellend
30
- bestial
31
- bestiality
32
- bi+ch
33
- biatch
34
- bitch
35
- bitcher
36
- bitchers
37
- bitches
38
- bitchin
39
- bitching
40
- bloody
41
- blow job
42
- blowjob
43
- blowjobs
44
- boiolas
45
- bollock
46
- bollok
47
- boner
48
- boob
49
- boobs
50
- booobs
51
- boooobs
52
- booooobs
53
- boooooobs
54
- booooooobs
55
- breasts
56
- buceta
57
- bugger
58
- bum
59
- bunny fucker
60
- butt
61
- butthole
62
- buttmuch
63
- buttplug
64
- c0ck
65
- c0cksucker
66
- carpet muncher
67
- cawk
68
- chink
69
- cipa
70
- cl1t
71
- clit
72
- clitoris
73
- clits
74
- cnut
75
- cock
76
- cock-sucker
77
- cockface
78
- cockhead
79
- cockmunch
80
- cockmuncher
81
- cocks
82
- cocksuck
83
- cocksucked
84
- cocksucker
85
- cocksucking
86
- cocksucks
87
- cocksuka
88
- cocksukka
89
- cok
90
- cokmuncher
91
- coksucka
92
- coon
93
- cox
94
- crap
95
- cum
96
- cummer
97
- cumming
98
- cums
99
- cumshot
100
- cunilingus
101
- cunillingus
102
- cunnilingus
103
- cunt
104
- cuntlick
105
- cuntlicker
106
- cuntlicking
107
- cunts
108
- cyalis
109
- cyberfuc
110
- cyberfuck
111
- cyberfucked
112
- cyberfucker
113
- cyberfuckers
114
- cyberfucking
115
- d1ck
116
- damn
117
- dick
118
- dickhead
119
- dildo
120
- dildos
121
- dink
122
- dinks
123
- dirsa
124
- dlck
125
- dog-fucker
126
- doggin
127
- dogging
128
- donkeyribber
129
- doosh
130
- duche
131
- dyke
132
- ejaculate
133
- ejaculated
134
- ejaculates
135
- ejaculating
136
- ejaculatings
137
- ejaculation
138
- ejakulate
139
- f u c k
140
- f u c k e r
141
- f4nny
142
- fag
143
- fagging
144
- faggitt
145
- faggot
146
- faggs
147
- fagot
148
- fagots
149
- fags
150
- fanny
151
- fannyflaps
152
- fannyfucker
153
- fanyy
154
- fatass
155
- fcuk
156
- fcuker
157
- fcuking
158
- feck
159
- fecker
160
- felching
161
- fellate
162
- fellatio
163
- fingerfuck
164
- fingerfucked
165
- fingerfucker
166
- fingerfuckers
167
- fingerfucking
168
- fingerfucks
169
- fistfuck
170
- fistfucked
171
- fistfucker
172
- fistfuckers
173
- fistfucking
174
- fistfuckings
175
- fistfucks
176
- flange
177
- fook
178
- fooker
179
- fuck
180
- fucka
181
- fucked
182
- fucker
183
- fuckers
184
- fuckhead
185
- fuckheads
186
- fuckin
187
- fucking
188
- fuckings
189
- fuckingshitmotherfucker
190
- fuckme
191
- fucks
192
- fuckwhit
193
- fuckwit
194
- fudge packer
195
- fudgepacker
196
- fuk
197
- fuker
198
- fukker
199
- fukkin
200
- fuks
201
- fukwhit
202
- fukwit
203
- fux
204
- fux0r
205
- f_u_c_k
206
- gangbang
207
- gangbanged
208
- gangbangs
209
- gaylord
210
- gaysex
211
- goatse
212
- God
213
- god-dam
214
- god-damned
215
- goddamn
216
- goddamned
217
- hardcoresex
218
- hell
219
- heshe
220
- hoar
221
- hoare
222
- hoer
223
- homo
224
- hore
225
- horniest
226
- horny
227
- hotsex
228
- jack-off
229
- jackoff
230
- jap
231
- jerk-off
232
- jism
233
- jiz
234
- jizm
235
- jizz
236
- kawk
237
- knob
238
- knobead
239
- knobed
240
- knobend
241
- knobhead
242
- knobjocky
243
- knobjokey
244
- kock
245
- kondum
246
- kondums
247
- kum
248
- kummer
249
- kumming
250
- kums
251
- kunilingus
252
- l3i+ch
253
- l3itch
254
- labia
255
- lmfao
256
- lust
257
- lusting
258
- m0f0
259
- m0fo
260
- m45terbate
261
- ma5terb8
262
- ma5terbate
263
- masochist
264
- master-bate
265
- masterb8
266
- masterbat*
267
- masterbat3
268
- masterbate
269
- masterbation
270
- masterbations
271
- masturbate
272
- mo-fo
273
- mof0
274
- mofo
275
- mothafuck
276
- mothafucka
277
- mothafuckas
278
- mothafuckaz
279
- mothafucked
280
- mothafucker
281
- mothafuckers
282
- mothafuckin
283
- mothafucking
284
- mothafuckings
285
- mothafucks
286
- mother fucker
287
- motherfuck
288
- motherfucked
289
- motherfucker
290
- motherfuckers
291
- motherfuckin
292
- motherfucking
293
- motherfuckings
294
- motherfuckka
295
- motherfucks
296
- muff
297
- mutha
298
- muthafecker
299
- muthafuckker
300
- muther
301
- mutherfucker
302
- n1gga
303
- n1gger
304
- nazi
305
- nigg3r
306
- nigg4h
307
- nigga
308
- niggah
309
- niggas
310
- niggaz
311
- nigger
312
- niggers
313
- nob
314
- nob jokey
315
- nobhead
316
- nobjocky
317
- nobjokey
318
- numbnuts
319
- nutsack
320
- orgasim
321
- orgasims
322
- orgasm
323
- orgasms
324
- p0rn
325
- pawn
326
- pecker
327
- penis
328
- penisfucker
329
- phonesex
330
- phuck
331
- phuk
332
- phuked
333
- phuking
334
- phukked
335
- phukking
336
- phuks
337
- phuq
338
- pigfucker
339
- pimpis
340
- piss
341
- pissed
342
- pisser
343
- pissers
344
- pisses
345
- pissflaps
346
- pissin
347
- pissing
348
- pissoff
349
- poop
350
- porn
351
- porno
352
- pornography
353
- pornos
354
- prick
355
- pricks
356
- pron
357
- pube
358
- pusse
359
- pussi
360
- pussies
361
- pussy
362
- pussys
363
- rectum
364
- retard
365
- rimjaw
366
- rimming
367
- s hit
368
- s.o.b.
369
- sadist
370
- schlong
371
- screwing
372
- scroat
373
- scrote
374
- scrotum
375
- semen
376
- sex
377
- sh!+
378
- sh!t
379
- sh1t
380
- shag
381
- shagger
382
- shaggin
383
- shagging
384
- shemale
385
- shi+
386
- shit
387
- shitdick
388
- shite
389
- shited
390
- shitey
391
- shitfuck
392
- shitfull
393
- shithead
394
- shiting
395
- shitings
396
- shits
397
- shitted
398
- shitter
399
- shitters
400
- shitting
401
- shittings
402
- shitty
403
- skank
404
- slut
405
- sluts
406
- smegma
407
- smut
408
- snatch
409
- son-of-a-bitch
410
- spac
411
- spunk
412
- s_h_i_t
413
- t1tt1e5
414
- t1tties
415
- teets
416
- teez
417
- testical
418
- testicle
419
- tit
420
- titfuck
421
- tits
422
- titt
423
- tittie5
424
- tittiefucker
425
- titties
426
- tittyfuck
427
- tittywank
428
- titwank
429
- tosser
430
- turd
431
- tw4t
432
- twat
433
- twathead
434
- twatty
435
- twunt
436
- twunter
437
- v14gra
438
- v1gra
439
- vagina
440
- viagra
441
- vulva
442
- w00se
443
- wang
444
- wank
445
- wanker
446
- wanky
447
- whoar
448
- whore
449
- willies
450
- willy
451
- xrated
452
- xxx:1