<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,7 +8,7 @@ task :default =&gt; :test
 
 spec = Gem::Specification.new do |spec|
   spec.name             = 'has_digest'
-  spec.version          = '0.1.1'
+  spec.version          = '0.1.2'
   spec.summary          = 'ActiveRecord macro that helps encrypt passwords and generate api tokens before_save.'
   spec.files            = FileList['README.rdoc', 'MIT-LICENSE', 'init.rb', 'lib/**/*.rb', 'shoulda_macros/**/*.rb', 'test/**/*.rb'].to_a
   spec.has_rdoc         = true</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,18 +2,18 @@
 
 Gem::Specification.new do |s|
   s.name = %q{has_digest}
-  s.version = &quot;0.1.1&quot;
+  s.version = &quot;0.1.2&quot;
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;Matthew Todd&quot;]
-  s.date = %q{2008-11-11}
+  s.date = %q{2008-12-02}
   s.email = %q{matthew.todd@gmail.com}
   s.extra_rdoc_files = [&quot;README.rdoc&quot;, &quot;shoulda_macros/has_digest.rb&quot;]
   s.files = [&quot;README.rdoc&quot;, &quot;MIT-LICENSE&quot;, &quot;init.rb&quot;, &quot;lib/has_digest.rb&quot;, &quot;shoulda_macros/has_digest.rb&quot;, &quot;test/has_digest_test.rb&quot;, &quot;test/test_helper.rb&quot;]
   s.has_rdoc = true
-  s.rdoc_options = [&quot;--main&quot;, &quot;README.rdoc&quot;, &quot;--title&quot;, &quot;has_digest-0.1.1&quot;, &quot;--inline-source&quot;, &quot;--line-numbers&quot;]
+  s.rdoc_options = [&quot;--main&quot;, &quot;README.rdoc&quot;, &quot;--title&quot;, &quot;has_digest-0.1.2&quot;, &quot;--inline-source&quot;, &quot;--line-numbers&quot;]
   s.require_paths = [&quot;lib&quot;]
-  s.rubygems_version = %q{1.3.0}
+  s.rubygems_version = %q{1.3.1}
   s.summary = %q{ActiveRecord macro that helps encrypt passwords and generate api tokens before_save.}
 
   if s.respond_to? :specification_version then</diff>
      <filename>has_digest.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require 'digest/sha1'
 
 module HasDigest
   def self.included(base) # :nodoc:
-    base.before_save :generate_has_digest_attributes
+    base.before_save :generate_has_digest_attributes, :unless =&gt; lambda { |record| record.class.has_digest_attributes.empty? }
     base.extend(ClassMethods)
   end
 </diff>
      <filename>lib/has_digest.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,6 +97,18 @@ class HasDigestTest &lt; Test::Unit::TestCase
     end
   end
 
+  context 'Model with a magic salt column' do
+    setup { @klass = model_with_attributes(:salt) }
+
+    context 'saved instance' do
+      setup { @instance = @klass.create }
+
+      should 'not have digested salt attribute' do
+        assert_nil @instance.salt
+      end
+    end
+  end
+
   context 'Model with a magic salt column and an attribute-based digest' do
     setup do
       @klass = model_with_attributes(:salt, :encrypted_password) do</diff>
      <filename>test/has_digest_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c9793a8134933b4ecd328ebf0228e39db6d2ee1a</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Todd</name>
    <email>matthew.todd@gmail.com</email>
  </author>
  <url>http://github.com/matthewtodd/has_digest/commit/2a41691cd06bd4a8621e3054e6973e7b688f020f</url>
  <id>2a41691cd06bd4a8621e3054e6973e7b688f020f</id>
  <committed-date>2008-12-02T05:22:37-08:00</committed-date>
  <authored-date>2008-12-02T05:22:37-08:00</authored-date>
  <message>Bugfix: don't write the salt column unless has_digest has been called.</message>
  <tree>9f207ccd1173460463a74bd27c859ece68e6046d</tree>
  <committer>
    <name>Matthew Todd</name>
    <email>matthew.todd@gmail.com</email>
  </committer>
</commit>
