You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/02/20 01:26:56 UTC

[23/26] documentation commit: updated refs/heads/master to 5a81ace

src now follows the style


Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/6b84c188
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/6b84c188
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/6b84c188

Branch: refs/heads/master
Commit: 6b84c1885e2902acbd67f2fd4aebc157c8b94966
Parents: 25273e7
Author: Maria Andersson <ma...@dualpose.com>
Authored: Fri Feb 6 22:24:35 2015 +0100
Committer: Maria Andersson <ma...@dualpose.com>
Committed: Fri Feb 6 22:24:35 2015 +0100

----------------------------------------------------------------------
 src/about.rst          |   4 +-
 src/contents.rst       |   2 +-
 src/contributing.rst   |   7 +-
 src/experimental.rst   |  28 +++----
 src/externals.rst      |  28 +++----
 src/json-structure.rst | 196 ++++++++++++++++++++++----------------------
 6 files changed, 126 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/about.rst
----------------------------------------------------------------------
diff --git a/src/about.rst b/src/about.rst
index e268be8..db036c3 100644
--- a/src/about.rst
+++ b/src/about.rst
@@ -10,7 +10,6 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-
 .. _about:
 
 ===========================
@@ -21,5 +20,4 @@ License
 =======
 
 .. literalinclude:: ../LICENSE
-   :lines: 1-202
-
+    :lines: 1-202

http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/contents.rst
----------------------------------------------------------------------
diff --git a/src/contents.rst b/src/contents.rst
index 4395f92..6405d3f 100644
--- a/src/contents.rst
+++ b/src/contents.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-
+=============================================
 |Apache CouchDB(TM)|_ |release| Documentation
 =============================================
 

http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/contributing.rst
----------------------------------------------------------------------
diff --git a/src/contributing.rst b/src/contributing.rst
index db2dc7f..d8664f7 100644
--- a/src/contributing.rst
+++ b/src/contributing.rst
@@ -75,7 +75,8 @@ the other files and directories.
 
 First we should determine where we want to document this inside the
 documentation. We can look through http://docs.couchdb.org/en/latest/
-for inspiration. The `JSON Structure Reference`_ looks like a fine place to write this up.
+for inspiration. The `JSON Structure Reference`_ looks like a fine place to
+write this up.
 
 .. _JSON Structure Reference: http://docs.couchdb.org/en/latest/json-structure.html
 
@@ -113,8 +114,8 @@ Into::
 
     .. code-block:: erlang
 
-      ejson:encode(ejson:decode(<<"1.1">>)).
-      <<"1.1000000000000000888">>
+        ejson:encode(ejson:decode(<<"1.1">>)).
+        <<"1.1000000000000000888">>
 
 And we follow along with the other code samples. We turn::
 

http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/experimental.rst
----------------------------------------------------------------------
diff --git a/src/experimental.rst b/src/experimental.rst
index fae925c..a3980b3 100644
--- a/src/experimental.rst
+++ b/src/experimental.rst
@@ -21,8 +21,7 @@ a release because the development team is requesting feedback from the
 larger developer community. As such, please play around with these features
 and send us feedback, thanks!
 
-Use at your own risk! Do not rely on these features for critical
-applications.
+Use at your own risk! Do not rely on these features for critical applications.
 
 NodeJS Query Server
 ===================
@@ -31,7 +30,6 @@ The NodeJS Query Server is an alternative runtime environment for
 the default JavaScript Query Server that runs on top of Node.JS and
 not SpiderMonkey like the default Query Server.
 
-
 Setup
 -----
 
@@ -47,16 +45,16 @@ Or via NPM::
 
     npm install -g couchjs
 
-.. note:: **NPM in non-standard locations**
-
+.. note::
+    **NPM in non-standard locations**
     If your Node.JS installation doesn’t store binaries in `/usr/local/bin`
-    you will need to adjust CouchDB’s configuration. Add this to your `local.ini`
-    file:
+    you will need to adjust CouchDB’s configuration. Add this to your
+    `local.ini` file:
 
     .. code-block:: ini
 
-      [query_servers]
-      nodejs = /path/to/couchjs-node /path/to/couchdb/share/server/main.js
+        [query_servers]
+        nodejs = /path/to/couchjs-node /path/to/couchdb/share/server/main.js
 
     And then restart your CouchDB instance.
 
@@ -66,21 +64,17 @@ be processed by the Node.JS query server.
 
 Enjoy!
 
-
 Differences from the SpiderMonkey Query Server
 ----------------------------------------------
 
-V8 and SpiderMonkey roughly behave similar, but there might be engine-
-specific differences that make or break a JavaScript function in one or
-the other server.
-
+V8 and SpiderMonkey roughly behave similar, but there might be engine- specific
+differences that make or break a JavaScript function in one or the other server.
 
 Plugins
 =======
 
 See `src/couch_plugins/README.md`.
 
-
 Content-Security-Policy (CSP) Header Support for /_utils (Fauxton)
 ==================================================================
 
@@ -90,8 +84,8 @@ the default header that is sent for everything in /_utils.
 
     .. code-block:: ini
 
-      [csp]
-      enable = true
+        [csp]
+        enable = true
 
 Then restart CouchDB.
 

http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/externals.rst
----------------------------------------------------------------------
diff --git a/src/externals.rst b/src/externals.rst
index b6d3bea..2ec1643 100644
--- a/src/externals.rst
+++ b/src/externals.rst
@@ -10,7 +10,6 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-
 .. _externals:
 
 =====================
@@ -39,7 +38,7 @@ mutually compatible. After having multiple discussions with multiple people
 we formed a general consensus on what a new API could look like.
 
 The New Hotness
----------------
+===============
 
 So the first idea for improving the _external API was to make CouchDB act as
 a reverse proxy. This would allow people to write an HTTP server that was as
@@ -68,7 +67,7 @@ turns out to be a fairly nice way of configuring matching assertions between
 the client and the server to test the proxy transmissions.
 
 How does it work? - HTTP Proxying
----------------------------------
+=================================
 
 To configure a :ref:`proxy handler <config/proxy>`, edit your `local.ini` and
 add a section like such::
@@ -91,7 +90,7 @@ proxied. You're free to choose any destination that the CouchDB node is capable
 of communicating with.
 
 How does it work? - OS Daemons
-------------------------------
+==============================
 
 The second part of the new API gives CouchDB simple OS process management. When
 CouchDB boots it will start each configured OS daemon. If one of these daemons
@@ -110,7 +109,7 @@ To configure an :config:section:`OS daemon <os_daemons>`, add this to your
     my_daemon = /path/to/command -with args
 
 Configuration API
-+++++++++++++++++
+-----------------
 
 As an added benefit, because stdio is now free, I implemented a simple API
 that OS daemons can use to read the configuration of their CouchDB host. This
@@ -138,7 +137,7 @@ And the response::
 All requests and responses are terminated with a newline (indicated by ``\n``).
 
 Logging API
-+++++++++++
+-----------
 
 There's also an API for adding messages to CouchDB's logs. Its simply::
 
@@ -148,14 +147,14 @@ Where ``$MESG`` is any arbitrary JSON. There is no response from this command. A
 with the config API, the trailing ``\n`` represents a newline byte.
 
 Dynamic Daemons
-+++++++++++++++
+---------------
 
 The OS daemons react in real time to changes to the configuration system. If
 you set or delete keys in the :config:section:`os_daemons` section,
 the corresponding daemons will be started or killed as appropriate.
 
 Neat. But So What?
-------------------
+==================
 
 It was suggested that a good first demo would be a `Node.js`_ handler. So, I
 present to you a "Hello, World" Node.js handler. Also, remember that this
@@ -172,15 +171,15 @@ File `node-hello-world.js`:
     // log files.
 
     var log = function(mesg) {
-      console.log(JSON.stringify(["log", mesg]));
+        console.log(JSON.stringify(["log", mesg]));
     }
 
     // The Node.js example HTTP server
 
     var server = http.createServer(function (req, resp) {
-      resp.writeHead(200, {'Content-Type': 'text/plain'});
-      resp.end('Hello World\n');
-      log(req.method + " " + req.url);
+        resp.writeHead(200, {'Content-Type': 'text/plain'});
+        resp.end('Hello World\n');
+        log(req.method + " " + req.url);
     })
 
     // We use stdin in a couple ways. First, we
@@ -193,11 +192,11 @@ File `node-hello-world.js`:
     var stdin = process.openStdin();
 
     stdin.on('data', function(d) {
-      server.listen(parseInt(JSON.parse(d)));
+        server.listen(parseInt(JSON.parse(d)));
     });
 
     stdin.on('end', function () {
-      process.exit(0);
+        process.exit(0);
     });
 
     // Send the request for the port to listen on.
@@ -252,7 +251,6 @@ The corresponding CouchDB logs look like::
     [info] [<0.105.0>] 127.0.0.1 - - 'GET' /_hello 200
     [info] [<0.95.0>] Daemon "node-hello" :: GET /
 
-
 .. _external OS processes: http://wiki.apache.org/couchdb/ExternalProcesses
 .. _Runit: http://smarden.org/runit/
 .. _Supervisord: http://supervisord.org/

http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/6b84c188/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/src/json-structure.rst b/src/json-structure.rst
index addc5ac..a8305c3 100644
--- a/src/json-structure.rst
+++ b/src/json-structure.rst
@@ -373,82 +373,81 @@ Request object
 
 .. code-block:: javascript
 
-  {
-      "body": "undefined",
-      "cookie": {
-          "AuthSession": "cm9vdDo1MDZBRjQzRjrfcuikzPRfAn-EA37FmjyfM8G8Lw",
-          "m": "3234"
-      },
-      "form": {},
-      "headers": {
-          "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
-          "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.3",
-          "Accept-Encoding": "gzip,deflate,sdch",
-          "Accept-Language": "en-US,en;q=0.8",
-          "Connection": "keep-alive",
-          "Cookie": "m=3234:t|3247:t|6493:t|6967:t|34e2:|18c3:t|2c69:t|5acb:t|ca3:t|c01:t|5e55:t|77cb:t|2a03:t|1d98:t|47ba:t|64b8:t|4a01:t; AuthSession=cm9vdDo1MDZBRjQzRjrfcuikzPRfAn-EA37FmjyfM8G8Lw",
-          "Host": "127.0.0.1:5984",
-          "User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"
-      },
-      "id": "foo",
-      "info": {
-          "committed_update_seq": 2701412,
-          "compact_running": false,
-          "data_size": 7580843252,
-          "db_name": "mailbox",
-          "disk_format_version": 6,
-          "disk_size": 14325313673,
-          "doc_count": 2262757,
-          "doc_del_count": 560,
-          "instance_start_time": "1347601025628957",
-          "purge_seq": 0,
-          "update_seq": 2701412
-      },
-      "method": "GET",
-      "path": [
-          "mailbox",
-          "_design",
-          "request",
-          "_show",
-          "dump",
-          "foo"
-      ],
-      "peer": "127.0.0.1",
-      "query": {},
-      "raw_path": "/mailbox/_design/request/_show/dump/foo",
-      "requested_path": [
-          "mailbox",
-          "_design",
-          "request",
-          "_show",
-          "dump",
-          "foo"
-      ],
-      "secObj": {
-          "admins": {
-              "names": [
-                  "Bob"
-              ],
-              "roles": []
-          },
-          "members": {
-              "names": [
-                  "Mike",
-                  "Alice"
-              ],
-              "roles": []
-          }
-      },
-      "userCtx": {
-          "db": "mailbox",
-          "name": "Mike",
-          "roles": [
-              "user"
-          ]
-      },
-      "uuid": "3184f9d1ea934e1f81a24c71bde5c168"
-  }
-
+    {
+        "body": "undefined",
+        "cookie": {
+            "AuthSession": "cm9vdDo1MDZBRjQzRjrfcuikzPRfAn-EA37FmjyfM8G8Lw",
+            "m": "3234"
+        },
+        "form": {},
+        "headers": {
+            "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+            "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.3",
+            "Accept-Encoding": "gzip,deflate,sdch",
+            "Accept-Language": "en-US,en;q=0.8",
+            "Connection": "keep-alive",
+            "Cookie": "m=3234:t|3247:t|6493:t|6967:t|34e2:|18c3:t|2c69:t|5acb:t|ca3:t|c01:t|5e55:t|77cb:t|2a03:t|1d98:t|47ba:t|64b8:t|4a01:t; AuthSession=cm9vdDo1MDZBRjQzRjrfcuikzPRfAn-EA37FmjyfM8G8Lw",
+            "Host": "127.0.0.1:5984",
+            "User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"
+        },
+        "id": "foo",
+        "info": {
+            "committed_update_seq": 2701412,
+            "compact_running": false,
+            "data_size": 7580843252,
+            "db_name": "mailbox",
+            "disk_format_version": 6,
+            "disk_size": 14325313673,
+            "doc_count": 2262757,
+            "doc_del_count": 560,
+            "instance_start_time": "1347601025628957",
+            "purge_seq": 0,
+            "update_seq": 2701412
+        },
+        "method": "GET",
+        "path": [
+            "mailbox",
+            "_design",
+            "request",
+            "_show",
+            "dump",
+            "foo"
+        ],
+        "peer": "127.0.0.1",
+        "query": {},
+        "raw_path": "/mailbox/_design/request/_show/dump/foo",
+        "requested_path": [
+            "mailbox",
+            "_design",
+            "request",
+            "_show",
+            "dump",
+            "foo"
+        ],
+        "secObj": {
+            "admins": {
+                "names": [
+                    "Bob"
+                ],
+                "roles": []
+            },
+            "members": {
+                "names": [
+                    "Mike",
+                    "Alice"
+                ],
+                "roles": []
+            }
+        },
+        "userCtx": {
+            "db": "mailbox",
+            "name": "Mike",
+            "roles": [
+                "user"
+            ]
+        },
+        "uuid": "3184f9d1ea934e1f81a24c71bde5c168"
+    }
 
 .. _response_object:
 
@@ -481,16 +480,15 @@ Response object
 +--------------------------------+---------------------------------------------+
 
 .. warning::
-   The ``body``, ``base64`` and ``json`` object keys are overlapping each other
-   where the last one wins. Since most realizations of key-value objects do
-   not preserve the key order or if they are mixed, confusing situations can
-   occure. Try to use only one of them.
+    The ``body``, ``base64`` and ``json`` object keys are overlapping each other
+    where the last one wins. Since most realizations of key-value objects do
+    not preserve the key order or if they are mixed, confusing situations can
+    occure. Try to use only one of them.
 
 .. note::
-   Any custom property makes CouchDB raise an internal exception.
-   Furthermore, the `Response object` could be a simple string value which would
-   be implicitly wrapped into a ``{"body": ...}`` object.
-
+    Any custom property makes CouchDB raise an internal exception. Furthermore,
+    the `Response object` could be a simple string value which would be
+    implicitly wrapped into a ``{"body": ...}`` object.
 
 Returned CouchDB Document with Detailed Revision Info
 =====================================================
@@ -576,23 +574,22 @@ Security Object
 
 .. code-block:: javascript
 
-  {
-      "admins": {
-          "names": [
-              "Bob"
-          ],
-          "roles": []
-      },
-      "members": {
-          "names": [
-              "Mike",
-              "Alice"
-          ],
-          "roles": []
-      }
+    {
+        "admins": {
+            "names": [
+                "Bob"
+            ],
+            "roles": []
+        },
+        "members": {
+            "names": [
+                "Mike",
+                "Alice"
+            ],
+            "roles": []
+        }
     }
 
-
 .. _userctx_object:
 
 User Context Object
@@ -619,7 +616,6 @@ User Context Object
         ]
     }
 
-
 .. _view_head_info_object:
 
 View Head Information