<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/authlogic/test_case/mock_logger.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,6 @@
 == 2.0.5
 
 * Stub out authenticate_with_http_basic for TestCase::Controller adapter.
-* Added validates_login_field_options, validates_email_field_options, and validates_password_field_options to apply universal options for each fields validation calls.
 
 == 2.0.4 released 2009-3-28
 </diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,6 @@ Hoe.new(&quot;Authlogic&quot;, Authlogic::Version::STRING) do |p|
   p.readme_file = &quot;README.rdoc&quot;
   p.extra_rdoc_files = [&quot;CHANGELOG.rdoc&quot;, &quot;README.rdoc&quot;]
   p.remote_rdoc_dir = ''
-  p.test_globs = [&quot;test/*/test_*.rb&quot;, &quot;test/*/*_test.rb&quot;]
+  p.test_globs = [&quot;test/*/test_*.rb&quot;, &quot;test/*_test.rb&quot;, &quot;test/*/*_test.rb&quot;]
   p.extra_deps = %w(activesupport)
-  p.post_install_message = &quot;Version 2.0 introduces some changes that break backwards compatibility. The big change is how acts_as_authentic accepts configuration options. Instead of a hash, it now accepts a block: acts_as_authentic { |c| c.my_config_option = my_value}. See the docs for more details.&quot;
 end
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -62,8 +62,7 @@ module Authlogic
         
           def config(key, value, default_value = nil, read_value = nil)
             if value == read_value
-              return read_inheritable_attribute(key) if inheritable_attributes.include?(key)
-              write_inheritable_attribute(key, default_value)
+              inheritable_attributes.include?(key) ? read_inheritable_attribute(key) : default_value
             else
               write_inheritable_attribute(key, value)
             end
@@ -73,6 +72,7 @@ module Authlogic
             columns_to_check.each { |column_name| return column_name.to_sym if column_names.include?(column_name.to_s) }
             columns_to_check.first ? columns_to_check.first.to_sym : nil
           end
+
       end
     end
   end</diff>
      <filename>lib/authlogic/acts_as_authentic/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,16 +32,6 @@ module Authlogic
         end
         alias_method :validate_email_field=, :validate_email_field
         
-        # This allows you to set options to be applied to ANY of the validations called on the email field. So only use options
-        # that are universally supported by all of the validation functions. Such as :if or :unless, etc.
-        #
-        # * &lt;tt&gt;Default:&lt;/tt&gt; {}
-        # * &lt;tt&gt;Accepts:&lt;/tt&gt; A hash of options universally supported by the validation func
-        def validates_email_field_options(value = nil)
-          config(:validates_email_field_options, value, {})
-        end
-        alias_method :validates_email_field_options=, :validates_email_field_options
-        
         # A hash of options for the validates_length_of call for the email field. Allows you to change this however you want.
         #
         # * &lt;tt&gt;Default:&lt;/tt&gt; {:within =&gt; 6..100}
@@ -84,9 +74,9 @@ module Authlogic
         def self.included(klass)
           klass.class_eval do
             if validate_email_field &amp;&amp; email_field
-              validates_length_of email_field, validates_email_field_options.merge(validates_length_of_email_field_options)
-              validates_format_of email_field, validates_email_field_options.merge(validates_format_of_email_field_options)
-              validates_uniqueness_of email_field, validates_email_field_options.merge(validates_uniqueness_of_email_field_options)
+              validates_length_of email_field, validates_length_of_email_field_options
+              validates_format_of email_field, validates_format_of_email_field_options
+              validates_uniqueness_of email_field, validates_uniqueness_of_email_field_options
             end
           end
         end</diff>
      <filename>lib/authlogic/acts_as_authentic/email.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,16 +29,6 @@ module Authlogic
         end
         alias_method :validate_login_field=, :validate_login_field
         
-        # This allows you to set options to be applied to ANY of the validations called on the login field. So only use options
-        # that are universally supported by all of the validation functions. Such as :if or :unless, etc.
-        #
-        # * &lt;tt&gt;Default:&lt;/tt&gt; {}
-        # * &lt;tt&gt;Accepts:&lt;/tt&gt; A hash of options universally supported by the validation func
-        def validates_login_field_options(value = nil)
-          config(:validates_login_field_options, value, {})
-        end
-        alias_method :validates_login_field_options=, :validates_login_field_options
-        
         # A hash of options for the validates_length_of call for the login field. Allows you to change this however you want.
         #
         # * &lt;tt&gt;Default:&lt;/tt&gt; {:within =&gt; 6..100}
@@ -72,9 +62,9 @@ module Authlogic
         def self.included(klass)
           klass.class_eval do
             if validate_login_field &amp;&amp; login_field
-              validates_length_of login_field, validates_login_field_options.merge(validates_length_of_login_field_options)
-              validates_format_of login_field, validates_login_field_options.merge(validates_format_of_login_field_options)
-              validates_uniqueness_of login_field, validates_login_field_options.merge(validates_uniqueness_of_login_field_options)
+              validates_length_of login_field, validates_length_of_login_field_options
+              validates_format_of login_field, validates_format_of_login_field_options
+              validates_uniqueness_of login_field, validates_uniqueness_of_login_field_options
             end
           end
         end</diff>
      <filename>lib/authlogic/acts_as_authentic/login.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,16 +40,6 @@ module Authlogic
         end
         alias_method :validate_password_field=, :validate_password_field
         
-        # This allows you to set options to be applied to ANY of the validations called on the password field. So only use options
-        # that are universally supported by all of the validation functions. Such as :if or :unless, etc.
-        #
-        # * &lt;tt&gt;Default:&lt;/tt&gt; {}
-        # * &lt;tt&gt;Accepts:&lt;/tt&gt; A hash of options universally supported by the validation func
-        def validates_password_field_options(value = nil)
-          config(:validates_password_field_options, value, {})
-        end
-        alias_method :validates_password_field_options=, :validates_password_field_options
-        
         # A hash of options for the validates_length_of call for the password field. Allows you to change this however you want.
         #
         # * &lt;tt&gt;Default:&lt;/tt&gt; {:minimum =&gt; 4, :if =&gt; :require_password?}
@@ -64,7 +54,7 @@ module Authlogic
         # * &lt;tt&gt;Default:&lt;/tt&gt; {:minimum =&gt; 4, :if =&gt; &quot;#{password_salt_field}_changed?&quot;.to_sym}
         # * &lt;tt&gt;Accepts:&lt;/tt&gt; Hash of options accepted by validates_confirmation_of
         def validates_confirmation_of_password_field_options(value = nil)
-          config(:validates_confirmation_of_password_field_options, value, {:minimum =&gt; 4, :if =&gt; (password_salt_field ? &quot;#{password_salt_field}_changed?&quot;.to_sym : nil)})
+          config(:validates_confirmation_of_password_field_options, value, {:minimum =&gt; 4, :if =&gt; :require_password?})
         end
         alias_method :validates_confirmation_of_password_field_options=, :validates_confirmation_of_password_field_options
         
@@ -130,9 +120,9 @@ module Authlogic
         def self.included(klass)
           klass.class_eval do
             if validate_password_field
-              validates_length_of :password, validates_password_field_options.merge(validates_length_of_password_field_options)
-              validates_confirmation_of :password, validates_password_field_options.merge(validates_confirmation_of_password_field_options)
-              validates_length_of :password_confirmation, validates_password_field_options.merge(validates_length_of_password_confirmation_field_options)
+              validates_length_of :password, validates_length_of_password_field_options
+              validates_confirmation_of :password, validates_confirmation_of_password_field_options
+              validates_length_of :password_confirmation, validates_length_of_password_confirmation_field_options
             end
           end
         end
@@ -150,6 +140,7 @@ module Authlogic
           @password = pass
           send(&quot;#{password_salt_field}=&quot;, Authlogic::Random.friendly_token) if password_salt_field
           send(&quot;#{crypted_password_field}=&quot;, crypto_provider.encrypt(*encrypt_arguments(@password, act_like_restful_authentication? ? :restful_authentication : nil)))
+          @password_changed = true
           after_password_set
         end
         
@@ -211,7 +202,11 @@ module Authlogic
           end
           
           def require_password?
-            new_record? || (password_salt_field &amp;&amp; send(&quot;#{password_salt_field}_changed?&quot;)) || send(crypted_password_field).blank?
+            new_record? || password_changed? || send(crypted_password_field).blank?
+          end
+          
+          def password_changed?
+            @password_changed == true
           end
           
           def crypted_password_field</diff>
      <filename>lib/authlogic/acts_as_authentic/password.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,8 @@
-require &quot;authlogic/test_case/controller_adapter&quot;
-require &quot;authlogic/test_case/mock_cookie_jar&quot;
-require &quot;authlogic/test_case/mock_request&quot;
-require &quot;authlogic/test_case/mock_controller&quot;
+require File.dirname(__FILE__) + &quot;/test_case/controller_adapter&quot;
+require File.dirname(__FILE__) + &quot;/test_case/mock_cookie_jar&quot;
+require File.dirname(__FILE__) + &quot;/test_case/mock_controller&quot;
+require File.dirname(__FILE__) + &quot;/test_case/mock_logger&quot;
+require File.dirname(__FILE__) + &quot;/test_case/mock_request&quot;
 
 module Authlogic
   # This is a collection of methods and classes that help you easily test Authlogic. In fact, I use these same tools</diff>
      <filename>lib/authlogic/test_case.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,10 @@ module Authlogic
       def cookie_domain
         nil
       end
+      
+      def logger
+        @logger ||= MockLogger.new
+      end
   
       def params
         @params ||= {}</diff>
      <filename>lib/authlogic/test_case/mock_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,10 @@
 module Authlogic
   module TestCase
     class MockRequest # :nodoc:
+      def request_method
+        nil
+      end
+      
       def remote_ip
         &quot;1.1.1.1&quot;
       end</diff>
      <filename>lib/authlogic/test_case/mock_request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,17 +22,6 @@ module ActsAsAuthenticTest
       assert User.validate_email_field
     end
     
-    def test_validates_email_field_options_config
-      default = {}
-      assert_equal default, User.validates_email_field_options
-      assert_equal default, Employee.validates_email_field_options
-      
-      User.validates_email_field_options = {:yes =&gt; &quot;no&quot;}
-      assert_equal({:yes =&gt; &quot;no&quot;}, User.validates_email_field_options)
-      User.validates_email_field_options default
-      assert_equal default, User.validates_email_field_options
-    end
-    
     def test_validates_length_of_email_field_options_config
       assert_equal({:within =&gt; 6..100}, User.validates_length_of_email_field_options)
       assert_equal({:within =&gt; 6..100}, Employee.validates_length_of_email_field_options)</diff>
      <filename>test/acts_as_authentic_test/email_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,17 +22,6 @@ module ActsAsAuthenticTest
       assert User.validate_login_field
     end
     
-    def test_validates_login_field_options_config
-      default = {}
-      assert_equal default, User.validates_login_field_options
-      assert_equal default, Employee.validates_login_field_options
-      
-      User.validates_login_field_options = {:yes =&gt; &quot;no&quot;}
-      assert_equal({:yes =&gt; &quot;no&quot;}, User.validates_login_field_options)
-      User.validates_login_field_options default
-      assert_equal default, User.validates_login_field_options
-    end
-    
     def test_validates_length_of_login_field_options_config
       assert_equal({:within =&gt; 3..100}, User.validates_length_of_login_field_options)
       assert_equal({:within =&gt; 3..100}, Employee.validates_length_of_login_field_options)</diff>
      <filename>test/acts_as_authentic_test/login_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,17 +32,6 @@ module ActsAsAuthenticTest
       assert User.validate_password_field
     end
     
-    def test_validates_password_field_options_config
-      default = {}
-      assert_equal default, User.validates_password_field_options
-      assert_equal default, Employee.validates_password_field_options
-      
-      User.validates_password_field_options = {:yes =&gt; &quot;no&quot;}
-      assert_equal({:yes =&gt; &quot;no&quot;}, User.validates_password_field_options)
-      User.validates_password_field_options default
-      assert_equal default, User.validates_password_field_options
-    end
-    
     def test_validates_length_of_password_field_options_config
       default = {:minimum =&gt; 4, :if =&gt; :require_password?}
       assert_equal default, User.validates_length_of_password_field_options
@@ -55,7 +44,7 @@ module ActsAsAuthenticTest
     end
     
     def test_validates_confirmation_of_password_field_options_config
-      default = {:minimum =&gt; 4, :if =&gt; &quot;#{User.password_salt_field}_changed?&quot;.to_sym}
+      default = {:minimum =&gt; 4, :if =&gt; :require_password?}
       assert_equal default, User.validates_confirmation_of_password_field_options
       assert_equal default, Employee.validates_confirmation_of_password_field_options
       </diff>
      <filename>test/acts_as_authentic_test/password_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../test_helper.rb'
+require File.dirname(__FILE__) + '/test_helper.rb'
 
 class RandomTest &lt; ActiveSupport::TestCase
   def test_random_tokens_have_consisten_length
@@ -36,7 +36,7 @@ class RandomTest &lt; ActiveSupport::TestCase
     def reload_authlogic_with_sec_random!(secure_random, enabled = true)
       silence_warnings do
         secure_random.parent.const_set(secure_random.name.sub(&quot;#{secure_random.parent}::&quot;, ''), enabled ? secure_random : nil)
-        load(File.dirname(__FILE__) + '/../../lib/authlogic/random.rb')
+        load(File.dirname(__FILE__) + '/../lib/authlogic/random.rb')
       end
     end
 </diff>
      <filename>test/random_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ module SessionTest
         assert UserSession.activated?
         Authlogic::Session::Base.controller = nil
         assert !UserSession.activated?
+        debugger
       end
     
       def test_controller</diff>
      <filename>test/session_test/activation_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require &quot;test/unit&quot;
 require &quot;rubygems&quot;
 require &quot;ruby-debug&quot;
 require &quot;active_record&quot;
-require 'active_record/fixtures'
+require &quot;active_record/fixtures&quot;
 
 ActiveRecord::Schema.verbose = false
 ActiveRecord::Base.establish_connection(:adapter =&gt; &quot;sqlite3&quot;, :dbfile =&gt; &quot;:memory:&quot;)</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ff5fbf1dedb4c094b0367988b3a8eb9fedcbabd</id>
    </parent>
  </parents>
  <author>
    <name>binarylogic</name>
    <email>bjohnson@binarylogic.com</email>
  </author>
  <url>http://github.com/binarylogic/authlogic/commit/55ccfa206066481ddbe73f7f9f2ed85823e97aa0</url>
  <id>55ccfa206066481ddbe73f7f9f2ed85823e97aa0</id>
  <committed-date>2009-03-29T20:42:17-07:00</committed-date>
  <authored-date>2009-03-29T20:42:17-07:00</authored-date>
  <message>Add a mock_logger for testing</message>
  <tree>641f9118f4686ae24eba5286fb385ceec25a1196</tree>
  <committer>
    <name>binarylogic</name>
    <email>bjohnson@binarylogic.com</email>
  </committer>
</commit>
