despamilator 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -22,4 +22,13 @@
22
22
 
23
23
  === 0.5 2010-08-31
24
24
 
25
- * Added Rails validation sugar (despamilator/validation).
25
+ * Added Rails validation sugar (despamilator/validation).
26
+
27
+ === 0.6 2010-08-31
28
+
29
+ * Corrected Rails validation sugar to work with Passenger!
30
+
31
+ === 0.7 2010-09-01
32
+
33
+ * Corrected typo in project home page. Big stuff.
34
+
data/despamilator.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{despamilator}
5
- s.version = "0.6"
5
+ s.version = "0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Stephen Hardisty"]
@@ -24,5 +24,14 @@ def naughty_words
24
24
  shit
25
25
  dick
26
26
  tits
27
+ sex
28
+ nude
29
+ dicks
30
+ shemales
31
+ dildo
32
+ porn
33
+ cock
34
+ pussy
35
+ clit
27
36
  }
28
37
  end
@@ -7,5 +7,5 @@ def description
7
7
  end
8
8
 
9
9
  def parse
10
- self.append_score = 0.15 * self.text.downcase.scan(/http:\/\//).length
10
+ self.append_score = 0.20 * self.text.downcase.scan(/http:\/\//).length
11
11
  end
data/lib/despamilator.rb CHANGED
@@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
3
3
  require 'despamilator/filter'
4
4
 
5
5
  class Despamilator
6
- VERSION = "0.7"
6
+ VERSION = "0.8"
7
7
 
8
8
  def initialize text
9
9
  @filters = Despamilator::Filter.new text
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper.rb'
3
3
  describe "Url" do
4
4
  it "should return a score for 1 url" do
5
5
  dspam = Despamilator.new('http://www.blah.com')
6
- dspam.score.should == 0.15
6
+ dspam.score.should == 0.2
7
7
  end
8
8
 
9
9
  describe 'attributes' do
@@ -28,12 +28,12 @@ describe "Url" do
28
28
  end
29
29
 
30
30
  it "should have a score" do
31
- @filter.score.should == 0.15
31
+ @filter.score.should == 0.2
32
32
  end
33
33
  end
34
34
 
35
35
  it "should score more for 2 misplaced urls" do
36
36
  dspam = Despamilator.new('http://www.blah.com http://www.poop.com')
37
- dspam.score.to_s.should == 0.3.to_s
37
+ dspam.score.to_s.should == 0.4.to_s
38
38
  end
39
39
  end
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 7
8
- version: "0.7"
7
+ - 8
8
+ version: "0.8"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Stephen Hardisty
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2010-09-01 00:00:00 +10:00
16
+ date: 2010-09-25 00:00:00 +10:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency