swearjar 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cfbc2f8e57099d5a6b9a4c60961977e8bfb542d3
4
- data.tar.gz: d176f8879508172566f2582bf29a5d0d6c47d27d
3
+ metadata.gz: 06e8b4c0aa0aca12c78a8778c8ac57c213545cf0
4
+ data.tar.gz: 8d06dec249b06373d412ee1979c146e8427dcf34
5
5
  SHA512:
6
- metadata.gz: 2980ee653f0b552d3e822b991041fd91d5e1ae494d9e2823109e67c927b0dbe53ae0e2192397bd5fed38684d78af07c4713f2271a2ebc93cd0538dfe07aa40be
7
- data.tar.gz: 4116470e1e7cdb71c5958888833306e20196cbc6f11ddc7e4219a8ebecb7fe8b0375feb50ede7fcdd03635e588002a401de414ca73d64a8cc661a36100639fd2
6
+ metadata.gz: 85f4a2f457eecca68211adc221f9af3f812e0978dda237a0f3d59a05100b20fa2f8a1c89303a1c492f780a7ce99d820ef53323330f19f0f55c196f1e6e87252c
7
+ data.tar.gz: b082a8512c0f8307c1fd7f14ad60ba494f1d353b80168898e448ec75d8b70d78cc5c6ab9a2907cd14956f4a6918f6fdfd770a49a2ccc71c8af47fa0eedd04617
@@ -280,22 +280,45 @@ simple:
280
280
  "scrote": ["sexual"]
281
281
  "shit": ["sexual", "inappropriate"]
282
282
  "shitass": ["insult"]
283
+ "shit-ass": ["insult"]
283
284
  "shitbag": ["insult"]
285
+ "shit-bag": ["insult"]
284
286
  "shitbagger": ["insult"]
287
+ "shit-bagger": ["insult"]
285
288
  "shitbrain": ["insult"]
289
+ "shit-brain": ["insult"]
286
290
  "shitbreath": ["insult"]
291
+ "shit-breath": ["insult"]
287
292
  "shitcunt": ["insult"]
293
+ "shit-cunt": ["insult"]
288
294
  "shitdick": ["insult"]
295
+ "shit-dick": ["insult"]
296
+ "shiteating": ["inappropriate"]
297
+ "shit-eating": ["inappropriate"]
289
298
  "shited": ["sexual"]
290
299
  "shitface": ["insult"]
291
- "shitfaced": ["inappropriate", "insult"]
292
- "shitfull": ["sexual"]
300
+ "shit-face": ["insult"]
301
+ "shitfaced": ["inappropriate"]
302
+ "shit-faced": ["inappropriate"]
303
+ "shitfit": ["inappropriate"]
304
+ "shit-fit": ["inappropriate"]
293
305
  "shithead": ["insult"]
306
+ "shit-head": ["insult"]
307
+ "shitheel": ["inappropriate"]
308
+ "shit-heel": ["inappropriate"]
294
309
  "shithole": ["insult"]
310
+ "shit-hole": ["insult"]
295
311
  "shithouse": ["inappropriate"]
312
+ "shit-house": ["inappropriate"]
313
+ "shitload": ["inappropriate"]
314
+ "shit-load": ["inappropriate"]
315
+ "shitpot": ["inappropriate"]
316
+ "shit-pot": ["inappropriate"]
296
317
  "shiting": ["sexual"]
297
318
  "shitspitter": ["sexual"]
298
- "shitstain": ["inappropriate", "insult"]
319
+ "shit-spitter": ["sexual"]
320
+ "shitstain": ["insult"]
321
+ "shit-stain": ["insult"]
299
322
  "shitted": ["sexual"]
300
323
  "shitter": ["sexual"]
301
324
  "shittiest": ["inappropriate"]
@@ -319,6 +342,7 @@ simple:
319
342
  "testicle": ["sexual"]
320
343
  "thundercunt": ["insult"]
321
344
  "tit": ["sexual"]
345
+ "turd": ["inappropriate"]
322
346
  "twat": ["sexual"]
323
347
  "twatlips": ["insult"]
324
348
  "twatwaffle": ["discriminatory"]
@@ -17,14 +17,14 @@ class Swearjar
17
17
 
18
18
  def profane?(string)
19
19
  string = string.to_s
20
- scan(string) {|_word, test| return true if test }
20
+ scan(string) {|test| return true if test }
21
21
  false
22
22
  end
23
23
 
24
24
  def scorecard(string)
25
25
  string = string.to_s
26
26
  scorecard = {}
27
- scan(string) do |_word, test|
27
+ scan(string) do |test|
28
28
  next unless test
29
29
  test.each do |type|
30
30
  scorecard[type] = 0 unless scorecard.key?(type)
@@ -36,10 +36,10 @@ class Swearjar
36
36
 
37
37
  def censor(string)
38
38
  censored_string = string.to_s.dup
39
- scan(string) do |word, test|
39
+ scan(string) do |test, word, position|
40
40
  next unless test
41
41
  replacement = block_given? ? yield(word) : word.gsub(/\S/, '*')
42
- censored_string.gsub!(word, replacement)
42
+ censored_string[position, word.size] = replacement
43
43
  end
44
44
  censored_string
45
45
  end
@@ -70,19 +70,22 @@ class Swearjar
70
70
 
71
71
  def scan(string, &block)
72
72
  string.scan(WORD_REGEX) do |word|
73
- block.call(word,
74
- @hash[word.downcase] ||
75
- @hash[word.downcase.gsub(/s\z/,'')] ||
76
- @hash[word.downcase.gsub(/es\z/,'')])
73
+ position = Regexp.last_match.offset(0)[0]
74
+ test = @hash[word.downcase] ||
75
+ @hash[word.downcase.sub(/s\z/,'')] ||
76
+ @hash[word.downcase.sub(/es\z/,'')]
77
+ block.call(test, word, position)
77
78
  end
78
79
 
79
80
  string.scan(EMOJI_REGEX) do |emoji_char|
80
- block.call(emoji_char, @hash[emoji_char])
81
+ position = Regexp.last_match.offset(0)[0]
82
+ block.call(@hash[emoji_char], emoji_char, position)
81
83
  end
82
84
 
83
85
  @regexs.each do |regex, type|
84
86
  string.scan(regex) do |word|
85
- block.call(word, type)
87
+ position = Regexp.last_match.offset(0)[0]
88
+ block.call(type, word, position)
86
89
  end
87
90
  end
88
91
  end
@@ -1,3 +1,3 @@
1
1
  class Swearjar
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe Swearjar do
4
+ def original_text
5
+ File.open(File.expand_path("../data/carlin_dirty_words.txt", __FILE__)).read
6
+ end
7
+
8
+ def expected_censored_text
9
+ File.open(File.expand_path("../data/carlin_dirty_words_censored.txt", __FILE__)).read
10
+ end
11
+
12
+ it "censors George Carlin's Seven Dirty Words routine" do
13
+ censored_text = Swearjar.default.censor(original_text)
14
+ expect(censored_text).to eq(expected_censored_text)
15
+ end
16
+ end
@@ -0,0 +1,128 @@
1
+ Aruba-du, ruba-tu, ruba-tu. I was thinking about the curse words and the swear
2
+ words, the cuss words and the words that you can't say, that you're not
3
+ supposed to say all the time, ['cause] words or people into words want to hear
4
+ your words. Some guys like to record your words and sell them back to you if
5
+ they can, (laughter) listen in on the telephone, write down what words you say.
6
+ A guy who used to be in Washington knew that his phone was tapped, used to
7
+ answer, Fuck Hoover, yes, go ahead. (laughter) Okay, I was thinking one night
8
+ about the words you couldn't say on the public, ah, airwaves, um, the ones you
9
+ definitely wouldn't say, ever, [']cause I heard a lady say bitch one night on
10
+ television, and it was cool like she was talking about, you know, ah, well, the
11
+ bitch is the first one to notice that in the litter Johnie right (murmur)
12
+ Right. And, uh, bastard you can say, and hell and damn so I have to figure out
13
+ which ones you couldn't and ever and it came down to seven but the list is open
14
+ to amendment, and in fact, has been changed, uh, by now, ha, a lot of people
15
+ pointed things out to me, and I noticed some myself. The original seven words
16
+ were, shit, piss, fuck, cunt, cocksucker, motherfucker, and tits. Those are the
17
+ ones that will curve your spine, grow hair on your hands and (laughter) maybe,
18
+ even bring us, God help us, peace without honor (laughter) um, and a bourbon.
19
+ (laughter) And now the first thing that we noticed was that word fuck was
20
+ really repeated in there because the word motherfucker is a compound word and
21
+ it's another form of the word fuck. (laughter) You want to be a purist it
22
+ doesn't really -- it can't be on the list of basic words. Also, cocksucker is a
23
+ compound word and neither half of that is really dirty. The word -- the half
24
+ sucker that's merely suggestive (laughter) and the word cock is a half-way
25
+ dirty word, 50% dirty -- dirty half the time, depending on what you mean by it.
26
+ (laughter) Uh, remember when you first heard it, like in 6th grade, you used to
27
+ giggle. And the cock crowed three times, heh (laughter) the cock -- three
28
+ times. It's in the Bible, cock in the Bible. (laughter) And the first time you
29
+ heard about a cock-fight, remember -- What? Huh? naw. It ain't that, are you
30
+ stupid? man. (laughter, clapping) It's chickens, you know, (laughter) Then you
31
+ have the four letter words from the old Anglo-Saxon fame. Uh, shit and fuck.
32
+ The word shit, uh, is an interesting kind of word in that the middle class has
33
+ never really accepted it and approved it. They use it like, crazy but it's not
34
+ really okay. It's still a rude, dirty, old kind of gushy word. (laughter) They
35
+ don't like that, but they say it, like, they say it like, a lady now in a
36
+ middle-class home, you'll hear most of the time she says it as an expletive,
37
+ you know, it's out of her mouth before she knows. She says, Oh shit oh shit,
38
+ (laughter) oh shit. If she drops something, Oh, the shit hurt the broccoli.
39
+ Shit. Thank you. (footsteps fading away) (papers ruffling)
40
+
41
+ Read it! (from audience)
42
+
43
+ Shit! (laughter) I won the Grammy, man, for the comedy album. Isn't that
44
+ groovy? (clapping, whistling) (murmur) That's true. Thank you. Thank you man.
45
+ Yeah. (murmur) (continuous clapping) Thank you man. Thank you. Thank you very
46
+ much, man. Thank, no, (end of continuous clapping) for that and for the Grammy,
47
+ man, [']cause (laughter) that's based on people liking it man, yeh, that's ah,
48
+ that's okay man. (laughter) Let's let that go, man. I got my Grammy. I can let
49
+ my hair hang down now, shit. (laughter) Ha! So! Now the word shit is okay for
50
+ the man. At work you can say it like crazy. Mostly figuratively, Get that shit
51
+ out of here, will ya? I don't want to see that shit anymore. I can't cut that
52
+ shit, buddy. I've had that shit up to here. I think you're full of shit myself.
53
+ (laughter) He don't know shit from Shinola. (laughter) you know that?
54
+ (laughter) Always wondered how the Shinola people feel about that (laughter)
55
+ Hi, I'm the new man from Shinola. (laughter) Hi, how are ya? Nice to see ya.
56
+ (laughter) How are ya? (laughter) Boy, I don't know whether to shit or wind my
57
+ watch. (laughter) Guess, I'll shit on my watch. (laughter) Oh, the shit is
58
+ going to hit de fan. (laughter) Built like a brick shit-house. (laughter) Up,
59
+ he's up shit's creek. (laughter) He's had it. (laughter) He hit me, I'm sorry.
60
+ (laughter) Hot shit, holy shit, tough shit, eat shit, (laughter) shit-eating
61
+ grin. Uh, whoever thought of that was ill. (murmur laughter) He had a
62
+ shit-eating grin! He had a what? (laughter) Shit on a stick. (laughter) Shit in
63
+ a handbag. I always like that. He ain't worth shit in a handbag. (laughter)
64
+ Shitty. He acted real shitty. (laughter) You know what I mean? (laughter) I got
65
+ the money back, but a real shitty attitude. Heh, he had a shit-fit. (laughter)
66
+ Wow! Shit-fit. Whew! Glad I wasn't there. (murmur, laughter) All the animals --
67
+ Bull shit, horse shit, cow shit, rat shit, bat shit. (laughter) First time I
68
+ heard bat shit, I really came apart. A guy in Oklahoma, Boggs, said it, man.
69
+ Aw! Bat shit. (laughter) Vera reminded me of that last night, ah (murmur).
70
+ Snake shit, slicker than owl shit. (laughter) Get your shit together. Shit or
71
+ get off the pot. (laughter) I got a shit-load full of them. (laughter) I got a
72
+ shit-pot full, all right. Shit-head, shit-heel, shit in your heart, shit for
73
+ brains, (laughter) shit-face, heh (laughter) I always try to think how that
74
+ could have originated; the first guy that said that. Somebody got drunk and
75
+ fell in some shit, you know. (laughter) Hey, I'm shit-face. (laughter)
76
+ Shitface, today. (laughter) Anyway, enough of that shit. (laughter) The big
77
+ one, the word fuck that's the one that hangs them up the most. [']Cause in a
78
+ lot of cases that's the very act that hangs them up the most. So, it's natural
79
+ that the word would, uh, have the same effect. It's a great word, fuck, nice
80
+ word, easy word, cute word, kind of. Easy word to say. One syllable, short u.
81
+ (laughter) Fuck. (Murmur) You know, it's easy. Starts with a nice soft sound
82
+ fuh ends with a kuh. Right? (laughter) A little something for everyone. Fuck
83
+ (laughter) Good word. Kind of a proud word, too. Who are you? I am FUCK.
84
+ (laughter) FUCK OF THE MOUNTAIN. (laughter) Tune in again next week to FUCK OF
85
+ THE MOUNTAIN. (laughter) It's an interesting word too, [']cause it's got a
86
+ double kind of a life -- personality -- dual, you know, whatever the right
87
+ phrase is. It leads a double life, the word fuck. First of all, it means,
88
+ sometimes, most of the time, fuck. What does it mean? It means to make love.
89
+ Right? We're going to make love, yeh, we're going to fuck, yeh, we're going to
90
+ fuck, yeh, we're going to make love. (laughter) we're really going to fuck,
91
+ yeah, we're going to make love. Right? And it also means the beginning of life,
92
+ it's the act that begins life, so there's the word hanging around with words
93
+ like love, and life, and yet on the other hand, it's also a word that we really
94
+ use to hurt each other with, man. It's a heavy. It's one that you have toward
95
+ the end of the argument. (laughter) Right? (laughter) You finally can't make
96
+ out. Oh, fuck you man. I said, fuck you. (laughter, murmur) Stupid fuck.
97
+ (laughter) Fuck you and everybody that looks like you. (laughter) man. It would
98
+ be nice to change the movies that we already have and substitute the word fuck
99
+ for the word kill, wherever we could, and some of those movie cliches would
100
+ change a little bit. Madfuckers still on the loose. Stop me before I fuck
101
+ again. Fuck the ump, fuck the ump, fuck the ump, fuck the ump, fuck the ump.
102
+ Easy on the clutch Bill, you'll fuck that engine again. (laughter) The other
103
+ shit one was, I don't give a shit. Like it's worth something, you know?
104
+ (laughter) I don't give a shit. Hey, well, I don't take no shit, (laughter) you
105
+ know what I mean? You know why I don't take no shit? (laughter) [']Cause I
106
+ don't give a shit. (laughter) If I give a shit, I would have to pack shit.
107
+ (laughter) But I don't pack no shit cause I don't give a shit. (laughter) You
108
+ wouldn't shit me, would you? (laughter) That's a joke when you're a kid with a
109
+ worm looking out the bird's ass. You wouldn't shit me, would you? (laughter)
110
+ It's an eight-year-old joke but a good one. (laughter) The additions to the
111
+ list. I found three more words that had to be put on the list of words you
112
+ could never say on television, and they were fart, turd and twat, those three.
113
+ (laughter) Fart, we talked about, it's harmless It's like tits, it's a cutie
114
+ word, no problem. Turd, you can't say but who wants to, you know? (laughter)
115
+ The subject never comes up on the panel so I'm not worried about that one. Now
116
+ the word twat is an interesting word. Twat! Yeh, right in the twat. (laughter)
117
+ Twat is an interesting word because it's the only one I know of, the only slang
118
+ word applying to the, a part of the sexual anatomy that doesn't have another
119
+ meaning to it. Like, ah, snatch, box and pussy all have other meanings, man.
120
+ Even in a Walt Disney movie, you can say, We're going to snatch that pussy and
121
+ put him in a box and bring him on the airplane. (murmur, laughter) Everybody
122
+ loves it. The twat stands alone, man, as it should. And two-way words. Ah, ass
123
+ is okay providing you're riding into town on a religious feast day. (laughter)
124
+ You can't say, up your ass. (laughter) You can say, stuff it! (murmur) There
125
+ are certain things you can say its weird but you can just come so close. Before
126
+ I cut, I, uh, want to, ah, thank you for listening to my words, man, fellow, uh
127
+ space travelers. Thank you man for tonight and thank you also. (clapping
128
+ whistling)
@@ -0,0 +1,128 @@
1
+ Aruba-du, ruba-tu, ruba-tu. I was thinking about the curse words and the swear
2
+ words, the cuss words and the words that you can't say, that you're not
3
+ supposed to say all the time, ['cause] words or people into words want to hear
4
+ your words. Some guys like to record your words and sell them back to you if
5
+ they can, (laughter) listen in on the telephone, write down what words you say.
6
+ A guy who used to be in Washington knew that his phone was tapped, used to
7
+ answer, **** Hoover, yes, go ahead. (laughter) Okay, I was thinking one night
8
+ about the words you couldn't say on the public, ah, airwaves, um, the ones you
9
+ definitely wouldn't say, ever, [']cause I heard a lady say ***** one night on
10
+ television, and it was cool like she was talking about, you know, ah, well, the
11
+ ***** is the first one to notice that in the litter Johnie right (murmur)
12
+ Right. And, uh, ******* you can say, and **** and **** so I have to figure out
13
+ which ones you couldn't and ever and it came down to seven but the list is open
14
+ to amendment, and in fact, has been changed, uh, by now, ha, a lot of people
15
+ pointed things out to me, and I noticed some myself. The original seven words
16
+ were, ****, ****, ****, ****, **********, ************, and ****. Those are the
17
+ ones that will curve your spine, grow hair on your hands and (laughter) maybe,
18
+ even bring us, God help us, peace without honor (laughter) um, and a bourbon.
19
+ (laughter) And now the first thing that we noticed was that word **** was
20
+ really repeated in there because the word ************ is a compound word and
21
+ it's another form of the word ****. (laughter) You want to be a purist it
22
+ doesn't really -- it can't be on the list of basic words. Also, ********** is a
23
+ compound word and neither half of that is really dirty. The word -- the half
24
+ sucker that's merely suggestive (laughter) and the word **** is a half-way
25
+ dirty word, 50% dirty -- dirty half the time, depending on what you mean by it.
26
+ (laughter) Uh, remember when you first heard it, like in 6th grade, you used to
27
+ giggle. And the **** crowed three times, heh (laughter) the **** -- three
28
+ times. It's in the Bible, **** in the Bible. (laughter) And the first time you
29
+ heard about a cock-fight, remember -- What? Huh? naw. It ain't that, are you
30
+ stupid? man. (laughter, clapping) It's chickens, you know, (laughter) Then you
31
+ have the four letter words from the old Anglo-Saxon fame. Uh, **** and ****.
32
+ The word ****, uh, is an interesting kind of word in that the middle class has
33
+ never really accepted it and approved it. They use it like, crazy but it's not
34
+ really okay. It's still a rude, dirty, old kind of gushy word. (laughter) They
35
+ don't like that, but they say it, like, they say it like, a lady now in a
36
+ middle-class home, you'll hear most of the time she says it as an expletive,
37
+ you know, it's out of her mouth before she knows. She says, Oh **** oh ****,
38
+ (laughter) oh ****. If she drops something, Oh, the **** hurt the broccoli.
39
+ ****. Thank you. (footsteps fading away) (papers ruffling)
40
+
41
+ Read it! (from audience)
42
+
43
+ ****! (laughter) I won the Grammy, man, for the comedy album. Isn't that
44
+ groovy? (clapping, whistling) (murmur) That's true. Thank you. Thank you man.
45
+ Yeah. (murmur) (continuous clapping) Thank you man. Thank you. Thank you very
46
+ much, man. Thank, no, (end of continuous clapping) for that and for the Grammy,
47
+ man, [']cause (laughter) that's based on people liking it man, yeh, that's ah,
48
+ that's okay man. (laughter) Let's let that go, man. I got my Grammy. I can let
49
+ my hair hang down now, ****. (laughter) Ha! So! Now the word **** is okay for
50
+ the man. At work you can say it like crazy. Mostly figuratively, Get that ****
51
+ out of here, will ya? I don't want to see that **** anymore. I can't cut that
52
+ ****, buddy. I've had that **** up to here. I think you're full of **** myself.
53
+ (laughter) He don't know **** from Shinola. (laughter) you know that?
54
+ (laughter) Always wondered how the Shinola people feel about that (laughter)
55
+ Hi, I'm the new man from Shinola. (laughter) Hi, how are ya? Nice to see ya.
56
+ (laughter) How are ya? (laughter) Boy, I don't know whether to **** or wind my
57
+ watch. (laughter) Guess, I'll **** on my watch. (laughter) Oh, the **** is
58
+ going to hit de fan. (laughter) Built like a brick **********. (laughter) Up,
59
+ he's up ****'s creek. (laughter) He's had it. (laughter) He hit me, I'm sorry.
60
+ (laughter) Hot ****, holy ****, tough ****, eat ****, (laughter) ***********
61
+ grin. Uh, whoever thought of that was ill. (murmur laughter) He had a
62
+ *********** grin! He had a what? (laughter) **** on a stick. (laughter) **** in
63
+ a handbag. I always like that. He ain't worth **** in a handbag. (laughter)
64
+ ******. He acted real ******. (laughter) You know what I mean? (laughter) I got
65
+ the money back, but a real ****** attitude. Heh, he had a ********. (laughter)
66
+ Wow! ********. Whew! Glad I wasn't there. (murmur, laughter) All the animals --
67
+ Bull ****, horse ****, cow ****, rat ****, bat ****. (laughter) First time I
68
+ heard bat ****, I really came apart. A guy in Oklahoma, Boggs, said it, man.
69
+ Aw! Bat ****. (laughter) Vera reminded me of that last night, ah (murmur).
70
+ Snake ****, slicker than owl ****. (laughter) Get your **** together. **** or
71
+ get off the pot. (laughter) I got a ********* full of them. (laughter) I got a
72
+ ******** full, all right. *********, *********, **** in your heart, **** for
73
+ brains, (laughter) *********, heh (laughter) I always try to think how that
74
+ could have originated; the first guy that said that. Somebody got drunk and
75
+ fell in some ****, you know. (laughter) Hey, I'm *********. (laughter)
76
+ ********, today. (laughter) Anyway, enough of that ****. (laughter) The big
77
+ one, the word **** that's the one that hangs them up the most. [']Cause in a
78
+ lot of cases that's the very act that hangs them up the most. So, it's natural
79
+ that the word would, uh, have the same effect. It's a great word, ****, nice
80
+ word, easy word, cute word, kind of. Easy word to say. One syllable, short u.
81
+ (laughter) ****. (Murmur) You know, it's easy. Starts with a nice soft sound
82
+ fuh ends with a kuh. Right? (laughter) A little something for everyone. ****
83
+ (laughter) Good word. Kind of a proud word, too. Who are you? I am ****.
84
+ (laughter) **** OF THE MOUNTAIN. (laughter) Tune in again next week to **** OF
85
+ THE MOUNTAIN. (laughter) It's an interesting word too, [']cause it's got a
86
+ double kind of a life -- personality -- dual, you know, whatever the right
87
+ phrase is. It leads a double life, the word ****. First of all, it means,
88
+ sometimes, most of the time, ****. What does it mean? It means to make love.
89
+ Right? We're going to make love, yeh, we're going to ****, yeh, we're going to
90
+ ****, yeh, we're going to make love. (laughter) we're really going to ****,
91
+ yeah, we're going to make love. Right? And it also means the beginning of life,
92
+ it's the act that begins life, so there's the word hanging around with words
93
+ like love, and life, and yet on the other hand, it's also a word that we really
94
+ use to hurt each other with, man. It's a heavy. It's one that you have toward
95
+ the end of the argument. (laughter) Right? (laughter) You finally can't make
96
+ out. Oh, **** you man. I said, **** you. (laughter, murmur) Stupid ****.
97
+ (laughter) **** you and everybody that looks like you. (laughter) man. It would
98
+ be nice to change the movies that we already have and substitute the word ****
99
+ for the word kill, wherever we could, and some of those movie cliches would
100
+ change a little bit. ********** still on the loose. Stop me before I ****
101
+ again. **** the ump, **** the ump, **** the ump, **** the ump, **** the ump.
102
+ Easy on the clutch Bill, you'll **** that engine again. (laughter) The other
103
+ **** one was, I don't give a ****. Like it's worth something, you know?
104
+ (laughter) I don't give a ****. Hey, well, I don't take no ****, (laughter) you
105
+ know what I mean? You know why I don't take no ****? (laughter) [']Cause I
106
+ don't give a ****. (laughter) If I give a ****, I would have to pack ****.
107
+ (laughter) But I don't pack no **** cause I don't give a ****. (laughter) You
108
+ wouldn't **** me, would you? (laughter) That's a joke when you're a kid with a
109
+ worm looking out the bird's ***. You wouldn't **** me, would you? (laughter)
110
+ It's an eight-year-old joke but a good one. (laughter) The additions to the
111
+ list. I found three more words that had to be put on the list of words you
112
+ could never say on television, and they were ****, **** and ****, those three.
113
+ (laughter) ****, we talked about, it's harmless It's like ****, it's a cutie
114
+ word, no problem. ****, you can't say but who wants to, you know? (laughter)
115
+ The subject never comes up on the panel so I'm not worried about that one. Now
116
+ the word **** is an interesting word. ****! Yeh, right in the ****. (laughter)
117
+ **** is an interesting word because it's the only one I know of, the only slang
118
+ word applying to the, a part of the sexual anatomy that doesn't have another
119
+ meaning to it. Like, ah, ******, box and ***** all have other meanings, man.
120
+ Even in a Walt Disney movie, you can say, We're going to ****** that ***** and
121
+ put him in a box and bring him on the airplane. (murmur, laughter) Everybody
122
+ loves it. The **** stands alone, man, as it should. And two-way words. Ah, ***
123
+ is okay providing you're riding into town on a religious feast day. (laughter)
124
+ You can't say, up your ***. (laughter) You can say, stuff it! (murmur) There
125
+ are certain things you can say its weird but you can just come so close. Before
126
+ I cut, I, uh, want to, ah, thank you for listening to my words, man, fellow, uh
127
+ space travelers. Thank you man for tonight and thank you also. (clapping
128
+ whistling)
@@ -81,7 +81,11 @@ describe Swearjar do
81
81
  expect(Swearjar.default.scorecard("foonIgg3rbar foo nigger")).to eq({"discriminatory" => 2})
82
82
  end
83
83
 
84
- xit "doesn't substitute simple words when they occur later as substrings" do
84
+ it "substitutes multiple occurrences of a word" do
85
+ expect(Swearjar.default.censor("anus anus anuses")).to eq("**** **** ******")
86
+ end
87
+
88
+ it "doesn't substitute simple words when they occur later as substrings" do
85
89
  expect(Swearjar.default.censor("anus janus")).to eq("**** janus")
86
90
  end
87
91
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swearjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Hull
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-14 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -69,6 +69,9 @@ files:
69
69
  - lib/config/en.yml
70
70
  - lib/swearjar.rb
71
71
  - lib/swearjar/version.rb
72
+ - spec/acceptance_spec.rb
73
+ - spec/data/carlin_dirty_words.txt
74
+ - spec/data/carlin_dirty_words_censored.txt
72
75
  - spec/data/swear.yml
73
76
  - spec/spec_helper.rb
74
77
  - spec/swearjar_spec.rb
@@ -99,6 +102,9 @@ specification_version: 4
99
102
  summary: Put another nickel in the swearjar. Simple profanity detection with content
100
103
  analysis
101
104
  test_files:
105
+ - spec/acceptance_spec.rb
106
+ - spec/data/carlin_dirty_words.txt
107
+ - spec/data/carlin_dirty_words_censored.txt
102
108
  - spec/data/swear.yml
103
109
  - spec/spec_helper.rb
104
110
  - spec/swearjar_spec.rb