You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2016/02/08 15:44:58 UTC

[1/2] couchdb-nmo git commit: Change the way we store name and cli path and can now be get/set from the config

Repository: couchdb-nmo
Updated Branches:
  refs/heads/small-fixes [created] d77c39d3f


Change the way we store name and cli path
and can now be get/set from the config


Project: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/commit/559d3897
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/tree/559d3897
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-nmo/diff/559d3897

Branch: refs/heads/small-fixes
Commit: 559d38973e49fb9369964c9062e11f60c638cc57
Parents: 4d37f77
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Feb 8 14:12:24 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Feb 8 16:44:15 2016 +0200

----------------------------------------------------------------------
 bin/nmo-cli.js | 3 +++
 package.json   | 1 -
 src/help.js    | 4 +++-
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/559d3897/bin/nmo-cli.js
----------------------------------------------------------------------
diff --git a/bin/nmo-cli.js b/bin/nmo-cli.js
index 818f084..d4865f8 100755
--- a/bin/nmo-cli.js
+++ b/bin/nmo-cli.js
@@ -6,6 +6,7 @@ var xtend = require('xtend');
 var pkg = require('../package.json');
 var osenv = require('osenv');
 var fs = require('fs');
+var path = require('path');
 
 var nmo = require('../lib/nmo.js').default;
 var parsed = nopt({
@@ -19,6 +20,8 @@ var cmd = parsed.argv.remain.shift();
 var home = osenv.home();
 
 parsed.nmoconf = home + '/' + '.nmorc';
+parsed.cliroot = path.resolve(__dirname, '..');
+parsed.name = pkg.name;
 
 if (!fs.existsSync(parsed.nmoconf)) {
   fs.writeFileSync(parsed.nmoconf, '');

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/559d3897/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 7600471..432c646 100644
--- a/package.json
+++ b/package.json
@@ -46,7 +46,6 @@
     "xtend": "~4.0.0"
   },
   "devDependencies": {
-    "babel": "^6.1.18",
     "babel-cli": "^6.2.0",
     "babel-eslint": "^4.1.5",
     "babel-polyfill": "^6.2.0",

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/559d3897/src/help.js
----------------------------------------------------------------------
diff --git a/src/help.js b/src/help.js
index c135190..de6970e 100644
--- a/src/help.js
+++ b/src/help.js
@@ -24,13 +24,15 @@ export default help;
 export const cli = helpCli;
 function helpCli (cmd) {
   return new Promise((resolve, reject) => {
+    const name = nmo.config.get('name');
+    const helpDir = nmo.config.get('cliroot');
 
     if (!cmd || !nmo.commands[cmd]) {
       help();
       return resolve();
     }
 
-    const path = `${__dirname}/../man/man1/nmo-${cmd}.1`;
+    const path = `${helpDir}/man/man1/${name}-${cmd}.1`;
     const child = spawn('man', [path], {stdio: 'inherit'});
     resolve(child);
   });


[2/2] couchdb-nmo git commit: Add .md file extension to activetasks

Posted by ga...@apache.org.
Add .md file extension to activetasks


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

Branch: refs/heads/small-fixes
Commit: d77c39d3f990b1802ee85109cc9dda05e9acf323
Parents: 559d389
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Feb 8 14:12:51 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Feb 8 16:44:42 2016 +0200

----------------------------------------------------------------------
 doc/cli/nmo-activetasks    | 27 ---------------------------
 doc/cli/nmo-activetasks.md | 27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/d77c39d3/doc/cli/nmo-activetasks
----------------------------------------------------------------------
diff --git a/doc/cli/nmo-activetasks b/doc/cli/nmo-activetasks
deleted file mode 100644
index 200334b..0000000
--- a/doc/cli/nmo-activetasks
+++ /dev/null
@@ -1,27 +0,0 @@
-nmo-activetasks(1) -- view activetasks
-===========================================
-
-## SYNOPSIS
-
-    nmo activetasks cluster [<filter>] [--json]
-    nmo activetasks url [<filter>] [--json]
-
-
-## DESCRIPTION
-
-Get the list of active tasks from a specified url and filter it according to
-the supplied filter.
-
-The filter can be either the task type e.g replication, view_indexer or a
-database name found in either the source, target or database field.
-
-Example:
-
-This will get all the current activetasks
-    nmo activetasks mycluster
-
-This will get the replication active tasks from the CouchDB at the specified url
-    nmo activetasks http://127.0.0.1:5984 replication
-
-This will get all the current activetasks related the the datbase 'mydb'
-    nmo activetasks mycluster mydb

http://git-wip-us.apache.org/repos/asf/couchdb-nmo/blob/d77c39d3/doc/cli/nmo-activetasks.md
----------------------------------------------------------------------
diff --git a/doc/cli/nmo-activetasks.md b/doc/cli/nmo-activetasks.md
new file mode 100644
index 0000000..200334b
--- /dev/null
+++ b/doc/cli/nmo-activetasks.md
@@ -0,0 +1,27 @@
+nmo-activetasks(1) -- view activetasks
+===========================================
+
+## SYNOPSIS
+
+    nmo activetasks cluster [<filter>] [--json]
+    nmo activetasks url [<filter>] [--json]
+
+
+## DESCRIPTION
+
+Get the list of active tasks from a specified url and filter it according to
+the supplied filter.
+
+The filter can be either the task type e.g replication, view_indexer or a
+database name found in either the source, target or database field.
+
+Example:
+
+This will get all the current activetasks
+    nmo activetasks mycluster
+
+This will get the replication active tasks from the CouchDB at the specified url
+    nmo activetasks http://127.0.0.1:5984 replication
+
+This will get all the current activetasks related the the datbase 'mydb'
+    nmo activetasks mycluster mydb