spamham 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,6 @@ class SpamHam
20
20
  @config[:link_weight] ||= 10
21
21
  @config[:link_multiple] ||= 1.1
22
22
  @config[:multiple_link_style_weight] ||= 20
23
- @config[:link_styles] ||= [/<a href="(.*?)">(.*?)<\/a>/,/\[url=(.*?)\](.*?)\[\/url\]/]
23
+ @config[:link_styles] ||= [/<a href="(.*?)">(.*?)<\/a>/,/\[url=(.*?)\](.*?)\[\/url\]/,/<a href=(.*?)>(.*?)<\/a>/]
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  class SpamHam
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -12,7 +12,9 @@ class SpamHam
12
12
  "valium",
13
13
  "ambien",
14
14
  "dosage",
15
- "propecia"
15
+ "propecia",
16
+ "download",
17
+ "sex"
16
18
  ] + (@config[:additional_words] || [])
17
19
  end
18
20
  end
data/spec/spamham_spec.rb CHANGED
@@ -12,6 +12,10 @@ describe SpamHam, "#spam?" do
12
12
  it "Should return true for \"ixxdzakarvtstdldkpxt, [url=http://www.amosboergoats.com/]Buy Cialis[/url], hgOvsFa.\"" do
13
13
  ham = SpamHam.new.spam?("ixxdzakarvtstdldkpxt, [url=http://www.amosboergoats.com/]Buy Cialis[/url], hgOvsFa.").should == true
14
14
  end
15
+
16
+ it "Should return true for a sample comment" do
17
+ ham = SpamHam.new.spam?("Superman/Batman Apocalypse review film where to download Superman/Batman Apocalypse <a href=http://connections.blackboard.com/people/3bb5b7ebfe>Superman/Batman Apocalypse wiki </a> download dvd Superman/Batman Apocalypse download Superman/Batman Apocalypse divx http://connections.blackboard.com/people/3bb5b7ebfe download The Confidant film The Confidant movie actors <a href=http://connections.blackboard.com/people/6289e3efc2>the The Confidant film </a> watch The Confidant online The Confidant hdtv http://connections.blackboard.com/people/6289e3efc2").should == true
18
+ end
15
19
  end
16
20
 
17
21
  describe SpamHam, "#weight" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spamham
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam "Arcath" Laycock
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-23 00:00:00 +00:00
18
+ date: 2011-01-10 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21