spamham 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/spamham/configure.rb +1 -1
- data/lib/spamham/version.rb +1 -1
- data/lib/spamham/wordlist.rb +3 -1
- data/spec/spamham_spec.rb +4 -0
- metadata +4 -4
data/lib/spamham/configure.rb
CHANGED
@@ -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
|
data/lib/spamham/version.rb
CHANGED
data/lib/spamham/wordlist.rb
CHANGED
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
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:
|
18
|
+
date: 2011-01-10 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|