<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,4 +18,4 @@ nbproject
 .DS_Store
 rspec_report.html
 *.swp
-_Yardoc
\ No newline at end of file
+_Yardoc</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,22 @@
-Copyright (c) 2007 Sam Smoot
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the &quot;Software&quot;), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+Copyright (c) 2007 Sam Smoot
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the &quot;Software&quot;), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.</diff>
      <filename>MIT-LICENSE</filename>
    </modified>
    <modified>
      <diff>@@ -7,5 +7,3 @@ Including:
 
  * Migrations
  * Validations
-
-</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 dm-couchdb-adapter
 ==================
 
-A DataMapper adapter for CouchDB
\ No newline at end of file
+A DataMapper adapter for CouchDB</diff>
      <filename>adapters/dm-couchdb-adapter/README</filename>
    </modified>
    <modified>
      <diff>@@ -14,10 +14,10 @@ end
 
 module DataMapper
   module Resource
-    
+
     def to_json(dirty = false)
-      
-      doc = (dirty ? self.dirty_attributes : self.class.properties).map do |property| 
+
+      doc = (dirty ? self.dirty_attributes : self.class.properties).map do |property|
         [property.field, instance_variable_get(property.instance_variable_name)]
       end
 
@@ -30,7 +30,7 @@ end
 module DataMapper
   module Adapters
     class CouchdbAdapter &lt; AbstractAdapter
-      
+
       def create(repository, resource)
         result = http_post(&quot;/#{resource.class.storage_name(name)}/&quot;, resource.to_json(true))
         resource.instance_variable_set(&quot;@rev&quot;, result[&quot;rev&quot;])
@@ -44,30 +44,30 @@ module DataMapper
           false
         end
       end
-      
+
       def read(repository, resource, key)
         properties = resource.properties(repository.name).defaults
         properties_with_indexes = Hash[*properties.zip((0...properties.length).to_a).flatten]
         set = Collection.new(repository, resource, properties_with_indexes)
-        
+
         doc = http_get(&quot;/#{resource.storage_name(name)}/#{key}&quot;)
         set.load(properties.map { |property| typecast(property.type, doc[property.field.to_s]) })
-        
+
         set.first
       end
-      
+
       def delete(repository, resource)
         key = resource.class.key(name).map { |property| resource.instance_variable_get(property.instance_variable_name) }
         result = http_delete(&quot;/#{resource.class.storage_name(name)}/#{key}?rev=#{resource.rev}&quot;)
         return result[&quot;ok&quot;]
       end
-      
+
       def update(repository, resource)
         key = resource.class.key(name).map { |property| resource.instance_variable_get(property.instance_variable_name) }
         result = http_put(&quot;/#{resource.class.storage_name(name)}/#{key}&quot;, resource.to_json)
-        
+
         if result[&quot;ok&quot;]
-          
+
           key = resource.class.key(name)
           resource.instance_variable_set(key.first.instance_variable_name, result[&quot;id&quot;])
           resource.instance_variable_set(&quot;@rev&quot;, result[&quot;rev&quot;])
@@ -76,12 +76,12 @@ module DataMapper
           false
         end
       end
-      
+
       def read_set(repository, query)
         doc = request do |http|
           http.request(build_javascript_request(query))
         end
-        
+
         populate_set(repository, query.model, query.fields, doc[&quot;rows&quot;])
       end
 
@@ -90,30 +90,30 @@ module DataMapper
         doc = http_get(&quot;/#{resource.storage_name(name)}/_view/#{resource.storage_name(name)}/#{proc_name}&quot;)
         populate_set(repository, resource, properties, doc[&quot;rows&quot;])
       end
-      
+
       def populate_set(repository, resource, properties, docs)
         properties_with_indexes = Hash[*properties.zip((0...properties.length).to_a).flatten]
         set = Collection.new(repository, resource, properties_with_indexes)
-        
+
         docs.each do |doc|
           set.load(properties.map { |property| typecast(property.type, doc[&quot;value&quot;][property.field.to_s]) })
         end
-        
+
         set
       end
 
       def delete_set(repository, query)
         raise NotImplementedError
       end
-      
+
       private
-      
+
       def normalize_uri(uri_or_options)
         uri_or_options = URI.parse(uri_or_options) if String === uri_or_options
         uri_or_options.scheme = &quot;http&quot;
         uri_or_options
       end
-      
+
       def typecast(type, value)
         return value if value.nil?
         case type.to_s
@@ -123,19 +123,19 @@ module DataMapper
         else value
         end
       end
-      
+
       def build_javascript_request(query)
-        
+
         if query.order.empty?
           key = &quot;null&quot;
         else
           key = query.order.map { |order| &quot;doc.#{order.property.field}&quot; }.join(&quot;, &quot;)
           key = &quot;[#{key}]&quot;
         end
-        
+
         request = Net::HTTP::Post.new(&quot;/#{query.model.storage_name(name)}/_temp_view&quot;)
         request[&quot;content-type&quot;] = &quot;text/javascript&quot;
-        
+
         if query.conditions.empty?
           request.body = &quot;function(doc) { map(#{key}, doc); }&quot;
         else
@@ -155,7 +155,7 @@ module DataMapper
         end
         request
       end
-      
+
       def like_operator(value)
         case value
         when Regexp then value = value.source
@@ -168,23 +168,23 @@ module DataMapper
         end
         return &quot;.match(/#{value}/)&quot;
       end
-      
+
       def http_put(uri, data = nil)
         request { |http| http.put(uri, data) }
       end
-      
+
       def http_post(uri, data)
         request { |http| http.post(uri, data) }
       end
-      
+
       def http_get(uri)
         request { |http| http.get(uri) }
       end
-      
+
       def http_delete(uri)
         request { |http| http.delete(uri) }
       end
-      
+
       def request(parse_result = true, &amp;block)
         res = nil
         Net::HTTP.start(@uri.host, @uri.port) do |http|
@@ -192,7 +192,7 @@ module DataMapper
         end
         JSON.parse(res.body) if parse_result
       end
-      
+
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>adapters/dm-couchdb-adapter/lib/couchdb_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,24 @@
 # This provides a mechanism for accessing stored and indexed views
 # in the CouchDB database.
-# 
+#
 # Here's a sample model:
-# 
+#
 #   class User
 #     include DataMapper::Resource
-#   
+#
 #     property :id, String, :key =&gt; true, :field =&gt; :_id
 #     property :rev, String, :field =&gt; :_rev
-#   
+#
 #     view :by_name
 #   end
-# 
+#
 # And here's the DM code to generate the view:
 #
 #   view = Net::HTTP::Put.new(&quot;/users/_design/users&quot;) # /model_name/_design/model_name
 #   view[&quot;content-type&quot;] = &quot;text/javascript&quot;
-#   view.body = { 
-#     &quot;language&quot; =&gt; &quot;text/javascript&quot;, 
-#     &quot;views&quot; =&gt; { 
+#   view.body = {
+#     &quot;language&quot; =&gt; &quot;text/javascript&quot;,
+#     &quot;views&quot; =&gt; {
 #                                   # this filters out non-records, such as this
 #                                   # _design document
 #       &quot;by_name&quot; =&gt; &quot;function(doc) { if(doc._id.charAt(0) != '_') { map(doc.name, doc); } }&quot;
@@ -27,7 +27,7 @@
 #   @adapter.send(:request, false) do |http|
 #     http.request(view)
 #   end
-# 
+#
 
 module DataMapper
   class Repository
@@ -49,16 +49,16 @@ end
 
 module DataMapper
   class View
-    
+
     attr_reader :model, :name
-    
+
     def initialize(model, name)
       @model = model
       @name = name
-      
+
       create_getter
     end
-    
+
     def create_getter
       @model.class_eval &lt;&lt;-EOS, __FILE__, __LINE__
         def self.#{@name}(repository_name = self.repository.name)
@@ -66,15 +66,15 @@ module DataMapper
         end
       EOS
     end
-    
+
   end
 end
 
 module DataMapper
   module Resource
-    
+
     module ClassMethods
-      
+
       def view(name)
         @views ||= Hash.new { |h,k| h[k] = {} }
         proc = View.new(self, name)
@@ -87,4 +87,4 @@ module DataMapper
       end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>adapters/dm-couchdb-adapter/lib/couchdb_views.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require Pathname(__FILE__).dirname.parent.expand_path + 'lib/couchdb_adapter'
 
 class User
   include DataMapper::Resource
-  
+
   def self.default_repository_name
     :couchdb
   end
@@ -11,14 +11,14 @@ class User
   # required for CouchDB
   property :id, String, :key =&gt; true, :field =&gt; :_id
   property :rev, String, :field =&gt; :_rev
-  
+
   # regular properties
   property :name, String
   property :age, Integer
   property :wealth, Float
   property :created_at, DateTime
   property :created_on, Date
-  
+
   # creates methods for accessing stored/indexed views in the CouchDB database
   view :by_name
   view :by_age
@@ -32,17 +32,17 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
     @adapter.send(:http_put, &quot;/users/&quot;)
     create_procedures
   end
-  
+
   after :all do
     @adapter.send(:http_delete, &quot;/users/&quot;)
   end
-  
+
   it &quot;should create a record&quot; do
     user = new_user
     user.save.should == true
     user.id.should_not == nil
   end
-  
+
   it &quot;should get a record&quot; do
     created_user = new_user
     created_user.save
@@ -51,7 +51,7 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
     user.name.should == &quot;Jamie&quot;
     user.age.should == 67
   end
-  
+
   it &quot;should update a record&quot; do
     created_user = new_user
     created_user.save
@@ -63,28 +63,28 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
     user.age.should == created_user.age
     user.id.should == created_user.id
   end
-  
+
   it &quot;should destroy a record&quot; do
     created_user = new_user
     created_user.save
     created_user.destroy.should == true
   end
-  
+
   it &quot;should get all records&quot; do
     User.all.size.should == 3
   end
-  
+
   it &quot;should get records by eql matcher&quot; do
     new_user(:name =&gt; &quot;John&quot;, :age =&gt; 50).save
     User.all(:name =&gt; &quot;John&quot;).size.should == 1
     User.all(:age =&gt; 50).size.should == 1
     User.all(:wealth =&gt; 11.5).size.should == 4
   end
-  
+
   it &quot;should get records by not matcher&quot; do
     User.all(:age.not =&gt; 50).size.should == 3
   end
-  
+
   it &quot;should get records by gt matcher&quot; do
     User.all(:age.gt =&gt; 50).size.should == 3
   end
@@ -92,26 +92,26 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
   it &quot;should get records by gte matcher&quot; do
     User.all(:age.gte =&gt; 50).size.should == 4
   end
-  
+
   it &quot;should get records by lt matcher&quot; do
     User.all(:age.lt =&gt; 50).size.should == 0
   end
-  
+
   it &quot;should get records by lte matcher&quot; do
     User.all(:age.lte =&gt; 50).size.should == 1
   end
-  
+
   it &quot;should get records by the like matcher&quot; do
     User.all(:name.like =&gt; &quot;Jo&quot;).size.should == 0
     User.all(:name.like =&gt; &quot;Jo%&quot;).size.should == 1
     User.all(:name.like =&gt; /^Jam/).size.should == 2
   end
-  
+
   it &quot;should get records with multiple matchers&quot; do
     new_user(:name =&gt; &quot;John&quot;, :age =&gt; 30).save
     User.all(:name =&gt; &quot;John&quot;, :age.lt =&gt; 50).size.should == 1
   end
-  
+
   it &quot;should order records&quot; do
     new_user(:name =&gt; &quot;Aaron&quot;, :age =&gt; 30).save
     new_user(:name =&gt; &quot;Aaron&quot;).save
@@ -121,34 +121,34 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
     users[0].age.should == 30
     users[1].age.should == 67
   end
-  
+
   it &quot;should handle DateTime&quot; do
     user = new_user
     user.save
     time = user.created_at
     User[user.id].created_at.should == time
   end
-  
+
   it &quot;should handle Date&quot; do
     user = new_user
     user.save
     date = user.created_on
     User[user.id].created_on.should == date
   end
-  
+
   it &quot;should be able to call stored views&quot; do
-    
+
     User.by_name.first.should == User.all(:order =&gt; [:name]).first
     User.by_age.first.should == User.all(:order =&gt; [:age]).first
-    
+
   end
-  
+
   def create_procedures
     view = Net::HTTP::Put.new(&quot;/users/_design/users&quot;)
     view[&quot;content-type&quot;] = &quot;text/javascript&quot;
-    view.body = { 
-      &quot;language&quot; =&gt; &quot;text/javascript&quot;, 
-      &quot;views&quot; =&gt; { 
+    view.body = {
+      &quot;language&quot; =&gt; &quot;text/javascript&quot;,
+      &quot;views&quot; =&gt; {
         &quot;by_name&quot; =&gt; &quot;function(doc) { if(doc._id.charAt(0) != '_') { map(doc.name, doc); } }&quot;,
         &quot;by_age&quot;  =&gt; &quot;function(doc) { if(doc._id.charAt(0) != '_') { map(doc.age, doc); } }&quot;
       }
@@ -157,11 +157,11 @@ describe &quot;DataMapper::Adapters::CouchdbAdapter&quot; do
       http.request(view)
     end
   end
-  
+
   def new_user(options = {})
     default_options = { :name =&gt; &quot;Jamie&quot;, :age =&gt; 67, :wealth =&gt; 11.5 }
     default_options.merge!(options)
     User.new(default_options)
   end
-  
-end
\ No newline at end of file
+
+end</diff>
      <filename>adapters/dm-couchdb-adapter/spec/couchdb_adapter_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,21 +10,21 @@ describe &quot;DataMapper::View&quot; do
       property :open, TrueClass
     end
   end
-  
+
   it &quot;should have a view method&quot; do
     Zoo.should respond_to(:view)
   end
-  
+
   it &quot;should store a view when called&quot; do
     Zoo.view :by_name
     Zoo.views.keys.should include(:by_name)
   end
-  
+
   it &quot;should initialize a new Procedure instance&quot; do
     proc = Zoo.view :by_name_desc
     proc.should be_an_instance_of(DataMapper::View)
   end
-  
+
   it &quot;should create a getter method&quot; do
     Zoo.view :open
     Zoo.should respond_to(:open)
@@ -41,4 +41,4 @@ describe &quot;DataMapper::Adapters::AbstractAdapter&quot; do
   it &quot;should have a view method&quot; do
     DataMapper::Adapters::AbstractAdapter.instance_methods.should include(&quot;view&quot;)
   end
-end
\ No newline at end of file
+end</diff>
      <filename>adapters/dm-couchdb-adapter/spec/couchdb_view_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>73da8be053bc188427d6a9efe1607cc31ddffd2f</id>
    </parent>
  </parents>
  <author>
    <name>Alex Coles</name>
    <email>alexbcoles@mac.com</email>
  </author>
  <url>http://github.com/digitalhobbit/dm-more/commit/ad1c629010118b42bbf9e83d9709f34078aec5ee</url>
  <id>ad1c629010118b42bbf9e83d9709f34078aec5ee</id>
  <committed-date>2008-05-13T05:07:43-07:00</committed-date>
  <authored-date>2008-05-13T05:07:43-07:00</authored-date>
  <message>Whitespace cleanup</message>
  <tree>a1d380499e2d494957f6e15bd506456964f0bbd0</tree>
  <committer>
    <name>Alex Coles</name>
    <email>alexbcoles@mac.com</email>
  </committer>
</commit>
