<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/controllers/application_controller.rb</filename>
    </added>
    <added>
      <filename>app/controllers/monitorships_controller.rb</filename>
    </added>
    <added>
      <filename>app/models/monitorships_sweeper.rb</filename>
    </added>
    <added>
      <filename>app/models/posts_sweeper.rb</filename>
    </added>
    <added>
      <filename>app/views/monitorships/create.rjs</filename>
    </added>
    <added>
      <filename>app/views/monitorships/destroy.rjs</filename>
    </added>
    <added>
      <filename>config/initializers/application.rb</filename>
    </added>
    <added>
      <filename>db/migrate/20090317123901_add_open_id_authentication_tables.rb</filename>
    </added>
    <added>
      <filename>spec/controllers/monitorships_controller_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/CHANGELOG</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/Rakefile</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/generators/open_id_authentication_tables/open_id_authentication_tables_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/generators/open_id_authentication_tables/templates/migration.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/templates/migration.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/upgrade_open_id_authentication_tables_generator.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication/association.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication/request.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/lib/open_id_authentication/timeout_fixes.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/tasks/open_id_authentication_tasks.rake</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/test/normalize_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/test/open_id_authentication_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/test/status_test.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/open_id_authentication/test/test_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -26,15 +26,6 @@ class PostsController &lt; ApplicationController
     end
   end
 
-  def new
-    @post = Post.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml  =&gt; @post }
-    end
-  end
-
   def edit
     respond_to do |format|
       format.html # edit.html.erb
@@ -47,7 +38,7 @@ class PostsController &lt; ApplicationController
 
     respond_to do |format|
       if @post.new_record?
-        format.html { render :action =&gt; &quot;new&quot; }
+        format.html { redirect_to forum_topic_path(@forum, @topic) }
         format.xml  { render :xml  =&gt; @post.errors, :status =&gt; :unprocessable_entity }
       else
         flash[:notice] = 'Post was successfully created.'
@@ -82,14 +73,19 @@ class PostsController &lt; ApplicationController
 protected
   def find_parents
     if params[:user_id]
-      @parent = @user = User.find_by_permalink(params[:user_id])
+      @parent = @user = User.find(params[:user_id])
     elsif params[:forum_id]
       @parent = @forum = Forum.find_by_permalink(params[:forum_id])
       @parent = @topic = @forum.topics.find_by_permalink(params[:topic_id]) if params[:topic_id]
     end
   end
-  
+
   def find_post
-    @post = @topic.posts.find(params[:id])
+    post = @topic.posts.find(params[:id])
+    if post.user == current_user || current_user.admin?
+      @post = post
+    else
+      raise ActiveRecord::RecordNotFound
+    end
   end
-end
+end
\ No newline at end of file</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,19 +7,14 @@ class SessionsController &lt; ApplicationController
   end
 
   def create
-    params[:login] = params[:login].downcase
-    self.current_user = current_site.users.authenticate(params[:login], params[:password])
-    
-    if logged_in?
-      if params[:remember_me] == &quot;1&quot;
-        current_user.remember_me
-        cookies[:auth_token] = { :value =&gt; current_user.remember_token , :expires =&gt; current_user.remember_token_expires_at }
-      end
-      redirect_back_or_default('/')
-      flash[:notice] = &quot;Logged in successfully&quot;
+    reset_session
+    if using_open_id?
+      cookies[:use_open_id] = {:value =&gt; '1', :expires =&gt; 1.year.from_now.utc}
+      open_id_authentication(params[:openid_url])
     else
+      cookies[:use_open_id] = {:value =&gt; '0', :expires =&gt; 1.year.ago.utc}
+      password_authentication params[:login], params[:password]
       flash[:error] = &quot;Invalid login&quot;
-      render :action =&gt; 'new'
     end
   end
 
@@ -30,4 +25,55 @@ class SessionsController &lt; ApplicationController
     flash[:notice] = &quot;You have been logged out.&quot;
     redirect_back_or_default('/')
   end
+
+  protected
+  
+  def password_authentication(name, password)
+    if @current_user = current_site.users.authenticate(name, password)
+      successful_login
+    else
+      failed_login &quot;Sorry, that username/password doesn't work&quot;
+   end
+  end
+
+  def open_id_authentication(openid_url)
+    authenticate_with_open_id(openid_url, :required =&gt; [:nickname, :email]) do |result, openid_url, registration|
+    if result.successful?
+      @user = User.find_or_initialize_by_openid_url(openid_url)
+      @current_user  = @user
+      if @current_user
+        if @user.new_record?
+          @user.login = openid_url
+          @user.email = registration['email']
+          @user.password = 123456
+          @user.site = Site.find(:first)
+          @user.display_name = registration['nickname']
+          @user.save(false)
+        end
+        successful_login
+      else
+        failed_login &quot;Sorry, no user by the identity URL {openid_url} exists&quot;[:openid_no_user_message, openid_url.inspect]
+      end
+    else
+      failed_login result.message
+    end
+  end
+  end
+
+
+  private
+  def successful_login
+    flash[:notice] = 'You are now logged in! Welcome.'
+    new_cookie_flag = (params[:remember_me] == &quot;1&quot;)
+    handle_remember_cookie! new_cookie_flag
+    session[:user_id] = @current_user.id
+    redirect_back_or_default('/')
+  end
+
+  def failed_login(message)
+    @remember_me = params[:remember_me]
+    flash[:error] = message
+    render :action =&gt; &quot;new&quot;
+  end
+
 end</diff>
      <filename>app/controllers/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class SitesController &lt; ApplicationController
-  before_filter :admin_required, :only =&gt; [ :destroy, :update, :edit ]
+  before_filter :admin_required
 
   def index
     @sites = Site.paginate(:all, :page =&gt; current_page, :order =&gt; 'host ASC')</diff>
      <filename>app/controllers/sites_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,8 +20,8 @@ class UsersController &lt; ApplicationController
     cookies.delete :auth_token
     @user = current_site.users.build(params[:user])    
     @user.save if @user.valid?
+    @user.register! if @user.valid?
     unless @user.new_record?
-      @user.register!
       redirect_back_or_default('/login')
       flash[:notice] = &quot;Thanks for signing up! Please click the link in your email to activate your account&quot;
     else
@@ -95,13 +95,15 @@ class UsersController &lt; ApplicationController
 protected
   def find_user
     @user = if admin?
-      current_site.all_users.find_by_permalink(params[:id])
+      current_site.all_users.find params[:id]
+    elsif params[:id] == current_user.id
+      current_user
     else
-      current_site.users.find_by_permalink(params[:id])
+      current_site.users.find params[:id]
     end or raise ActiveRecord::RecordNotFound
   end
   
   def authorized?
-    admin? || params[:id].blank? || params[:id] == current_user.permalink
+    admin? || params[:id].blank? || params[:id] == current_user.id.to_s
   end
-end
+end
\ No newline at end of file</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@ module ApplicationHelper
       else
         :search
       end
-    atom ? send(&quot;formatted_#{prefix}_posts_path&quot;, options.update(:format =&gt; :atom)) : send(&quot;#{prefix}_posts_path&quot;, options)
+    atom ? send(&quot;#{prefix}_posts_path&quot;, options.update(:format =&gt; :atom)) : send(&quot;#{prefix}_posts_path&quot;, options)
   end
 
   @@default_jstime_format = &quot;%d %b, %Y %I:%M %p&quot;</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ class Topic &lt; ActiveRecord::Base
       self.class.update_all(['last_updated_at = ?, last_user_id = ?, last_post_id = ?, posts_count = ?', 
         remaining_post.created_at, remaining_post.user_id, remaining_post.id, posts.count], ['id = ?', id])
     else
-      self.destroy
+      destroy
     end
   end
   </diff>
      <filename>app/models/topic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,6 +65,21 @@ class User &lt; ActiveRecord::Base
   end
   
   def to_param
-    permalink
+    id.to_s # permalink || login
   end
+
+  def openid_url=(value)
+    write_attribute :openid_url, value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value)
+  end
+
+  def using_openid
+    self.openid_url.blank? ? false : true
+  end
+  
+  def to_xml(options = {})
+    options[:except] ||= []
+    options[:except] &lt;&lt; :email &lt;&lt; :login_key &lt;&lt; :login_key_expires_at &lt;&lt; :password_hash &lt;&lt; :openid_url &lt;&lt; :activated &lt;&lt; :admin
+    super
+  end
+
 end</diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ class User
 
   after_create :set_first_user_as_activated
   def set_first_user_as_activated
-    register! &amp;&amp; activate! if site.nil? or site.users.size &lt;= 1
+    register! &amp;&amp; activate! if site.nil? or site.users.count &lt;= 1
   end
 
   # Returns true if the user has just been activated.</diff>
      <filename>app/models/user/activation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ class User
     self.deleted_at = nil
     self.activation_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )
     
-    UserMailer.deliver_signup_notification(self)
+    UserMailer.deliver_signup_notification(self) unless using_openid
   end
 
 protected
@@ -52,7 +52,7 @@ protected
     self.deleted_at = nil
     self.activation_code = &quot;&quot;
     
-    UserMailer.deliver_activation(self)
+    UserMailer.deliver_activation(self) unless using_openid
   end
   
   def remove_moderatorships</diff>
      <filename>app/models/user/states.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,8 @@ class User
   before_save :downcase_email_and_login
   before_save :encrypt_password
   before_create :set_first_user_as_admin
+  # validates_email_format_of :email, :message=&gt;&quot;is invalid&quot;  
+  validates_uniqueness_of :openid_url, :case_sensitive =&gt; false, :allow_nil =&gt; true
 
   # prevents a user from submitting a crafted form that bypasses activation
   # anything else you want your user to change should be added here.
@@ -42,7 +44,12 @@ protected
     self.crypted_password = encrypt(password)
   end
     
-  def password_required?
+  def using_openid
+    self.openid_url.blank? ? false : true
+  end
+    
+  def password_required?    
+    return false if using_openid
     crypted_password.blank? || !password.blank?
   end
   </diff>
      <filename>app/models/user/validation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@
 
 &lt;h1 style=&quot;margin-top:0;&quot;&gt;&lt;%= 'Forums'[:forums_title] %&gt;&lt;/h1&gt;
 &lt;p class=&quot;subtitle&quot;&gt;
-&lt;%= feed_icon_tag &quot;Recent Posts&quot;[:recent_posts], formatted_posts_path(:format =&gt; 'atom') %&gt;
+&lt;%= feed_icon_tag &quot;Recent Posts&quot;[:recent_posts], posts_path(:format =&gt; 'atom') %&gt;
 &lt;%= topic_count %&gt;, &lt;%= post_count %&gt; &lt;%# OPTIMIZE ME voice_count %&gt;
 &lt;/p&gt;
 
@@ -25,7 +25,7 @@
     &lt;th class=&quot;la&quot; width=&quot;30%&quot; colspan=&quot;1&quot;&gt;&lt;%= 'Last Post'[:last_post] %&gt;&lt;/th&gt;
   &lt;/tr&gt;
 &lt;% for forum in @forums do %&gt;  
-  &lt;tr&gt;
+  &lt;tr class=&quot;forum&quot; id=&quot;forum_&lt;%= forum.id %&gt;_row&quot;&gt;
     &lt;td class=&quot;vat c1&quot;&gt;
     
       &lt;% if recent_forum_activity(forum) %&gt;</diff>
      <filename>app/views/forums/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@
 &lt;/h1&gt;
 
 &lt;p class=&quot;subtitle&quot;&gt;
-  &lt;%= feed_icon_tag @forum.name, formatted_forum_posts_path(@forum, :atom) %&gt; 
+  &lt;%= feed_icon_tag @forum.name, forum_posts_path(@forum, :format =&gt; :atom) %&gt; 
   &lt;%= '{count} topic(s)'[(count=@forum.topics.size)==1 ? :topic_count : :topics_count, number_with_delimiter(count)] %&gt;, 
   &lt;%= '{count} post(s)'[(count=@forum.posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %&gt;
 &lt;/p&gt;</diff>
      <filename>app/views/forums/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,10 @@
 &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
-
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
 &lt;head&gt;
   &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;
   &lt;title&gt;&lt;%= &quot;#{h @page_title} - &quot; if @page_title %&gt; &lt;%=h @current_site &amp;&amp; current_site.name %&gt;&lt;/title&gt;
   &lt;%= stylesheet_link_tag 'display' %&gt;
-  &lt;%= javascript_include_tag &quot;prototype&quot;, &quot;effects&quot;, &quot;lowpro&quot;, &quot;time&quot;, &quot;application&quot;, :cache =&gt; 'beast' %&gt;
+  &lt;%= javascript_include_tag &quot;prototype&quot;, &quot;effects&quot;, &quot;lowpro&quot;, &quot;time&quot;, &quot;application&quot;, :cache =&gt; &quot;beast&quot; %&gt;
 &lt;% unless @feed_icons.blank? -%&gt;
   &lt;% @feed_icons.each do |feed| -%&gt;
   &lt;%= auto_discovery_link_tag :atom, feed[:url], :title =&gt; &quot;Subscribe to '#{feed[:title]}'&quot; %&gt;
@@ -27,7 +26,7 @@
     &lt;li&gt;&lt;%= link_to_function 'Search'[:search_title], &quot;#&quot;, :href =&gt; root_path, :id =&gt; 'search-link' %&gt;&lt;/li&gt;
 
     &lt;% if @current_site and logged_in? -%&gt;
-    &lt;li class=&quot;login&quot;&gt;&lt;%=  link_to current_user.login, user_path(current_user) %&gt;&lt;/li&gt;
+    &lt;li class=&quot;login&quot;&gt;&lt;%=  link_to current_user.display_name, user_path(current_user) %&gt;&lt;/li&gt;
     &lt;li class=&quot;logout&quot;&gt;&lt;%= link_to 'Settings'[:settings_title], settings_path %&gt;&lt;/li&gt;
     &lt;li class=&quot;logout&quot;&gt;&lt;%= link_to 'Logout'[:logout_title], logout_path(:to =&gt; CGI.escape(request.request_uri)) %&gt;&lt;/li&gt;
     &lt;% else -%&gt;</diff>
      <filename>app/views/layouts/_head.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,42 @@
 &lt;h1&gt;Log In&lt;/h1&gt;
 
-&lt;% form_tag session_path do -%&gt;
+&lt;% form_tag(session_path) do -%&gt;
+&lt;div id=&quot;openid_fields&quot; style=&quot;display:none&quot;&gt;
+&lt;p&gt;
+  &lt;label for=&quot;openid_url&quot;&gt;Login with OpenID&lt;/label&gt;
+  &lt;br /&gt;
+  &lt;%= text_field_tag 'openid_url', params[:openid_url], :class =&gt; &quot;openid_url&quot; %&gt;
+&lt;/p&gt;
+&lt;p&gt;or login with &lt;a href=&quot;#&quot; onclick=&quot;LoginForm.setToPassword()&quot;&gt;username/password&lt;/a&gt;&lt;/p&gt;
+&lt;/div&gt;
+
+&lt;div id=&quot;password_fields&quot;&gt;
 &lt;p&gt;&lt;%= label_tag 'login' %&gt;&lt;br /&gt;
 &lt;%= text_field_tag 'login', @login %&gt;&lt;/p&gt;
 
 &lt;p&gt;&lt;%= label_tag 'password' %&gt;&lt;br/&gt;
 &lt;%= password_field_tag 'password', nil %&gt;&lt;/p&gt;
 
-&lt;!-- Uncomment this if you want this functionality
 &lt;p&gt;&lt;%= label_tag 'remember_me', 'Remember me' %&gt;
 &lt;%= check_box_tag 'remember_me', '1', @remember_me %&gt;&lt;/p&gt;
---&gt;
 
-&lt;p&gt;&lt;%= submit_tag 'Log in' %&gt;&lt;/p&gt;
+&lt;p&gt;or login with &lt;a href=&quot;#&quot; onclick=&quot;LoginForm.setToOpenID()&quot;&gt;OpenID&lt;/a&gt;&lt;/p&gt;
+&lt;/div&gt;
+
+&lt;p&gt;&lt;%= submit_tag 'Log in' %&gt; or &lt;%= link_to_function('reset password'[], &quot;$('reset-password').toggle();&quot;) %&gt;&lt;/p&gt;
+
 &lt;% end -%&gt;
+
+&lt;% form_tag users_path, :id =&gt; 'reset-password', :style =&gt; 'display:none' do -%&gt;
+
+  &lt;hr /&gt;
+  &lt;h5&gt;&lt;%= 'Reset Password'[] %&gt;&lt;/h5&gt;
+
+  &lt;p&gt;&lt;%= 'Enter your email, and a brand new login key will be sent to you.  Click the link in the email to log in, and then change your password.'[:email_directions] %&gt;&lt;/p&gt;
+  &lt;p&gt;&lt;%= text_field_tag :email, &quot;&quot;, :size =&gt; 30 %&gt;&lt;/p&gt;
+  &lt;p&gt;&lt;%= submit_tag 'E-mail me the link'[:email_submit] %&gt;
+    or &lt;%= link_to_function('cancel'[], &quot;$('reset-password').hide()&quot;) %&gt;&lt;/p&gt;
+
+&lt;% end -%&gt;
+
+&lt;%= javascript_tag &quot;$('openid_input').focus();&quot;%&gt;</diff>
      <filename>app/views/sessions/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@
 
 &lt;% end # right content -%&gt;
 
-&lt;% if false#logged_in? %&gt;
+&lt;% if logged_in? %&gt;
 
 &lt;% form_tag monitorship_path(@forum, @topic), :style =&gt; 'margin-top:0em; float:right;' do -%&gt;
 &lt;div&gt;
@@ -58,7 +58,7 @@
 &lt;/h1&gt;
 
 &lt;p class=&quot;subtitle&quot;&gt;
-  &lt;%= feed_icon_tag @topic.title, formatted_forum_topic_posts_path(@forum, @topic, 'atom') %&gt;
+  &lt;%= feed_icon_tag @topic.title, forum_topic_posts_path(@forum, @topic, :format =&gt; 'atom') %&gt;
   &lt;%= '{count} post(s)'[(count=@topic.posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %&gt;, 
   &lt;%= '{count} voice(s)'[(count=@topic.voices.size)==1 ? :voice_count : :voices_count, number_with_delimiter(count)] %&gt;
 &lt;/p&gt;</diff>
      <filename>app/views/topics/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -12,5 +12,9 @@
 &lt;p&gt;&lt;label for=&quot;password_confirmation&quot;&gt;Confirm Password&lt;/label&gt;&lt;br/&gt;
 &lt;%= f.password_field :password_confirmation %&gt;&lt;/p&gt;
 
+&lt;p&gt;&lt;label for=&quot;user_openid_url&quot;&gt;OpenID URL&lt;/label&gt;&lt;br /&gt;
+&lt;%= f.text_field :openid_url %&gt;
+&lt;/p&gt;
+
 &lt;p&gt;&lt;%= submit_tag 'Sign up' %&gt;&lt;/p&gt;
 &lt;% end -%&gt;</diff>
      <filename>app/views/users/new.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -45,7 +45,7 @@
 &lt;h1&gt;&lt;%=h @user.display_name %&gt; &lt;/h1&gt;
 
 &lt;p class=&quot;subtitle&quot;&gt;
-  &lt;%= feed_icon_tag @user.display_name, formatted_user_posts_path(:user_id =&gt; @user, :format =&gt; :rss) %&gt;
+  &lt;%= feed_icon_tag @user.display_name, user_posts_path(:user_id =&gt; @user, :format =&gt; :rss) %&gt;
   &lt;span&gt;
     &lt;%= '{count} topics'[(count=@user.topics.size)==1 ? :topic_count : :topics_count, number_with_delimiter(count)] %&gt;, 
     &lt;%= '{count} posts'[(count=@user.posts.size)==1 ? :post_count : :posts_count, number_with_delimiter(count)] %&gt;</diff>
      <filename>app/views/users/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
 # ENV['RAILS_ENV'] ||= 'production'
 
 # Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION
 
 # Bootstrap the Rails environment, frameworks, and default configuration
 require File.join(File.dirname(__FILE__), 'boot')
@@ -18,6 +18,8 @@ Rails::Initializer.run do |config|
 
   config.gem 'mislav-will_paginate', :lib =&gt; &quot;will_paginate&quot;, 
     :source =&gt; &quot;http://gems.github.com&quot;
+    
+  config.gem &quot;bluecloth&quot;
 
   # Skip frameworks you're not going to use (only works if using vendor/rails).
   # To use Rails without a database, you must remove the Active Record framework</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,10 @@
 ActionController::Routing::Routes.draw do |map|
-  map.resource :session
+  map.open_id_complete '/session', 
+    :controller =&gt; &quot;sessions&quot;, :action =&gt; &quot;create&quot;,
+    :requirements =&gt; { :method =&gt; :get }
 
-  map.resources :sites, :moderatorships
+  map.resources :sites, :moderatorships, :monitorship
+  
 
   map.resources :forums, :has_many =&gt; :posts do |forum|
     forum.resources :topics do |topic|
@@ -11,8 +14,8 @@ ActionController::Routing::Routes.draw do |map|
     forum.resources :posts
   end
   
+  map.user '/users/:id', :controller =&gt; &quot;users&quot;, :action =&gt; &quot;show&quot;
   map.resources :posts, :collection =&gt; {:search =&gt; :get}
-
   map.resources :users, :member =&gt; { :suspend   =&gt; :put,
                                      :settings  =&gt; :get,
                                      :make_admin =&gt; :put,
@@ -26,5 +29,11 @@ ActionController::Routing::Routes.draw do |map|
   map.logout   '/logout',                    :controller =&gt; 'sessions', :action =&gt; 'destroy'
   map.settings '/settings',                  :controller =&gt; 'users',    :action =&gt; 'settings'
   map.resource  :session
+  
+  map.with_options :controller =&gt; 'posts', :action =&gt; 'monitored' do |map|
+    map.formatted_monitored_posts 'users/:user_id/monitored.:format'
+    map.monitored_posts           'users/:user_id/monitored'
+  end
+
   map.root :controller =&gt; 'forums', :action =&gt; 'index'
 end</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20081213180202) do
+ActiveRecord::Schema.define(:version =&gt; 20090317123901) do
 
   create_table &quot;forums&quot;, :force =&gt; true do |t|
     t.integer &quot;site_id&quot;
@@ -41,6 +41,25 @@ ActiveRecord::Schema.define(:version =&gt; 20081213180202) do
     t.boolean  &quot;active&quot;,     :default =&gt; true
   end
 
+  create_table &quot;open_id_authentication_associations&quot;, :force =&gt; true do |t|
+    t.binary  &quot;server_url&quot;
+    t.string  &quot;handle&quot;
+    t.binary  &quot;secret&quot;
+    t.integer &quot;issued&quot;
+    t.integer &quot;lifetime&quot;
+    t.string  &quot;assoc_type&quot;
+  end
+
+  create_table &quot;open_id_authentication_nonces&quot;, :force =&gt; true do |t|
+    t.string  &quot;nonce&quot;
+    t.integer &quot;created&quot;
+  end
+
+  create_table &quot;open_id_authentication_settings&quot;, :force =&gt; true do |t|
+    t.string &quot;setting&quot;
+    t.binary &quot;value&quot;
+  end
+
   create_table &quot;posts&quot;, :force =&gt; true do |t|
     t.integer  &quot;user_id&quot;
     t.integer  &quot;topic_id&quot;</diff>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -201,7 +201,7 @@ module AuthenticatedSystem
     end
     
     def send_remember_cookie!
-      cookies[:auth_token] = {
+      cookies['auth_token'] = {
         :value   =&gt; @current_user.remember_token,
         :expires =&gt; @current_user.remember_token_expires_at }
     end</diff>
      <filename>lib/authenticated_system.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
+require 'redcloth'
 module HtmlFormatting
   protected
   
@@ -5,7 +6,7 @@ module HtmlFormatting
     self.class.formatted_attributes.each do |attr|
       raw    = read_attribute attr
       linked = auto_link(raw) { |text| truncate(text, :length =&gt; 50) }
-      textilized = RedCloth.new(linked, [:hard_breaks])
+      textilized = ::RedCloth.new(linked, [:hard_breaks])
       textilized.hard_breaks = true if textilized.respond_to?(&quot;hard_breaks=&quot;)
       write_attribute &quot;#{attr}_html&quot;, white_list_sanitizer.sanitize(textilized.to_html)
     end</diff>
      <filename>lib/html_formatting.rb</filename>
    </modified>
    <modified>
      <diff>@@ -80,6 +80,19 @@ var PostForm = {
   }
 }
 
+var RowManager = {
+  addMouseBehavior : function(ele){
+    ele.onmouseover = function(e){ 
+      ele.addClassName('topic_over'); 
+    }
+
+    ele.onmouseout = function(e){
+      ele.removeClassName('topic_over');
+    }
+  }
+};
+
+
 Event.addBehavior({
 	'span.time': toTimeAgoInWords,
 	'#search, #reply': function() { this.hide() },
@@ -88,11 +101,20 @@ Event.addBehavior({
 		$('search_box').focus();
 		return false
 	},
-	
+          
+  'tr.forum' : function() {
+    RowManager.addMouseBehavior(this);
+  },
+          
+  'tr.topic' : function(){
+    RowManager.addMouseBehavior(this);
+  },
+
 	'tr.post': function() {
 		var postId = this.id.match(/^post_(\d+)-/)[1]
-                var anchor = this.down(&quot;.edit a&quot;)
-                if(anchor) { PostForm.edit.attach(anchor, postId) };
+    var anchor = this.down(&quot;.edit a&quot;)
+    if(anchor) { PostForm.edit.attach(anchor, postId) };
+    RowManager.addMouseBehavior(this);
 	},
 	
 	'#reply-link': function() {</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -132,31 +132,6 @@ describe PostsController, &quot;GET #show&quot; do
   end
 end
 
-describe PostsController, &quot;GET #new&quot; do
-  include PostsControllerParentObjects
-  define_models
-  act! { get :new, :forum_id =&gt; @forum.to_param, :topic_id =&gt; @topic.to_param }
-  before do
-    @post  = Post.new
-  end
-
-  it_assigns :forum, :topic, :parent =&gt; lambda { @topic }
-
-  it &quot;assigns @post&quot; do
-    act!
-    assigns[:post].should be_new_record
-  end
-  
-  it_renders :template, :new, :pending =&gt; true
-  
-  describe PostsController, &quot;(xml)&quot; do
-    define_models
-    act! { get :new, :forum_id =&gt; @forum.to_param, :topic_id =&gt; @topic.to_param, :format =&gt; 'xml' }
-    it_assigns :forum, :topic, :parent =&gt; lambda { @topic }
-    it_renders :xml, :post
-  end
-end
-
 describe PostsController, &quot;GET #edit&quot; do
   include PostsControllerParentObjects
   act! { get :edit, :forum_id =&gt; @forum.to_param, :topic_id =&gt; @topic.to_param, :id =&gt; @post.to_param }
@@ -185,7 +160,7 @@ describe PostsController, &quot;POST #create&quot; do
     act! { post :create, :forum_id =&gt; @forum.to_param, :topic_id =&gt; @topic.to_param, :post =&gt; {:body =&gt; ''} }
 
     it_assigns :post, :forum, :topic, :parent =&gt; lambda { @topic }
-    it_renders :template, :new, :pending =&gt; true
+    it_redirects_to { forum_topic_url(@forum, @topic) }
   end
   
   describe PostsController, &quot;(successful creation, xml)&quot; do</diff>
      <filename>spec/controllers/posts_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@ describe SessionsController, &quot;DELETE /destroy&quot; do
   it_redirects_to { '/' }
 
   it 'deletes token on logout' do
-    acting.cookies[&quot;auth_token&quot;].should == []
+    acting.cookies[&quot;auth_token&quot;].should be_nil
   end
 end
 </diff>
      <filename>spec/controllers/sessions_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,7 @@ describe SitesController, &quot;GET #new&quot; do
   act! { get :new }
 
   before do
+    @controller.stub!(:admin_required).and_return(true)
     login_as :default
   end
 
@@ -95,6 +96,7 @@ describe SitesController, &quot;POST #create&quot; do
   before do
     login_as :default
     @attributes = {:name =&gt; 'yow'}
+    @controller.stub!(:admin_required).and_return(true)
   end
   
   describe SitesController, &quot;(successful creation)&quot; do</diff>
      <filename>spec/controllers/sites_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -71,7 +71,8 @@ describe UsersController do
   end
   
   it &quot;sends an email to the user on create&quot; do
-    pending &quot;Email functionality has not been written&quot;
+    create_user :login =&gt; &quot;admin&quot;, :email =&gt; &quot;admin@example.com&quot;
+    response.should be_redirect
     lambda{ create_user }.should change(ActionMailer::Base.deliveries, :size).by(1)
   end
   
@@ -133,7 +134,7 @@ describe UsersController, &quot;PUT #make_admin&quot; do
     it &quot;sets admin&quot; do
       user = users(:default)
       user.admin.should be_false
-      put :make_admin, :id =&gt; users(:default).to_param, :user =&gt; { :admin =&gt; &quot;1&quot; }
+      put :make_admin, :id =&gt; users(:default).id, :user =&gt; { :admin =&gt; &quot;1&quot; }
       user.reload.admin.should be_true
     end
     
@@ -141,13 +142,14 @@ describe UsersController, &quot;PUT #make_admin&quot; do
       user = users(:default)
       user.update_attribute :admin, true
       user.admin.should be_true
-      put :make_admin, :id =&gt; users(:default).to_param, :user =&gt; { }
+      put :make_admin, :id =&gt; users(:default).id, :user =&gt; { }
       user.reload.admin.should be_false
     end
   end
 end
 
 describe UsersController, &quot;PUT #update&quot; do
+  define_models :users
   before do
     login_as :default
     current_site :default
@@ -156,7 +158,7 @@ describe UsersController, &quot;PUT #update&quot; do
   
   describe UsersController, &quot;(successful save)&quot; do
     define_models
-    act! { put :update, :id =&gt; @user.to_param, :user =&gt; @attributes }
+    act! { put :update,{ :id =&gt; @user.id, :user =&gt; @attributes }}
 
     before do
       @user.stub!(:save).and_return(true)
@@ -167,18 +169,22 @@ describe UsersController, &quot;PUT #update&quot; do
 
     describe &quot;updating from edit form&quot; do
       define_models :stubbed
-      %w(display_name openid_url website bio).each do |field|
-      it &quot;should update #{field}&quot; do
-        put :update, :id =&gt; @user.to_param, :user =&gt; { field, &quot;test&quot; }
-        assigns(:user).attributes[field].should == &quot;test&quot;
+      %w(display_name website bio).each do |field|
+        it &quot;should update #{field}&quot; do
+          put :update, :id =&gt; @user.id, :user =&gt; { field =&gt; &quot;test&quot; }
+          assigns(:user).attributes[field].should == &quot;test&quot;
+        end
       end
+      it &quot;should update openid_url&quot; do
+        put :update, :id =&gt; @user.id, :user =&gt; { 'openid_url' =&gt; 'test' }
+        assigns(:user).attributes['openid_url'].should == 'http://test/'
       end
     end
   end
   
   describe UsersController, &quot;(successful save, xml)&quot; do
     define_models
-    act! { put :update, :id =&gt; @user.to_param, :user =&gt; @attributes, :format =&gt; 'xml' }
+    act! { put :update, :id =&gt; @user.id, :user =&gt; @attributes, :format =&gt; 'xml' }
 
     before do
       @user.stub!(:save).and_return(true)
@@ -190,7 +196,7 @@ describe UsersController, &quot;PUT #update&quot; do
 
   describe UsersController, &quot;(unsuccessful save)&quot; do
     define_models
-    act! { put :update, :id =&gt; @user.to_param, :user =&gt; {:email =&gt; ''} }
+    act! { put :update, :id =&gt; @user.id, :user =&gt; {:email =&gt; ''} }
     
     it_assigns :user
     it_renders :template, :edit
@@ -198,7 +204,7 @@ describe UsersController, &quot;PUT #update&quot; do
   
   describe UsersController, &quot;(unsuccessful save, xml)&quot; do
     define_models
-    act! { put :update, :id =&gt; @user.to_param, :user =&gt; {:email =&gt; ''}, :format =&gt; 'xml' }
+    act! { put :update, :id =&gt; @user.id, :user =&gt; {:email =&gt; ''}, :format =&gt; 'xml' }
     
     it_assigns :user
     it_renders :xml, :status =&gt; :unprocessable_entity do</diff>
      <filename>spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,12 @@ describe User do
       end
     end
   
+    it 'logs in with openid' do
+      u = sites(:default).users.new(:openid_url =&gt; 'http://foo', :email =&gt; 'zoe@girl.com')
+      u.login = 'zoegirl'
+      assert u.valid?, u.errors.inspect
+    end
+
     it 'increments User.count' do
       @creating_user.should change(User, :count).by(1)
     end</diff>
      <filename>spec/models/user_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7a8990e61f1c8b0f9f2f8eeccbe11475b9779851</id>
    </parent>
    <parent>
      <id>726bb9c56a1add65e6f5afcadbaaf9c399bd19a3</id>
    </parent>
  </parents>
  <author>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </author>
  <url>http://github.com/courtenay/altered_beast/commit/4c237a2ed5deec7725ccbb87d49cf9af4ece3387</url>
  <id>4c237a2ed5deec7725ccbb87d49cf9af4ece3387</id>
  <committed-date>2009-08-05T17:06:09-07:00</committed-date>
  <authored-date>2009-08-05T17:06:09-07:00</authored-date>
  <message>Merge branch 'master' into i18n

Conflicts:
	app/controllers/sessions_controller.rb
	app/controllers/users_controller.rb
	app/views/forums/index.html.erb
	app/views/forums/show.html.erb
	app/views/layouts/_head.html.erb
	app/views/sessions/new.html.erb
	app/views/topics/show.html.erb
	app/views/users/new.rhtml
	public/javascripts/application.js</message>
  <tree>96cf81f32f7494a72494571793698f1a30f6365e</tree>
  <committer>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </committer>
</commit>
