<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/20090608144306_add_defensio_columns_to_comments.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/example/article.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/example/comment.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/example/comments_controller.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/example/defensio.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/generators/defensio_migration/defensio_migration_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/generators/defensio_migration/templates/migration.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/install.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/lib/defensio.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/lib/defensio/acts_as.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/lib/defensio/client.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/test/acts_as_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/test/client_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/test/config_example.yml</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/test/test_helper.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/defensio/uninstall.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -28,7 +28,7 @@ class CommentsController &lt; ApplicationController
   def create
     @comment = Comment.new((session[:pending_comment] || params[:comment] || {}).reject {|key, value| !Comment.protected_attribute?(key) })
     @comment.post = @post
-
+    @comment.env = request.env
     session[:pending_comment] = nil
 
     unless @comment.requires_openid_authentication?
@@ -52,6 +52,11 @@ class CommentsController &lt; ApplicationController
     end
 
     if session[:pending_comment].nil? &amp;&amp; @comment.save
+      if @comment.spam
+        flash[:notice] = 'Your comment has been marked for review'
+      else
+        flash[:notice] = 'Comment created'
+      end
       redirect_to post_path(@post)
     else
       render :template =&gt; 'posts/show'</diff>
      <filename>app/controllers/comments_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,8 @@ class Comment &lt; ActiveRecord::Base
   attr_accessor         :openid_error
   attr_accessor         :openid_valid
 
+  acts_as_defensio_comment :fields =&gt; {:content =&gt; :body, :article =&gt; :post}
+
   belongs_to            :post
 
   before_save           :apply_filter</diff>
      <filename>app/models/comment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,10 @@ class Post &lt; ActiveRecord::Base
 
   acts_as_taggable
 
+  acts_as_defensio_article :fields =&gt; {:content =&gt; :body_html, :permalink =&gt; :slug}
+
   has_many                :comments, :dependent =&gt; :destroy
-  has_many                :approved_comments, :class_name =&gt; 'Comment'
+  has_many                :approved_comments, :class_name =&gt; 'Comment', :conditions =&gt; {:spam =&gt; false}
 
   before_validation       :generate_slug
   before_validation       :set_dates
@@ -19,6 +21,15 @@ class Post &lt; ActiveRecord::Base
   end
 
   attr_accessor :minor_edit
+  
+  def author
+    &quot;Christopher Redinger&quot;
+  end
+  
+  def author_email
+    &quot;info@agiledisciple.com&quot;
+  end
+
   def minor_edit
     @minor_edit ||= &quot;1&quot;
   end</diff>
      <filename>app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,7 @@
 &lt;% content_for(:page_title) do -%&gt;
 &lt;%=h post_title(@post) -%&gt;
 &lt;% end -%&gt;
+&lt;% if flash[:notice] %&gt;&lt;p&gt;&lt;%= flash[:notice] %&gt;&lt;/p&gt;&lt;% end %&gt;
 &lt;%= render :partial =&gt; 'posts/post', :locals =&gt; {:post =&gt; @post} %&gt;
 &lt;ol class=&quot;commentlist&quot;&gt;
   &lt;% @post.approved_comments.each do |comment| -%&gt;</diff>
      <filename>app/views/posts/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,3 @@
 database.yml
 defensio.yml
-&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD:config/.gitignore
 newrelic.yml
-=======
-newrelic.yml
-&gt;&gt;&gt;&gt;&gt;&gt;&gt; 5e29f7f21b667ccc8f30e0e679fbe8f4033f38d5:config/.gitignore</diff>
      <filename>config/.gitignore</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>31ef043e415ca75d77f5cfe450debf19167038ec</id>
    </parent>
  </parents>
  <author>
    <name>Christopher Redinger</name>
    <email>redinger@gmail.com</email>
  </author>
  <url>http://github.com/redinger/enki/commit/8282ec8c1e06d7d0a98e387c4de96958476e8584</url>
  <id>8282ec8c1e06d7d0a98e387c4de96958476e8584</id>
  <committed-date>2009-06-08T08:38:13-07:00</committed-date>
  <authored-date>2009-06-08T08:38:13-07:00</authored-date>
  <message>defensio!</message>
  <tree>78f41b211b8b7dba0951fcdd2748eadae2c65822</tree>
  <committer>
    <name>Christopher Redinger</name>
    <email>redinger@gmail.com</email>
  </committer>
</commit>
