<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/007_add_preference_for_simple_spamcheck.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,11 +7,13 @@ You have the capability to use 3 different methods of spam blocking with this ex
 ## Spam Blocking
 
 By default, you will have sample questions that you may ask of your visitors. These questions are difficult
-to easily interpret by robots that may crawl your site looking to leave spam. See your Snippet 'comment\_spam\_block'
-for 
+to easily interpret by robots that may crawl your site looking to leave spam. See your Snippet
+'comment\_spam\_block' for examples of this.
 
-To enable spam protection, you will need to use the spam\_answer\_tag in your comment forms or set your 
-Akismet or Mollom key and url in the Radiant config.
+You will need to use the spam\_answer\_tag in your comment forms to present these questions to the user.
+
+If you wish disable this simple spam protection mechanism, you can do so using the `require_simple_spam_filter`
+config key, e.g. Radiant::Config['comments.require_simple_spam_filter'] = false
 
 To enable the Akismet protection, get yourself an account at http://akismet.com/personal/ for your personal
 blog or at http://akismet.com/commercial/ for your commercial sites. Then set your personal key and url</diff>
      <filename>HELP_admin.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -47,7 +47,7 @@ class Comment &lt; ActiveRecord::Base
   # comment, this method will return true
   def auto_approve?
     return false if Radiant::Config['comments.auto_approve'] != &quot;true&quot;
-    if using_logic_spam_filter?
+    if simple_spam_filter_required?
       passes_logic_spam_filter?
     elsif akismet.valid?
       # We do the negation because true means spam, false means ham
@@ -121,21 +121,17 @@ class Comment &lt; ActiveRecord::Base
   private
   
     def validate_spam_answer
-      if using_logic_spam_filter? &amp;&amp; !passes_logic_spam_filter?
+      if simple_spam_filter_required? &amp;&amp; !passes_logic_spam_filter?
         self.errors.add :spam_answer, &quot;is not correct.&quot;
       end
     end
     
     def passes_logic_spam_filter?
-      if valid_spam_answer == hashed_spam_answer
-        true
-      else
-        false
-      end
+      valid_spam_answer == hashed_spam_answer
     end
     
-    def using_logic_spam_filter?
-      !valid_spam_answer.blank?
+    def simple_spam_filter_required?
+      !valid_spam_answer.blank? &amp;&amp; Radiant::Config['comments.simple_spam_filter_required?']
     end
     
     def hashed_spam_answer</diff>
      <filename>app/models/comment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -151,10 +151,11 @@ describe Comment do
 
   describe &quot;using spam answer&quot; do
     it &quot;should error that the 'Spam answer is not correct' when saved with a spam_answer and valid_spam_answer that do not match&quot; do
+      Radiant::Config['comments.simple_spam_filter_required?'] = true
       @comment = comments(:first)
       @comment.valid_spam_answer = 'TRUE'
       @comment.spam_answer = 'FALSE'
-      @comment.send(:using_logic_spam_filter?).should be_true
+      @comment.send(:simple_spam_filter_required?).should be_true
       lambda{ @comment.save! }.should raise_error(ActiveRecord::RecordInvalid, 'Validation failed: Spam answer is not correct.')
     end
     it &quot;should allow differing capitalization and punctuation in the answers when comparing&quot; do</diff>
      <filename>spec/models/comment_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0757680434633f408ea60900a7ed3b9c633813ef</id>
    </parent>
  </parents>
  <author>
    <name>Jim Gay</name>
    <email>jim@saturnflyer.com</email>
  </author>
  <url>http://github.com/artofmission/radiant-comments/commit/5bc0e6a262db59074cc63c90afcb9502cd4df6f7</url>
  <id>5bc0e6a262db59074cc63c90afcb9502cd4df6f7</id>
  <committed-date>2009-06-11T21:07:48-07:00</committed-date>
  <authored-date>2009-06-11T21:07:48-07:00</authored-date>
  <message>configurable simple_spam_filter</message>
  <tree>5301c1a82735ba6c57967a7b34b2fe583967033c</tree>
  <committer>
    <name>Jim Gay</name>
    <email>jim@saturnflyer.com</email>
  </committer>
</commit>
