[clouchdb-cvs] CVS clouchdb/public_html
peddy
peddy at common-lisp.net
Fri Nov 27 22:49:28 UTC 2009
Update of /project/clouchdb/cvsroot/clouchdb/public_html
In directory cl-net:/tmp/cvs-serv11134/public_html
Modified Files:
index.html
Log Message:
- Add tests and doc for basic auth
--- /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2009/11/22 16:41:25 1.11
+++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2009/11/27 22:49:28 1.12
@@ -111,21 +111,21 @@
<p>
The clouchdb distribution comes with a unit test suite which uses
- the LIFT testing framework. To run the tests, follow the following
+ the LIFT testing framework. To run the tests follow the following
steps:
</p>
<pre class="code">
(asdf:oos 'asdf:load-op '#:clouchdb-tests)
(in-package :clouchdb-tests)
+
+;; The following is only necessary if the couchdb server is not on
+;; localhost, or authenticaion is enabled, respectively.
+(set-connection :host "hostname" :user "username" :password "password")
+
(run-all-tests)
</pre>
-<p>
- Note that if the CouchDb server is not running on the same host you
- will have to modify tests.lisp to point it to the appropriate host.
-</p>
-
<h3>Examples</h3>
<p>
@@ -1907,7 +1907,7 @@
(ad-hoc-view (ps (lambda (doc)
(with-slots (*name*) doc
(if (eql *name* "Laraby")
- (map nil doc))))))
+ (emit nil doc))))))
</pre>
<p>
Note that it is not necessary for every document in the database to
@@ -1922,7 +1922,7 @@
<pre class="code">
(ad-hoc-view (ps (lambda (doc)
(if (eql doc.*name* "Laraby")
- (map nil doc))))))
+ (emit nil doc))))))
</pre>
<p>See (<a href="#sym-create-view">create-view</a>) and <a href="#example-3">Example 3</a></p>
</blockquote>
@@ -2044,11 +2044,11 @@
(ps (lambda (doc) ;; parameter-less view
(with-slots (name) doc
(if (eql "Laraby" name)
- (map nil doc))))))
+ (emit nil doc))))))
(cons <b>"name"</b>
(ps (lambda (doc) ;; parameter view
(with-slots (name) doc
- (map name doc))))))
+ (emit name doc))))))
;; Find document by invoking parameter-less "laraby" view
(invoke-view <b>"names" "laraby"</b>)
More information about the clouchdb-cvs
mailing list