despamilator 1.1 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +0 -1
- data/History.txt +7 -0
- data/Manifest.txt +4 -4
- data/conf/unusual_characters.txt +6674 -0
- data/despamilator.gemspec +5 -6
- data/lib/despamilator.rb +1 -1
- data/lib/despamilator/filter/html_tags.rb +1 -1
- data/lib/despamilator/filter/naughty_words.rb +3 -3
- data/lib/despamilator/filter/unusual_characters.rb +47 -0
- data/lib/despamilator/filter/urls.rb +2 -2
- data/scripts/from_file.rb +26 -0
- data/spec/filters/html_tags_spec.rb +3 -3
- data/spec/filters/unusual_characters_spec.rb +9 -0
- data/spec/filters/urls_spec.rb +3 -3
- metadata +53 -67
- data/lib/despamilator/filter/funky_consonant.rb +0 -31
- data/lib/despamilator/filter/naughty_q.rb +0 -31
- data/spec/filters/funky_consonant_spec.rb +0 -9
- data/spec/filters/naughty_q_spec.rb +0 -11
@@ -1,9 +0,0 @@
|
|
1
|
-
describe DespamilatorFilter::FunkyConsonant do
|
2
|
-
the_name_should_be 'Funky Consonant'
|
3
|
-
the_description_should_be 'Detects and scores each occurrence of a consonant next to an unlikely character'
|
4
|
-
|
5
|
-
despamilator_should_apply_the_filter_for('zt')
|
6
|
-
|
7
|
-
a_single_match_of('zt', should_score: 0.05)
|
8
|
-
a_multiple_match_of('ztzt', should_score: [0.1, 2.times])
|
9
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
describe DespamilatorFilter::NaughtyQ do
|
2
|
-
|
3
|
-
the_name_should_be 'Naughty Q'
|
4
|
-
the_description_should_be 'Detects possible misuse of the letter Q (English language)'
|
5
|
-
|
6
|
-
despamilator_should_apply_the_filter_for('qtu')
|
7
|
-
|
8
|
-
a_single_match_of('qtu', should_score: 0.2)
|
9
|
-
a_multiple_match_of('qtq', should_score: [0.4, 2.times])
|
10
|
-
|
11
|
-
end
|