lib/couchrest/core/database.rb in jchris-couchrest-0.17.0 vs lib/couchrest/core/database.rb in jchris-couchrest-0.22

- old
+ new

@@ -222,29 +222,9 @@ def copy(doc, dest) puts "CouchRest::Database's copy method is being deprecated, please use copy_doc instead" copy_doc(doc, dest) end - # MOVE an existing document to a new id. If the destination id currently exists, a rev must be provided. - # <tt>dest</tt> can take one of two forms if overwriting: "id_to_overwrite?rev=revision" or the actual doc - # hash with a '_rev' key - def move_doc(doc, dest) - raise ArgumentError, "_id and _rev are required for moving" unless doc['_id'] && doc['_rev'] - slug = escape_docid(doc['_id']) - destination = if dest.respond_to?(:has_key?) && dest['_id'] && dest['_rev'] - "#{dest['_id']}?rev=#{dest['_rev']}" - else - dest - end - CouchRest.move "#{@uri}/#{slug}?rev=#{doc['_rev']}", destination - end - - ### DEPRECATION NOTICE - def move(doc, dest) - puts "CouchRest::Database's move method is being deprecated, please use move_doc instead" - move_doc(doc, dest) - end - # Compact the database, removing old document revisions and optimizing space use. def compact! CouchRest.post "#{@uri}/_compact" end