cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject webworks commit: CB-5736 - target host is a required field
Date Tue, 07 Jan 2014 18:43:01 GMT
Updated Branches:
  refs/heads/master 9ae84e6fb -> 048fda118


CB-5736 - target host is a required field


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/048fda11
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/048fda11
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/048fda11

Branch: refs/heads/master
Commit: 048fda1186a724378e4ed12125a714002670b9a0
Parents: 9ae84e6
Author: Bryan Higgins <bhiggins@blackberry.com>
Authored: Tue Jan 7 13:45:27 2014 -0500
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Tue Jan 7 13:45:27 2014 -0500

----------------------------------------------------------------------
 blackberry10/bin/lib/target.js                      | 5 +++++
 blackberry10/bin/test/cordova/integration/target.js | 9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/048fda11/blackberry10/bin/lib/target.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/lib/target.js b/blackberry10/bin/lib/target.js
index eaabf91..d1afc58 100644
--- a/blackberry10/bin/lib/target.js
+++ b/blackberry10/bin/lib/target.js
@@ -91,6 +91,11 @@ commander
             console.log(commander.helpInformation());
             exit(ERROR_VALUE);
         }
+        if (typeof ip !== 'string') {
+            console.log("host is required");
+            console.log(commander.helpInformation());
+            exit(ERROR_VALUE);
+        }
         if (!isValidPin(pin)) {
             console.log("Invalid PIN: " + pin);
             console.log(commander.helpInformation());

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/048fda11/blackberry10/bin/test/cordova/integration/target.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/test/cordova/integration/target.js b/blackberry10/bin/test/cordova/integration/target.js
index 7030a97..74f562b 100644
--- a/blackberry10/bin/test/cordova/integration/target.js
+++ b/blackberry10/bin/test/cordova/integration/target.js
@@ -96,9 +96,9 @@ describe("cordova/target tests", function () {
         expect(_output).toContain("Target details not specified");
     });
 
-    it("should require ip for add", function () {
+    it("should require host for add", function () {
         executeScript(TARGET_COMMAND, ["add", "z10"], true);
-        expect(_output).toContain("IP is required");
+        expect(_output).toContain("host is required");
     });
 
     it("should warn unrecognized command", function () {
@@ -106,11 +106,6 @@ describe("cordova/target tests", function () {
         expect(_output).toContain("Unrecognized command");
     });
 
-    it("should warn invalid ip", function () {
-        executeScript(TARGET_COMMAND, ["add", "z10", "256.254.0.1"], true);
-        expect(_output).toContain("Invalid IP: 256.254.0.1");
-    });
-
     it("should warn invalid type", function () {
         executeScript(TARGET_COMMAND, ["add", "z10", "169.254.0.1", "-t", "bleh"], true);
         expect(_output).toContain("Invalid target type: bleh");


Mime
View raw message