<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/models/Twitter/Status.rb</filename>
    </added>
    <added>
      <filename>app/views/posts/_form.html.haml</filename>
    </added>
    <added>
      <filename>db/migrate/20080514223708_honey_pot_captcha_field_for_comments.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20080515004142_add_fields_for_spam_tracking.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20080530145539_add_permalink_to_post.rb</filename>
    </added>
    <added>
      <filename>lib/Utils/TwitterAPI.rb</filename>
    </added>
    <added>
      <filename>lib/string.rb</filename>
    </added>
    <added>
      <filename>script/dbconsole</filename>
    </added>
    <added>
      <filename>vendor/plugins/gems/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/gems/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/gems/tasks/gems_tasks.rake</filename>
    </added>
    <added>
      <filename>vendor/plugins/resource_controller</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,4 +10,5 @@ joe
 *.sqlite3
 .DS_Store
 tmp/*
-*.tmproj
\ No newline at end of file
+*.tmproj
+twitter_creds
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -4,3 +4,6 @@
 [submodule &quot;vendor/rails&quot;]
 	path = vendor/rails
 	url = git://github.com/rails/rails.git
+[submodule &quot;vendor/plugins/resource_controller&quot;]
+	path = vendor/plugins/resource_controller
+	url = git://github.com/giraffesoft/resource_controller.git</diff>
      <filename>.gitmodules</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,10 @@ class ApplicationController &lt; ActionController::Base
   helper :all # include all helpers, all the time
   before_filter :retrieve_user
 
+	def tweets_enabled
+		false
+	end
+
   protected
     def for_admin_only
       unless @current_user</diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 class PostsController &lt; ResourceController::Base
+	alias r_c_generated_object object
 
   new_action.wants.html do
     for_admin_only do
@@ -9,6 +10,16 @@ class PostsController &lt; ResourceController::Base
 	index.wants.atom
 
   index.wants.html do
+		Twitter::Status.logger = logger
+		begin
+			if tweets_enabled
+				@tweets = Twitter::Status.user_timeline
+			end
+		rescue
+			@tweets = nil
+			logger.error &quot;Error receiving recent tweets: #{$!}&quot;
+		end
+		
     for_users_by_type do |type|
       case type
         when :anonymous
@@ -24,6 +35,16 @@ class PostsController &lt; ResourceController::Base
   end
 
 	create.before { @post.author = @current_user }
+	create.after { logger.info &quot;MY OBJECT: #{@post} AND IT'S ATTRIBUTES: #{@post.attributes}&quot; }
+
+	show.wants.html do
+		if params[:day] and params[:month] and params[:year]
+			ex = &quot;#{params[:month]}/#{params[:day]}/#{params[:year]}&quot;
+		elsif params[:year]
+			ex = &quot;Year: #{params[:year]}&quot;
+		end
+		#raise ex
+	end
 
   show.wants.xml { render :xml =&gt; @post }
   new_action.wants.xml { render :xml =&gt; @post }
@@ -31,9 +52,20 @@ class PostsController &lt; ResourceController::Base
   create.wants.xml { render :xml =&gt; @posts }
   update.wants.xml { render :xml =&gt; @post }
   destroy.wants.xml { head :ok }
-  
+
   protected
-  
+
+  def object
+		if params[:id]  	
+			my_object = Post.find params[:id]
+		elsif params[:action] != 'create'
+			my_object = Post.new
+		else
+			my_object = r_c_generated_object
+		end
+		my_object
+  end
+
   def load_collection
 		if params[:tag]
 			@posts = Post.find_tagged_with params[:tag] </diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,26 @@ class Comment
 								:author_email =&gt; 'email',
 								:author_url =&gt; 'url',
 								:content =&gt; 'comment'
-	
+
 	def comment_type
 		&quot;Comment&quot;
 	end
 	
-	def before_create
-		!self.spam?
+	def after_validation
+		unless self.comment_something.empty?
+			self.spam_type = &quot;honeypot&quot;
+		else
+			self.spam_type = &quot;&quot;
+		end
+		
+		if self.spam_type.empty? and self.spam?
+			self.spam_type = &quot;rakismet&quot;
+		else
+			self.spam_type = &quot;&quot;
+		end
+		
+		self.is_spam = !self.spam_type.empty?
+		
 	end
 	
 end
\ No newline at end of file</diff>
      <filename>app/models/Comment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,15 @@
 class Post &lt; ActiveRecord::Base
 	belongs_to :author, :class_name =&gt; 'User'
-  acts_as_commentable :order =&gt; 'created_at desc'
+	before_save :generate_permalink
+  acts_as_commentable :order =&gt; 'created_at desc', :conditions =&gt; &quot;is_spam = 'f'&quot;
 	acts_as_taggable
 
+	def generate_permalink
+		#raise self.attributes.to_s
+		if self.permalink.nil?
+			self.permalink = self.title.sanitize_for_url
+			self.save
+		end
+	end
+
 end</diff>
      <filename>app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,6 @@
         #welcome_message
           = &quot;Logged in as: &quot; + @current_user.name
           = link_to 'Logout', logout_url
-      %img{ :src =&gt; &quot;/images/glasses.png&quot; }/
       %h1#page-title
         %a{ :href =&gt; &quot;/&quot; }
           faithfulgeek.org
@@ -25,34 +24,5 @@
       #wrapper
         #page-content
           = yield
-      #modules
-        .twitter.module
-          %fieldset
-            %legend
-              twitter
-            %p
-              I just twittered all over the place
-            %p
-              I wish skittles were M&amp;Ms
-            %p
-              You have walked the lonely walk of loneliness
-        .blogroll.module
-          %fieldset
-            %legend
-              blogroll
-            %p
-              %a{ :href =&gt; &quot;http://www.codinggeekette.com/&quot;, :rel =&gt; &quot;met&quot; }
-                coding geekette
-            %p
-              %a{ :href =&gt; &quot;http://www.hanselman.com/&quot;, :rel =&gt; &quot;met&quot; }
-                scott hanselman
-            %p
-              %a{ :href =&gt; &quot;http://www.coreyhaines.com/&quot;, :rel =&gt; &quot;met&quot; }
-                corey haines
-        .tagcloud.module
-          %fieldset
-            %legend
-              tag cloud
-            tags
       #footer
         &amp;copy;2008 Joe Fiorini - creative commons license</diff>
      <filename>app/views/layouts/application.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 .post
   %img{:src =&gt; &quot;/images/icons/24-book-blue-mark.png&quot;}
-  %h2#title= link_to post.title, post
-  %h3#tags
+  %h2.title= link_to post.title, post
+  %h3.tags
     on
     = format_date_long(post.created_at)
     &amp;ndash;</diff>
      <filename>app/views/posts/_post.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -2,23 +2,7 @@
   Editing Post
   = @post.title
 
-= error_messages_for :post
-
-- form_for(@post) do |f|
-  %p
-    = title_label
-    = f.text_field :title
-  %p
-    = body_label
-    ~ f.text_area :body
-  %p
-    = tags_label
-    = f.text_field :tag_list
-  %p
-    = is_published_label
-    = f.check_box :is_published
-  %p
-    = f.submit &quot;Update&quot;
+= render_partial 'new'
 
 = link_to 'Show', @post
 |</diff>
      <filename>app/views/posts/edit.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,12 @@
+#tweets
+  - if @tweets
+    %h2.title= link_to 'Recent Tweets', 'http://www.twitter.com/faithfulgeek'
+    - @tweets.each do |tweet|
+      .tweet
+        = tweet.text
+        Reply ID is:
+        = tweet.in_reply_to_status_id
+    
 #posts
   - @posts.each do |post|
     = render_partial 'post', post</diff>
      <filename>app/views/posts/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -2,35 +2,6 @@
 
 &lt;%= error_messages_for :post %&gt;
 
-&lt;% form_for(@post) do |f| %&gt;
-  &lt;p&gt;
-    &lt;b&gt;&lt;%= title_label %&gt;&lt;/b&gt;&lt;br /&gt;
-    &lt;%= f.text_field :title %&gt;
-  &lt;/p&gt;
-
-  &lt;p&gt;
-    &lt;b&gt;&lt;%= body_label %&gt;&lt;/b&gt;&lt;br /&gt;
-    &lt;%= f.text_area :body %&gt;
-  &lt;/p&gt;
-  
-  &lt;p&gt;
-    &lt;%= tags_label %&gt;&lt;br /&gt;
-    &lt;%= f.text_field :tags %&gt;
-  &lt;/p&gt;
-  
-  &lt;p&gt;
-    &lt;b&gt;&lt;%= excerpt_label %&gt;&lt;/b&gt;&lt;br /&gt;
-    &lt;%= f.text_area :excerpt %&gt;
-  &lt;/p&gt;
-
-  &lt;p&gt;
-    &lt;b&gt;&lt;%= is_published_label %&gt;&lt;/b&gt;&lt;br /&gt;
-    &lt;%= f.check_box :is_published %&gt;
-  &lt;/p&gt;
-
-  &lt;p&gt;
-    &lt;%= f.submit &quot;Create&quot; %&gt;
-  &lt;/p&gt;
-&lt;% end %&gt;
+&lt;%= render_partial 'form' %&gt;
 
 &lt;%= link_to 'Back', posts_path %&gt;</diff>
      <filename>app/views/posts/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,9 @@
   - form_for([@post, Comment.new], :html =&gt; {:id =&gt; 'comment-submission'}) do |f|
     .comment-form
       %p
+        #comment-something
+          = label :comment_something, 'Do not fill this in, it is meant to be empty.'
+          = f.text_field :comment_something
         = name_label
         = f.text_field :name, :size =&gt; 20
         = label :email, 'Email:'</diff>
      <filename>app/views/posts/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -24,9 +24,8 @@ module Rails
       File.exist?(&quot;#{RAILS_ROOT}/vendor/rails&quot;)
     end
 
-    # FIXME : Ruby 1.9
     def preinitialize
-      load(preinitializer_path) if File.exists?(preinitializer_path)
+      load(preinitializer_path) if File.exist?(preinitializer_path)
     end
 
     def preinitializer_path
@@ -44,6 +43,7 @@ module Rails
   class VendorBoot &lt; Boot
     def load_initializer
       require &quot;#{RAILS_ROOT}/vendor/rails/railties/lib/initializer&quot;
+      Rails::Initializer.run(:install_gem_spec_stubs)
     end
   end
 </diff>
      <filename>config/boot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,10 @@ Rails::Initializer.run do |config|
   # config.active_record.default_timezone = :utc
 end
 
-require 'lib/ActionView/base'
+require &quot;#{File.expand_path(RAILS_ROOT)}/lib/string&quot;
+require &quot;#{File.expand_path(RAILS_ROOT)}/lib/ActionView/base&quot;
+require &quot;#{File.expand_path(RAILS_ROOT)}/lib/Utils/TwitterAPI&quot;
+require &quot;#{File.expand_path(RAILS_ROOT)}/app/models/Twitter/Status&quot;
 require &quot;#{File.expand_path(RAILS_ROOT)}/vendor/RedCloth-3.0.4/lib/redcloth&quot;
 
 # Add custom date formats</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
 ActionController::Routing::Routes.draw do |map|
   
   map.root :controller =&gt; 'posts'
+	map.posts_for_date ':year/:month/:day', :controller =&gt; 'posts', :action =&gt; 'show', :year =&gt; /\d{4}/, :month =&gt; /\d{2}/, :day =&gt; /\d{2}/
+	map.posts_for_year ':year', :controller =&gt; 'posts', :action =&gt; 'show', :year =&gt; /\d{4}/
   map.home 'home', :controller =&gt; 'posts'
   map.login 'login', :controller =&gt; 'sessions', :action =&gt; 'new'
   map.logout 'logout', :controller =&gt; 'sessions', :action =&gt; 'destroy'
 	map.feed	'feed', :controller =&gt; 'posts', :action =&gt; 'index', :format =&gt; 'atom'
   map.comments_for_post 'posts/show/:id', :controller =&gt; 'posts', :action =&gt; 'show', :anchor =&gt; 'comments'
   map.tag 'posts/tags/:tag', :controller =&gt; 'posts', :action =&gt; 'index'
+#	map.post ':year/:month/:day/:permalink', :controller =&gt; 'posts', :action =&gt; 'show'
+#	map.posts_for_date 'posts/:year/:month/:day', :controller =&gt; 'posts', :action =&gt; 'show' 
+
   map.resources :posts, :has_many =&gt; :comments
-    
-  map.connect '/:month',
-              :controller =&gt; 'posts',
-              :action =&gt; 'index',
-              :month =&gt; /#{(DateTime::MONTHNAMES - [nil]).join('|')}/
-  
+
   map.open_id_complete 'session', :controller =&gt; &quot;sessions&quot;, :action =&gt; &quot;create&quot;, :requirements =&gt; { :method =&gt; :get }
   map.resource :session
                 </diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,13 @@
 class AddPostIdToComments &lt; ActiveRecord::Migration
   def self.up
-    add_column :comments, :post_id, :integer
+		change_table :comments do |t| 
+			t.integer :post_id 
+		end
   end
 
   def self.down
-    remove_column :comments, :post_id
+		change_table :comments do |t| 
+			t.remove :post_id
+		end
   end
 end</diff>
      <filename>db/migrate/003_add_post_id_to_comments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,8 +8,8 @@ class CreateUsers &lt; ActiveRecord::Migration
   end
 
   def self.down
-    drop_column :name
-    drop_column :openid_url
+    remove_column :name
+    remove_column :openid_url
     drop_table :users
   end
 end</diff>
      <filename>db/migrate/005_create_users.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,13 @@
 class AddAuthorToPost &lt; ActiveRecord::Migration
   def self.up
-		add_column 'Posts', :author_id, :integer
+		change_table :posts do |t|
+			t.integer :author_id
+		end
   end
 
   def self.down
-		remove_column 'Posts', :author_id
+		change_table :posts do |t|
+			 t.remove :author_id
+		end
   end
 end</diff>
      <filename>db/migrate/008_add_author_to_post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,13 @@
 class AddEmailToUser &lt; ActiveRecord::Migration
   def self.up
-		add_column 'Users', 'email', :string
+		change_table :users do |t|
+			t.string :email
+		end
   end
 
   def self.down
-		remove_column 'Users', 'email'
+		change_table :users do |t|
+			t.remove :email
+		end
   end
 end</diff>
      <filename>db/migrate/009_add_email_to_user.rb</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>public/images/bg.jpg</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>public/images/logo.jpg</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ blockquote
 	margin-right: 70px;
 }
 
-h2#title
+h2.title
 {
 	font-family: georgia, 'times new roman', serif;
 	border: 0;
@@ -72,7 +72,7 @@ h2#title
 	display: inline;
 }
 
-h3#tags
+h3.tags
 {
 	font-size: .75em;
 	color: #666;
@@ -184,9 +184,9 @@ div.comment-form p textarea
 
 #header h1 a
 {
-	height: 89px;
-	width: 384px;
-	margin:55px 0 30px 15px;
+	height: 103px;
+	width: 484px;
+	margin-top:16px;
 	background: url('/images/logo.jpg') no-repeat;
 	display:block;
 	text-indent: -9999px;
@@ -199,6 +199,13 @@ div.comment-form p textarea
 	top: 63px;
 }
 
+/* this is the honeypot captcha to catch spam bots */
+div#comment-something
+{
+	position: absolute;
+	left: -999px;
+}
+
 .module
 {
 	margin-bottom: 1em;</diff>
      <filename>public/stylesheets/site.css</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module Juixe
 
       module ClassMethods
         def acts_as_commentable(params={})
-          has_many :comments, :as =&gt; :commentable, :dependent =&gt; :destroy, :order =&gt; (params[:order] || 'created_at ASC')
+          has_many :comments, :as =&gt; :commentable, :dependent =&gt; :destroy, :order =&gt; (params[:order] || 'created_at ASC'), :conditions =&gt; (params[:conditions] || '1=1')
           include Juixe::Acts::Commentable::InstanceMethods
           extend Juixe::Acts::Commentable::SingletonMethods
         end</diff>
      <filename>vendor/plugins/acts_as_commentable/lib/acts_as_commentable.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>76191562d1188011ee75d12f07dc2166bc3e7447</id>
    </parent>
  </parents>
  <author>
    <name>Joe Fiorini</name>
    <email>joe@faithfulgeek.org</email>
  </author>
  <url>http://github.com/faithfulgeek/blog-starter-kit/commit/a7d6cdc7e2273dd40774a021986f445f1030ecd9</url>
  <id>a7d6cdc7e2273dd40774a021986f445f1030ecd9</id>
  <committed-date>2008-06-05T19:32:47-07:00</committed-date>
  <authored-date>2008-06-05T19:32:47-07:00</authored-date>
  <message>Upgraded to Rails 2.1 RC; other modifications to make this ready for an initial release</message>
  <tree>7494c43da82db6f8db36a22274a2c13fe6d8a765</tree>
  <committer>
    <name>Joe Fiorini</name>
    <email>joe@faithfulgeek.org</email>
  </committer>
</commit>
