You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2015/09/30 16:20:48 UTC
couchdb-nmo git commit: fix docs
Repository: couchdb-nmo
Updated Branches:
refs/heads/master 22ca5e0c2 -> a8d0b23d7
fix docs
- fix broken documentation for commands
- back to 72 char limit for manpages / help in terminal
PR: #4
PR-URL: https://github.com/apache/couchdb-nmo/pull/4
Reviewed-By: garren smith <ga...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/commit/a8d0b23d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/tree/a8d0b23d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/diff/a8d0b23d
Branch: refs/heads/master
Commit: a8d0b23d70918945c622598622c3a3a78856df82
Parents: 22ca5e0
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Sat Sep 12 16:26:13 2015 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Sep 30 16:20:07 2015 +0200
----------------------------------------------------------------------
doc/api/nmo-couch-config.md | 16 +++++++++-------
doc/api/nmo-import-csv.md | 8 ++++----
doc/cli/nmo-couch-config.md | 9 +++++----
doc/cli/nmo-import-csv.md | 13 ++++++++-----
src/import-csv.js | 4 +++-
test/import-csv.js | 3 ++-
6 files changed, 31 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/api/nmo-couch-config.md
----------------------------------------------------------------------
diff --git a/doc/api/nmo-couch-config.md b/doc/api/nmo-couch-config.md
index 45be4e2..69c3276 100644
--- a/doc/api/nmo-couch-config.md
+++ b/doc/api/nmo-couch-config.md
@@ -1,21 +1,23 @@
-nmo-config(3) -- configuration
-==============================
+nmo-couch-config(3) -- configuration of a CouchDB cluster
+=========================================================
## SYNOPSIS
- nmo.commands.couch-config.set(cluster, nodes, section, key, value)
- nmo.commands.couch-config.get(cluster, nodes, [section])
+ nmo.commands['couch-config'].set(cluster, nodes, section, key, value)
+ nmo.commands['couch-config'].get(cluster, nodes, [section])
## DESCRIPTION
-Manage the nmo configuration.
+Manage the CouchDB configuration.
- set:
-Sets the value for a key of a CouchDB config section for each node in a cluster.
+Sets the value for a key of a CouchDB config section for each node in
+a cluster.
- get:
-Gets the config for each node in a cluster and displays it for easy viewing
+Gets the config for each node in a cluster and displays it for easy
+viewing
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/api/nmo-import-csv.md
----------------------------------------------------------------------
diff --git a/doc/api/nmo-import-csv.md b/doc/api/nmo-import-csv.md
index a056ce6..8961bb9 100644
--- a/doc/api/nmo-import-csv.md
+++ b/doc/api/nmo-import-csv.md
@@ -1,9 +1,9 @@
-nmo-import-csv(3) -- configuration
-==============================
+nmo-import-csv(3) -- import csv
+===============================
## SYNOPSIS
- nmo.commands.importcsv(file, url, [csvOptions])
+ nmo.commands['import-csv'](file, url, [csvOptions])
@@ -11,7 +11,7 @@ nmo-import-csv(3) -- configuration
Import csv file into CouchDB
- - importcsv:
+ - import-csv:
Accepts the file, url and csv options to import a file into CouchDB.
It returns a promise.
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/cli/nmo-couch-config.md
----------------------------------------------------------------------
diff --git a/doc/cli/nmo-couch-config.md b/doc/cli/nmo-couch-config.md
index a075084..19e473a 100644
--- a/doc/cli/nmo-couch-config.md
+++ b/doc/cli/nmo-couch-config.md
@@ -1,5 +1,5 @@
-nmo-couch-config(1) -- Set/Get couch configuration for a cluster
-=================================
+nmo-couch-config(1) -- Set/Get CouchDB configuration for a cluster
+==================================================================
## SYNOPSIS
@@ -15,8 +15,9 @@ If a key is specified it will only get the configuration for that section
- set:
-Set the value for a given key of a section of the config. This will update the config for all nodes in a cluster.
-The cluster must be specified in the .nmorc file.
+Set the value for a given key of a section of the config. This will update
+the config for all nodes in a cluster. The cluster must be specified in the
+.nmorc file.
## EXAMPLE
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/doc/cli/nmo-import-csv.md
----------------------------------------------------------------------
diff --git a/doc/cli/nmo-import-csv.md b/doc/cli/nmo-import-csv.md
index 498a1b4..fa8fd82 100644
--- a/doc/cli/nmo-import-csv.md
+++ b/doc/cli/nmo-import-csv.md
@@ -1,27 +1,30 @@
nmo-import-csv(1) -- Bulk import CSV files
-=================================
+==========================================
## SYNOPSIS
- nmo import-csv <file>, <couchdb-url> [delimiter=','] [columns=true]
+ nmo import-csv <file> <couchdb-url> [--delimiter=','] [--columns=true]
## DESCRIPTION
-Imports a csv file into CouchDB.
+Imports a csv file into CouchDB.
## CONFIGURATION:
delimiter
* Default: ','
* Type: String
+
The csv delimiter
columns
* Default: true
* Type: Boolean
- Whether to use the first row of the csv to define the key fields for each document
+
+ Whether to use the first row of the csv to define the key fields for
+ each document
## EXAMPLE
- nmo import-csv /path/to/file.cvs http://couchdb-url:5984 --delimiter=',' --columns=true
+ nmo import-csv /path/to/csv http://couch-url --columns=true
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/src/import-csv.js
----------------------------------------------------------------------
diff --git a/src/import-csv.js b/src/import-csv.js
index 5b72f1e..cad9039 100644
--- a/src/import-csv.js
+++ b/src/import-csv.js
@@ -28,7 +28,9 @@ export function cli (file, url, ...csvOptions) {
return importcsv.apply(importcsv, [file, url, opts]);
}
-export function importcsv (file, url, {delimiter= ',', columns= true}) {
+
+export default importcsv;
+function importcsv (file, url, {delimiter= ',', columns= true}) {
return new Promise((resolve, reject) => {
const input = fs.createReadStream(file)
.on('error', (err) => {
http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/a8d0b23d/test/import-csv.js
----------------------------------------------------------------------
diff --git a/test/import-csv.js b/test/import-csv.js
index e1eac3c..c86eb18 100644
--- a/test/import-csv.js
+++ b/test/import-csv.js
@@ -4,7 +4,8 @@ import Lab from 'lab';
export const lab = Lab.script();
import nock from 'nock';
import nmo from '../src/nmo.js';
-import {cli, importcsv} from '../src/import-csv.js';
+import {cli} from '../src/import-csv.js';
+import importcsv from '../src/import-csv.js';
const docs = {
"docs":[