seamusabshere-validates_decency_of 1.3 → 1.4
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.
- data/lib/is_decent.rb +1 -1
- data/validates_decency_of.gemspec +1 -1
- metadata +1 -1
data/lib/is_decent.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class String
|
2
2
|
INDECENT_WORDS = %w(shit piss fuck cunt cocksucker motherfucker tits)
|
3
3
|
def is_decent?
|
4
|
-
essence = self.downcase.gsub(/[
|
4
|
+
essence = self.downcase.gsub(/[^\.\'a-zA-Z]/, '')
|
5
5
|
INDECENT_WORDS.detect { |c| essence.include? c }.nil?
|
6
6
|
end
|
7
7
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "validates_decency_of"
|
3
|
-
s.version = "1.
|
3
|
+
s.version = "1.4"
|
4
4
|
s.date = "2009-01-02"
|
5
5
|
s.summary = "Rails plugin that uses George Carlin's list of seven dirty words (aka swear words, aka cuss words) to check for decency on ActiveRecord model attributes."
|
6
6
|
s.email = "seamus@abshere.net"
|