<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -32,7 +32,7 @@ Recommended serving directions:
     end
     
     comment = Comment.new :body =&gt; &quot;This is spam!!!1&quot;
-    comment.spam? # =&gt; false
+    comment.splam? # =&gt; false
     comment.splam_score # =&gt; 2
     comment.splam_reasons # =&gt; []
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ module Splam
   
   module ClassMethods
     def splam; @splam; end
-    def splammable(fieldname, threshold=100)
+    def splammable(fieldname, threshold=100, conditions=nil)
       run_rules = []
       # todo: run only certain rules
       #  e.g. splammable :body, 100, [ :chinese, :html ]
@@ -26,12 +26,13 @@ module Splam
       @splam[:rules] = Splam::Rule.subclasses
       @splam[:threshold] = threshold
       @splam[:fieldname] = fieldname
+      @splam[:conditions] = conditions
     end
   end
   def splam_score; @splam_score; end
   def splam_reasons; @splam_reasons; end
   
-  def spam?
+  def splam?
     @splam_score = 0
     @splam_reasons = []
     splam = self.class.splam || raise(&quot;Splam is not initialized&quot;)
@@ -46,6 +47,6 @@ module Splam
   end
   
   def validates_as_spam
-    errors.add(@splam[:fieldname], &quot;looks like spam.&quot;) if spam?
+    errors.add(@splam[:fieldname], &quot;looks like spam.&quot;) if splam?
   end
 end
\ No newline at end of file</diff>
      <filename>lib/splam.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ class SplamTest &lt; Test::Unit::TestCase
   
   def test_runs_plugins
     f = Foo.new
-    assert ! f.spam?
+    assert ! f.splam?
     assert_equal 10, f.splam_score
   end
 
@@ -37,11 +37,11 @@ class SplamTest &lt; Test::Unit::TestCase
       else
         Foo.splam[:threshold] = 99
       end
-      comment.spam? # todo: assert
+      spam = comment.splam?
       score = comment.splam_score
       #$stderr.puts &quot;#{f} score: #{score}&quot;
       #$stderr.puts &quot;=====================&quot;
-      assert comment.spam?, &quot;Comment #{f} was not spam, score was #{score} but threshold was #{Foo.splam[:threshold]}\nReasons were #{comment.splam_reasons.inspect}&quot;
+      assert spam, &quot;Comment #{f} was not spam, score was #{score} but threshold was #{Foo.splam[:threshold]}\nReasons were #{comment.splam_reasons.inspect}&quot;
     end
   end
   
@@ -49,12 +49,12 @@ class SplamTest &lt; Test::Unit::TestCase
     comment = Foo.new
     Dir.glob(File.join(File.dirname(__FILE__), &quot;fixtures&quot;, &quot;comment&quot;, &quot;ham&quot;, &quot;*.txt&quot;)).each do |f|
       comment.body = File.open(f).read
-      comment.spam?
+      spam = comment.splam?
       score = comment.splam_score
       #$stderr.puts &quot;#{f} score: #{score}&quot;
       #$stderr.puts &quot;=====================&quot;
       
-      assert !comment.spam?, &quot;File #{f} should be marked ham, but was marked with score #{score}\nReasons were #{comment.splam_reasons}\n\n#{comment.body}&quot;
+      assert !spam, &quot;File #{f} should be marked ham, but was marked with score #{score}\nReasons were #{comment.splam_reasons}\n\n#{comment.body}&quot;
     end
   end
 end</diff>
      <filename>test/splam_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a28b305e856632c0aef333d62ae933df04c421c</id>
    </parent>
  </parents>
  <author>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </author>
  <url>http://github.com/courtenay/splam/commit/5a8197b572e28777e5c746578375125ccbf0016e</url>
  <id>5a8197b572e28777e5c746578375125ccbf0016e</id>
  <committed-date>2008-12-26T16:31:39-08:00</committed-date>
  <authored-date>2008-12-26T16:31:39-08:00</authored-date>
  <message>Use &quot;splam?&quot; instead of &quot;spam?&quot; so we don't overwrite other spam libs</message>
  <tree>d688d7abe38b0fc10c4275b7c2234312e8b2a3a5</tree>
  <committer>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </committer>
</commit>
