<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,6 @@ Example:
     body_has_length :below =&gt; 256
   end
 
-
 ==Predicates
 
 ===aliased
@@ -50,10 +49,12 @@ Example:
 ===blacklisted
 Use when you need to make sure some value is NOT saved. Maybe you've reserved some for yourself?
 
+By default this is not case sensitive. Which means that by default this assumes you only have strings. If you need to blacklist other data types, set :case_sensitive =&gt; false.
+
 Example:
 
   class User &lt; ActiveRecord::Base
-    username_is_blacklisted :options =&gt; %w(admin superadmin god user anonymous)
+    username_is_blacklisted :restricted =&gt; %w(admin superadmin god user anonymous)
   end
 
 ===domain
@@ -77,13 +78,15 @@ Example:
 ===enumerated aka whitelisted
 Use when you want to limit the values a field may have. Useful for constraining polymorphic associations! Note that because of how required-ness is handled, if a field is empty this predicate will not be evaluated.
 
+Note that this predicate implies required-ness.
+
 Example:
 
   class Favorite &lt; ActiveRecord::Base
     belongs_to :favoritable, :polymorphic =&gt; true
     
     # only allow favoriting of a User or Project
-    favoritable_is_enumerated :options =&gt; %w(User Project)
+    favoritable_type_is_enumerated :options =&gt; %w(User Project)
   end
 
 ===hex_color
@@ -95,8 +98,8 @@ Example:
     background_is_hex_color
   end
 
-===length
-Use when you need to set an upper or lower boundary on the length of a field.
+===length aka size
+Use when you need to set an upper or lower boundary on the length of a field. Note that this also works on arrays and hashes.
 
 Example:
 
@@ -114,7 +117,7 @@ Example:
 
   class Auction &lt; ActiveRecord::Base
     buyout_is_number :integer =&gt; true
-    bid_increment_is_number :above =&gt; 5, :inclusive =&gt; true
+    bid_increment_is_number :at_least =&gt; 5
     quantity_is_number :range =&gt; 1..10
   end
 
@@ -151,9 +154,19 @@ Example:
   end
 
 ===time
-Use when you have a time field that needs to be constrained on the timeline.
+Use when you have a time field that needs to be constrained on the timeline. You may set your constraint either absolutely (e.g. after Jan 1, 2005) or relatively (e.g. no older than 5 minutes from now).
+
+Example:
 
-This one needs to be more useful. It needs to compare times vs now, e.g. :before =&gt; :now or :after =&gt; &quot;2.days.ago&quot;.
+  class Project &lt; ActiveRecord::Base
+    # this deadline must be after Jan 1, 2005
+    deadline_is_time :after =&gt; Time.parse(&quot;2005-01-01 00:00:00&quot;)
+  end
+  
+  class Project &lt; ActiveRecord::Base
+    # this deadline must be no older than 5 days and no further in the future than 1 week, as of the time of validation.
+    deadline_is_time :distance =&gt; (-5.days)..(1.week)
+  end
 
 ===unique
 Use when you need an attribute to be unique, possibly in the scope of some other attributes. By default this is not case sensitive.</diff>
      <filename>gist.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -11,4 +11,4 @@ class Predicates::Aliased &lt; Predicates::Enumerated
   def normalize(v)
     options.index(v)
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/aliased.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ module Predicates
     end
     
     def error
-      I18n.t(error_message, error_binds.merge(:scope =&gt; 'semantic-attributes.errors.messages'))
+      error_message.is_a?(Symbol) ? I18n.t(error_message, error_binds.merge(:scope =&gt; 'semantic-attributes.errors.messages')) : error_message
     end
 
     # a condition to restrict when validation should occur. if it returns false, the validation will not happen.</diff>
      <filename>lib/predicates/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,4 +28,4 @@ class Predicates::Domain &lt; Predicates::Base
   def with_protocol(value)
     !value or value.include?(&quot;://&quot;) ? value : &quot;http://#{value}&quot;
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/domain.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,4 +39,4 @@ class Predicates::Email &lt; Predicates::Base
       Regexp::EXTENDED | Regexp::IGNORECASE
     )
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/email.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,4 @@ class Predicates::Enumerated &lt; Predicates::Base
   def validate(value, record)
     self.options.include? value
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/enumerated.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,4 +21,4 @@ class Predicates::HexColor &lt; Predicates::Pattern
 
     value
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/hex_color.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,4 +101,4 @@ class Predicates::Number &lt; Predicates::Base
     # if it has no endpoints
     :not_a_number
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/number.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,4 +19,4 @@ class Predicates::Pattern &lt; Predicates::Base
     value = value.to_s if [Symbol, Fixnum].include?(value.class)
     value.match(self.like)
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/pattern.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,4 +58,4 @@ class Predicates::PhoneNumber &lt; Predicates::Base
   class Patterns
     NANP = /\A\+1([2-9][0-8][0-9])([2-9][0-9]{2})([0-9]{4})\Z/
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/phone_number.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,4 +19,4 @@ class Predicates::Required &lt; Predicates::Base
   def validate(value, record)
     !value.blank?
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/required.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,8 +10,8 @@ class Predicates::SameAs &lt; Predicates::Base
   def error_message
     @error_message ||= :same_as
   end
-
+  
   def validate(value, record)
     value == record.send(self.method)
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/same_as.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,4 +40,4 @@ class Predicates::Time &lt; Predicates::Base
 
     valid
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ class Predicates::Unique &lt; Predicates::Base
       end
     else
       # non-text comparison
-      [&quot;#{quoted_field} #{klass.send(:attribute_condition, value)}&quot;, value]
+      [klass.send(:attribute_condition, quoted_field, value), value]
     end
   end
   </diff>
      <filename>lib/predicates/unique.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,4 +59,4 @@ class Predicates::Url &lt; Predicates::Base
   rescue URI::InvalidURIError
     v
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/url.rb</filename>
    </modified>
    <modified>
      <diff>@@ -84,4 +84,4 @@ class Predicates::UsaState &lt; Predicates::Aliased
     'Wisconsin' =&gt; 'WI',
     'Wyoming' =&gt; 'WY'
   }
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/usa_state.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,4 +22,4 @@ class Predicates::UsaZipCode &lt; Predicates::Pattern
   def error_message
     @error_message || :us_zip_code
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/predicates/usa_zip_code.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
 # load the support libraries
 require 'test/unit'
 require 'rubygems'
-gem 'rails', '2.3.0'
+gem 'rails', '2.3.2'
 require 'active_record'
 require 'active_record/fixtures'
 require 'mocha'</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -44,4 +44,10 @@ class BasePredicateTest &lt; SemanticAttributes::TestCase
     predicate.message = &quot;another thing&quot;
     assert_equal &quot;another thing&quot;, predicate.error_message
   end
+  
+  def test_string_errors_are_preserved
+    predicate = Predicates::Base.new(:foo)
+    predicate.error_message = &quot;something&quot;
+    assert_equal &quot;something&quot;, predicate.error
+  end
 end</diff>
      <filename>test/unit/predicates/base_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fecaddfe7804cacedf40f17e20bca6d3e5470b4a</id>
    </parent>
  </parents>
  <author>
    <name>Edwin Moss</name>
    <email>edwin.moss@gmail.com</email>
  </author>
  <url>http://github.com/edwinmoss/semantic-attributes/commit/a2ab241b7a7f079202fe41ca1c3967de67f4dc42</url>
  <id>a2ab241b7a7f079202fe41ca1c3967de67f4dc42</id>
  <committed-date>2009-04-11T22:41:15-07:00</committed-date>
  <authored-date>2009-04-11T22:41:15-07:00</authored-date>
  <message>Merge with root.</message>
  <tree>e413e94fb428e9ae42eebdcdca797ec09bdcb2a1</tree>
  <committer>
    <name>Edwin Moss</name>
    <email>edwin.moss@gmail.com</email>
  </committer>
</commit>
