rude 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +14 -1
  2. data/lib/rude.rb +10 -9
  3. data/lib/rude/version.rb +1 -1
  4. metadata +1 -1
data/README.md CHANGED
@@ -16,7 +16,20 @@ Or install it yourself as:
16
16
 
17
17
  ## Usage
18
18
 
19
-
19
+ To check if a string contains a rude word you can call:
20
+ ```ruby
21
+ "Hello is the fucking rude".rude?
22
+ => true
23
+ ```
24
+ If you have some see if a word/string is rude you can call:
25
+ ```ruby
26
+ Rude.is?('Hello is the fucking rude')
27
+ => true
28
+ ```
29
+ To see all the words that are classed as being rude:
30
+ ```ruby
31
+ Rude::DEFAULT_RUDE_WORDS
32
+ ```
20
33
 
21
34
  ## Contributing
22
35
 
data/lib/rude.rb CHANGED
@@ -1,14 +1,5 @@
1
1
  require "rude/version"
2
2
 
3
- DEFAULT_RUDE_WORDS = [
4
- "anal", "anus", "arse", "ass", "ballsack", "balls", "bastard", "bitch", "biatch", "bloody", "blowjob", "blow job", "bollock",
5
- "bollok", "boner", "boob", "bugger", "bum", "butt", "buttplug", "clitoris", "cock", "coon", "crap", "cunt", "damn", "dick",
6
- "dildo", "dyke", "fag", "feck", "fellate", "fellatio", "felching", "fuck", "f u c k", "fudgepacker", "fudge packer", "flange",
7
- "Goddamn", "God damn", "hell", "homo", "jerk", "jizz", "knobend", "knob end", "labia", "lmao", "lmfao", "muff", "nigger",
8
- "nigga", "omg", "penis", "piss", "poop", "prick", "pube", "pussy", "queer", "scrotum", "sex", "shit", "s hit", "sh1t", "slut",
9
- "smegma", "spunk", "tit", "tosser", "turd", "twat", "vagina", "wank", "whore", "wtf"
10
- ]
11
-
12
3
  class String
13
4
  def rude?
14
5
  Rude.is?(self)
@@ -17,6 +8,16 @@ end
17
8
 
18
9
 
19
10
  module Rude
11
+
12
+ DEFAULT_RUDE_WORDS = [
13
+ "anal", "anus", "arse", "ass", "ballsack", "balls", "bastard", "bitch", "biatch", "bloody", "blowjob", "blow job", "bollock",
14
+ "bollok", "boner", "boob", "bugger", "bum", "butt", "buttplug", "clitoris", "cock", "coon", "crap", "cunt", "damn", "dick",
15
+ "dildo", "dyke", "fag", "feck", "fellate", "fellatio", "felching", "fuck", "f u c k", "fudgepacker", "fudge packer", "flange",
16
+ "Goddamn", "God damn", "hell", "homo", "jerk", "jizz", "knobend", "knob end", "labia", "lmao", "lmfao", "muff", "nigger",
17
+ "nigga", "omg", "penis", "piss", "poop", "prick", "pube", "pussy", "queer", "scrotum", "sex", "shit", "s hit", "sh1t", "slut",
18
+ "smegma", "spunk", "tit", "tosser", "turd", "twat", "vagina", "wank", "whore", "wtf"
19
+ ]
20
+
20
21
  def self.is?(text)
21
22
  text.split(' ').each do |t|
22
23
  if DEFAULT_RUDE_WORDS.member?(t.downcase)
data/lib/rude/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rude
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rude
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: