<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,7 @@ module CouchRest
     end
     
     # returns true if the document has never been saved
-    def new_document?
+    def new?
       !rev
     end
     
@@ -67,7 +67,7 @@ module CouchRest
     
     # Returns the CouchDB uri for the document
     def uri(append_rev = false)
-      return nil if new_document?
+      return nil if new?
       couch_uri = &quot;http://#{database.uri}/#{CGI.escape(id)}&quot;
       if append_rev == true
         couch_uri &lt;&lt; &quot;?rev=#{rev}&quot;</diff>
      <filename>lib/couchrest/core/document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module CouchRest
       end
       
       def apply_defaults
-        return if self.respond_to?(:new_document?) &amp;&amp; (new_document? == false)
+        return if self.respond_to?(:new?) &amp;&amp; (new? == false)
         return unless self.class.respond_to?(:properties) 
         return if self.class.properties.empty?
         # TODO: cache the default object</diff>
      <filename>lib/couchrest/mixins/properties.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,10 +37,10 @@ module CouchRest
     
     # False if the casted model has already
     # been saved in the containing document
-    def new_model?
+    def new?
       !@document_saved
     end
-    alias :new_record? :new_model?
+    alias :new_record? :new?
     
     # Sets the attributes from a hash
     def update_attributes_without_saving(hash)</diff>
      <filename>lib/couchrest/more/casted_model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ module CouchRest
         
         save_callback :before do |object|
           object['updated_at'] = Time.now
-          object['created_at'] = object['updated_at'] if object.new_document?
+          object['created_at'] = object['updated_at'] if object.new?
         end
       EOS
     end
@@ -145,7 +145,7 @@ module CouchRest
     end
 
     # for compatibility with old-school frameworks
-    alias :new_record? :new_document?
+    alias :new_record? :new?
     
     # Trigger the callbacks (before, after, around)
     # and create the document
@@ -166,7 +166,7 @@ module CouchRest
     # unlike save, create returns the newly created document
     def create_without_callbacks(bulk =false)
       raise ArgumentError, &quot;a document requires a database to be created to (The document or the #{self.class} default database were not set)&quot; unless database
-      set_unique_id if new_document? &amp;&amp; self.respond_to?(:set_unique_id)
+      set_unique_id if new? &amp;&amp; self.respond_to?(:set_unique_id)
       result = database.save_doc(self, bulk)
       (result[&quot;ok&quot;] == true) ? self : false
     end
@@ -181,7 +181,7 @@ module CouchRest
     # only if the document isn't new
     def update(bulk = false)
       caught = catch(:halt)  do
-        if self.new_document?
+        if self.new?
           save(bulk)
         else
           _run_update_callbacks do
@@ -197,7 +197,7 @@ module CouchRest
     # and save the document
     def save(bulk = false)
       caught = catch(:halt)  do
-        if self.new_document?
+        if self.new?
           _run_save_callbacks do
             save_without_callbacks(bulk)
           end
@@ -211,7 +211,7 @@ module CouchRest
     # Returns a boolean value
     def save_without_callbacks(bulk = false)
       raise ArgumentError, &quot;a document requires a database to be saved to (The document or the #{self.class} default database were not set)&quot; unless database
-      set_unique_id if new_document? &amp;&amp; self.respond_to?(:set_unique_id)
+      set_unique_id if new? &amp;&amp; self.respond_to?(:set_unique_id)
       result = database.save_doc(self, bulk)
       mark_as_saved if result[&quot;ok&quot;] == true
       result[&quot;ok&quot;] == true</diff>
      <filename>lib/couchrest/more/extended_document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -280,7 +280,7 @@ describe CouchRest::CastedModel do
     end
   end
   
-  describe &quot;calling new_model? on a casted model&quot; do
+  describe &quot;calling new? on a casted model&quot; do
     before :each do
       reset_test_db!
       @cat = Cat.new(:name =&gt; 'Sockington')
@@ -289,35 +289,35 @@ describe CouchRest::CastedModel do
     end
     
     it &quot;should be true on new&quot; do
-      CatToy.new.new_model?.should be_true
+      CatToy.new.should be_new
       CatToy.new.new_record?.should be_true
     end
     
     it &quot;should be true after assignment&quot; do
-      @cat.favorite_toy.new_model?.should be_true
-      @cat.toys.first.new_model?.should be_true
+      @cat.favorite_toy.should be_new
+      @cat.toys.first.should be_new
     end
     
     it &quot;should not be true after create or save&quot; do
       @cat.create
       @cat.save
-      @cat.favorite_toy.new_model?.should be_false
-      @cat.toys.first.new_model?.should be_false
+      @cat.favorite_toy.should_not be_new
+      @cat.toys.first.should_not be_new
     end
     
     it &quot;should not be true after get from the database&quot; do
       @cat.save
       @cat = Cat.get(@cat.id)
-      @cat.favorite_toy.new_model?.should be_false
-      @cat.toys.first.new_model?.should be_false
+      @cat.favorite_toy.should_not be_new
+      @cat.toys.first.should_not be_new
     end
     
     it &quot;should still be true after a failed create or save&quot; do
       @cat.name = nil
       @cat.create.should be_false
       @cat.save.should be_false
-      @cat.favorite_toy.new_model?.should be_true
-      @cat.toys.first.new_model?.should be_true
+      @cat.favorite_toy.should be_new
+      @cat.toys.first.should be_new
     end
   end
   </diff>
      <filename>spec/couchrest/more/casted_model_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,12 +97,12 @@ describe &quot;ExtendedDocument&quot; do
     it &quot;should be a new_record&quot; do
       @obj = Basic.new
       @obj.rev.should be_nil
-      @obj.should be_a_new_record
+      @obj.should be_new
     end
     it &quot;should be a new_document&quot; do
       @obj = Basic.new
       @obj.rev.should be_nil
-      @obj.should be_a_new_document
+      @obj.should be_new
     end
   end
   
@@ -405,7 +405,7 @@ describe &quot;ExtendedDocument&quot; do
     end
     
     it &quot;should be a new document&quot; do
-      @art.should be_a_new_document
+      @art.should be_new
       @art.title.should be_nil
     end
     </diff>
      <filename>spec/couchrest/more/extended_doc_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -85,7 +85,7 @@ describe &quot;ExtendedDocument properties&quot; do
       @invoice.location = nil
       @invoice.should_not be_valid
       @invoice.save.should be_false
-      @invoice.should be_new_document
+      @invoice.should be_new
     end
   end
   </diff>
      <filename>spec/couchrest/more/property_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,6 @@ class Article &lt; CouchRest::ExtendedDocument
   save_callback :before, :generate_slug_from_title
   
   def generate_slug_from_title
-    self['slug'] = title.downcase.gsub(/[^a-z0-9]/,'-').squeeze('-').gsub(/^\-|\-$/,'') if new_document?
+    self['slug'] = title.downcase.gsub(/[^a-z0-9]/,'-').squeeze('-').gsub(/^\-|\-$/,'') if new?
   end
 end
\ No newline at end of file</diff>
      <filename>spec/fixtures/more/article.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b4e2250668f6124fdd0040a921e1524bbf1324c5</id>
    </parent>
  </parents>
  <author>
    <name>Peter Gumeson</name>
    <email>gumeson@gmail.com</email>
  </author>
  <url>http://github.com/wildchild/couchrest/commit/76b1563539c258cf17d60c1b93a0c3d26be1075a</url>
  <id>76b1563539c258cf17d60c1b93a0c3d26be1075a</id>
  <committed-date>2009-06-04T20:44:44-07:00</committed-date>
  <authored-date>2009-06-04T20:44:44-07:00</authored-date>
  <message>Renamed new_document? and new_model? to simply new?</message>
  <tree>3afb499f2c0a06af31bdf6f30cba85c9d476e5d8</tree>
  <committer>
    <name>Peter Gumeson</name>
    <email>gumeson@gmail.com</email>
  </committer>
</commit>
