Commit graph

117 commits

Author SHA1 Message Date
John Wood b26f90d2ff Added support for couchdb-lucene.
Added a search method to CouchRest:Database to search the documents in a
given database.  Added support for a :search parameter to Collection's
paginated_each method, which will allow you to paginate over a set of
search results.

This code has been brought to you by Dave Farkas (sakrafd) and
Arnaud Berthomier (oz).
2010-03-15 19:20:07 -05:00
sauy7 3c314e14d0 Patching in fixes for missing uri scheme in CouchRest.parse and adding support for continuous replication 2010-03-10 18:49:31 -06:00
Pierre Larochelle cc9ed83cd3 Added an update_doc method to database to handle conflicts during atomic updates.
Also added appropriate specs

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2010-02-27 19:05:55 -03:00
Damien Mathieu ec51c34f7d recreating a non-existant database shouldn't raise any exception (and we make sure of it)
Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2010-02-03 14:09:56 -02:00
Sam Lown iMac 08cf9e59b6 Fixing incorrectly generated document URIs with testing
Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
2010-01-03 21:42:22 -02:00
Chris Anderson b55a3ec0d3 fix regexp escaping issue in test fixture view 2009-12-20 11:07:53 -08:00
Julien Sanchez 1c43a8f3d3 Streamer fixes
* url must be quoted inside the curl command otherwise '&' between
  params are interpreted by shells
* View url format updated
* Streamer yielded the last row returned by curl ("}]") as nil
* Specs
2009-10-18 01:59:30 +08:00
Mathias Meyer d8e7652680 Added support for https database URIs.
Signed-off-by: Tapajós <tapajos@gmail.com>
2009-10-18 01:57:39 +08:00
Matt Aimonetti e878234bd6 fixed a failing spec 2009-08-24 17:36:33 -07:00
Peter Gumeson 1938270d65 Merge commit 'mattetti/master' 2009-08-12 16:48:13 -07:00
Matt Aimonetti a17df45fc3 made all the specs run on 1.9.2, yay :) 2009-08-01 14:21:18 -07:00
Matt Aimonetti 5270fde0fa added an option to force the deletion of a attachment 2009-07-29 20:12:35 -07:00
Matt Aimonetti beb801d1bd fixed the database attachment specs 2009-07-29 19:01:38 -07:00
Matt Aimonetti 9141669df1 extracted the rest API to its own module 2009-07-29 18:32:34 -07:00
Peter Gumeson 1e44302d1a Merge commit 'mattetti/master' 2009-07-19 00:01:07 -07:00
Matt Aimonetti 9a167cc27d fixed the specs 2009-07-14 23:48:06 -07:00
Matt Aimonetti b2a29d9eb7 started extracting the http layer 2009-07-14 01:43:40 -07:00
Peter Gumeson fc18b47800 Merge commit 'mattetti/master' 2009-06-11 21:18:37 -07:00
Matt Aimonetti c18567f8fc differentiated attachment's URI and URL 2009-06-07 18:51:31 -07:00
Peter Gumeson 027dd9a3ee A better fix for failing spec 2009-05-30 15:47:04 -07:00
Peter Gumeson fb3c4530ed Fixed a failing spec when using ruby 1.9 2009-05-30 14:53:55 -07:00
Matt Aimonetti 92b77a9649 fixed bulk_load/get_bulk and the specs 2009-05-13 20:44:57 -07:00
Chris Anderson 8363aa6298 added bulk_load macro 2009-05-08 19:00:39 -07:00
Chris Anderson 09dcc9e5c2 Revert "Server URI can now include a prefix to the database name"
This reverts commit 14acd95444.
2009-03-31 12:24:04 -07:00
Brian Candler 14acd95444 Server URI can now include a prefix to the database name 2009-03-27 10:27:04 -07:00
Brian Candler 190bd13723 Escape slash in database name 2009-03-27 10:26:54 -07:00
Brian Candler aabf097e88 Tidying up spec, remove unnecessary assignments to local variable 2009-03-27 11:44:09 +00:00
Brian Candler ec7848b783 Multiple database support for ExtendedDocument.
New optional parameters are available to select the database:

Mixins::DocumentQueries
  * get <id>, <db>
  * all :database => <db>
  * first :database => <db>

Mixins::Views
  * view <name>, :database => <db>
  * all_design_doc_versions <db>
  * cleanup_design_docs! <db>

Mixins::DesignDoc
  * refresh_design_doc now only updates the design_doc _id and removes _rev
  * call save_design_doc to save and update the design_doc
  * call save_design_doc_on <db> to save the design doc on a given
    database without modifying the model's design_doc object

Design (core/design.rb)
  * new method view_on <db>, ...

Bug fixes:
  * design_doc_slug in mixins/design_doc.rb was using an empty document
    to calculate the slug each time
  * method_missing in core/extended_document.rb now passes a block through
2009-03-27 11:27:37 +00:00
Geoff Buesing 4d8314124b Remove CouchRest.move, CouchRest::Database#move and #move_doc, because these methods are no longer supported by CouchDB
Ref: http://n2.nabble.com/Removing-MOVE-td2490780.html#a2490780
2009-03-18 11:22:49 -05:00
Chris Anderson 36c8bea453 all specs pass against couchdb trunk 2009-03-15 13:00:47 -07:00
Chris Anderson f8e8686537 fixed db spec 2009-02-27 10:58:48 -08:00
Matt Aimonetti 80317f31a5 fixed the uuid count for the latest version of couchdb
also avoided CONSTANTS warnings, cleaned up the attachment specs, added missing fixtures
2009-02-25 00:22:11 -08:00
Matt Aimonetti fe489f2d38 removed CouchRest::Model, added more specs and fixed a bug with casted CR::ExtendedDocument 2009-02-24 22:51:13 -08:00
Matt Aimonetti bc47e72ae0 fixed a bug with the casting of time objects 2009-02-09 15:12:22 -08:00
Matt Aimonetti 890b60cae4 added autovalidation (auto_validate! in your ExtendedDocument) and extracted some extlib stuff so we will soon be able to remove the dependency. 2009-02-05 17:06:12 -08:00
Matt Aimonetti 08c7f2107c moved stuff around and cleaned up some deprecation notices [save/save_doc] 2009-02-02 16:10:07 -08:00
Matt Aimonetti fa29906900 Rebased
* 'master' of git://github.com/jchris/couchrest:
  all specs pass; refined attachment api
  add mattetti's 5aebd53a93
  fix rebase end balance
  Started on the ExtendedDocument class with features moved to mixins.
  Started on the ExtendedDocument class with features moved to mixins.
  updated readme file
  Started the refactoring work on couchrest.
  added some monkey patches to improve the http connection speed. (by keeping the http connection open)
  slight change of API, CR::Document now uses <action>_doc instead of <action>, also added #create! and #recreate! to Document instances
  Added attachment methods to CouchRest::Document: #put_attachment, #fetch_attachment and #delete_attachment. Note you can overwrite exisitng attachments with #put_attachment.
  - Added Database#delete_attachment, for removing them directly
  documentation for Document#copy and #move, copied from Database
  database replication methods, no conflict resolution provided
2009-02-02 15:40:49 -08:00
Chris Anderson 55cf741859 fix rebase end balance 2009-02-02 14:56:37 -08:00
Matt Aimonetti 83d7341553 Started on the ExtendedDocument class with features moved to mixins.
Properties got added, they define getters, setters and aliases.
They will also be the base of the new validation system.
2009-02-02 14:51:41 -08:00
Matt Aimonetti d9fe6ba374 Started the refactoring work on couchrest.
* A server can have multiple defined available databases set to be used by documents (think DM repos)
* A server can have a default database so documents can easily share the same db connection
* Let a document class have a default database to use
* Give access to a document uri
* extracted some of the document features to a mixin
2009-02-02 14:51:41 -08:00
Matt Aimonetti 84e2bf94e4 slight change of API, CR::Document now uses <action>_doc instead of <action>, also added #create! and #recreate! to Document instances 2009-02-02 14:50:30 -08:00
Matt Lyon a4a2b202ae Added attachment methods to CocuhRest::Document: #put_attachment, #fetch_attachment and #delete_attachment. Note you can overwrite exisitng attachments with #put_attachment. 2009-02-02 01:25:14 -08:00
Matt Lyon b915f7f708 - Added Database#delete_attachment, for removing them directly
- Modified Database#fetch_attachment to take a doc as its first argument +as well as+ a docid, to be consistent with the other attachment methods.
- Refactored the attachment uri generation used by #fetch_attachment, #put_attachment, and #delete_attachment to a common private method, #uri_for_attachment
2009-02-02 01:25:14 -08:00
Matt Lyon 571cd257e0 database replication methods, no conflict resolution provided 2009-02-02 01:25:13 -08:00
Matt Aimonetti d6665e55ca Started on the ExtendedDocument class with features moved to mixins.
Properties got added, they define getters, setters and aliases.
They will also be the base of the new validation system.
2009-01-29 18:45:01 -08:00
Matt Aimonetti 6b2e5f84ad Started the refactoring work on couchrest.
* A server can have multiple defined available databases set to be used by documents (think DM repos)
* A server can have a default database so documents can easily share the same db connection
* Let a document class have a default database to use
* Give access to a document uri
* extracted some of the document features to a mixin
2009-01-28 22:55:42 -08:00
Matt Aimonetti fda5be213a slight change of API, CR::Document now uses <action>_doc instead of <action>, also added #create! and #recreate! to Document instances 2009-01-28 18:16:55 -08:00
Matt Lyon a0a422b779 add move and copy support to CouchRest::Document instances 2009-01-16 11:31:42 -08:00
Matt Lyon 0519fc5765 patch restclient locally instead of hoping/waiting for an upstream patch. 2009-01-16 11:31:42 -08:00
Jonathan S. Katz 3bff23e7c5 added CouchRest::Model#attachment_url for someone to fetch the attachment using other means 2009-01-12 21:06:48 -08:00