readme markdown

This commit is contained in:
Chris Anderson 2009-01-11 02:27:22 -08:00
parent 245f525902
commit 9c13b003b3

View file

@ -1,4 +1,4 @@
== CouchRest - CouchDB, close to the metal
# CouchRest: CouchDB, close to the metal
CouchRest is based on [CouchDB's couch.js test
library](http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch.js),
@ -9,24 +9,24 @@ to CouchDB's API endpoints so you don't have to.
CouchRest's lighweight is designed to make a simple base for application and
framework-specific object oriented APIs.
=== Easy Install
## Easy Install
sudo gem install jchris-couchrest -s http://gems.github.com
Easy Install is moving to RubyForge, heads up for the gem.
=== Relax, it's RESTful
### Relax, it's RESTful
The core of Couchrest is Herokus excellent REST Client Ruby HTTP wrapper.
REST Client takes all the nastyness of Net::HTTP and gives is a pretty face,
while still giving you more control than Open-URI. I recommend it anytime
youre interfacing with a well-defined web service.
=== Running the Specs
### Running the Specs
The most complete documentation is the spec/ directory. To validate your
CouchRest install, from the project root directory run `rake`, or `autotest`
(requires RSpec and optionally ZenTest for autotest support).
=== Examples
## Examples
Quick Start:
@ -58,10 +58,12 @@ Creating and Querying Views:
})
puts @db.view('first/test')['rows'].inspect
== CouchRest::Model
## CouchRest::Model
CouchRest::Model is a module designed along the lines of DataMapper::Resource.
By subclassing, suddenly you get all sorts of powerful sugar, so that working
with CouchDB in your Rails or Merb app is no harder than working with the
standard SQL alternatives. See the CouchRest::Model documentation for an
example article class that illustrates usage.
CouchRest::Model will be removed from this package.