ripple-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brentlint...@apache.org
Subject [1/2] incubator-ripple git commit: Revert "Validate command-line options."
Date Fri, 07 Aug 2015 14:30:59 GMT
Repository: incubator-ripple
Updated Branches:
  refs/heads/master 91343feb6 -> 86385ad34


Revert "Validate command-line options."

See RIPPLE-95. This is improper validation.

This reverts commit 5fcf93a50ff8eaea96ca8734f2ecb1259b48b5f3.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/8259649b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/8259649b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/8259649b

Branch: refs/heads/master
Commit: 8259649b0dc24aee31f7c9e55356e18224b76c29
Parents: 68f124a
Author: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
Authored: Sat Aug 1 11:05:09 2015 -0300
Committer: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
Committed: Sat Aug 1 11:05:09 2015 -0300

----------------------------------------------------------------------
 lib/cli/emulate.js | 28 ++--------------------------
 1 file changed, 2 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/8259649b/lib/cli/emulate.js
----------------------------------------------------------------------
diff --git a/lib/cli/emulate.js b/lib/cli/emulate.js
index bfa6b77..8648b6e 100644
--- a/lib/cli/emulate.js
+++ b/lib/cli/emulate.js
@@ -20,35 +20,11 @@
  */
 var self,
     open = require('open'),
-    emulate = require('./../server/emulate'),
-    help = require('./help'),
-    colors = require('colors');
-
-colors.mode = "console";
+    emulate = require('./../server/emulate');
 
 self = {
     call: function (opts) {
-        if (self.validateOptions(opts)) {
-            self.start(opts);
-        } else {
-            console.error(('Options not understood: ' + process.argv.splice(2).join(' ')).red.bold);
-            help.call('emulate');
-        }
-    },
-    validateOptions: function (opts) {
-        if (opts.path && opts.path.length !== 1) {
-            return false;
-        }
-        if (opts.port && opts.port.length !== 1) {
-            return false;
-        }
-        if (opts.remote && opts.remote.length !== 1) {
-            return false;
-        }
-        if (opts.route && opts.route.length !== 1) {
-            return false;
-        }
-        return true;
+        self.start(opts);
     },
     start: function (opts) {
         var app = emulate.start(opts);


Mime
View raw message