You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by je...@apache.org on 2013/09/27 16:26:21 UTC
[17/50] [abbrv] webworks commit: [CB-4343] Remove parsing of project
name from create script.
[CB-4343] Remove parsing of project name from create script.
BAR file is now a constant and this value is unused.
The validation logic caused issues in CLI with spaces/special characters.
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/ed53b6c4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/ed53b6c4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/ed53b6c4
Branch: refs/heads/3.1.x
Commit: ed53b6c47ee62f7f2321553929a1fe085ddcdae4
Parents: 9bf2a4c
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Tue Aug 13 15:34:38 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Tue Aug 13 15:34:38 2013 -0400
----------------------------------------------------------------------
blackberry10/bin/create.js | 13 +------------
blackberry10/bin/test/cordova/integration/create.js | 4 ----
2 files changed, 1 insertion(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/ed53b6c4/blackberry10/bin/create.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/create.js b/blackberry10/bin/create.js
index 743e60c..889d875 100644
--- a/blackberry10/bin/create.js
+++ b/blackberry10/bin/create.js
@@ -32,7 +32,6 @@ var build,
version = getVersion(),
project_path = validateProjectPath(),
app_id = process.argv[3],
- bar_name = process.argv[4],
TARGETS = ["device", "simulator"],
TEMPLATE_PROJECT_DIR = path.join(__dirname, "templates", "project"),
MODULES_PROJECT_DIR = path.join(__dirname, "..", "node_modules"),
@@ -63,11 +62,6 @@ function validPackageName(packageName) {
return true;
}
-function validBarName(barName) {
- var barNameRegex = /^[a-zA-Z0-9._\-]+$/;
- return (typeof barName === "undefined") || barNameRegex.test(barName);
-}
-
function validateProjectPath() {
if (!process.argv[2]) {
console.log("You must give a project PATH");
@@ -89,11 +83,6 @@ function validate() {
console.log("[warning] App ID must be sequence of alpha-numeric (optionally seperated by '.') characters, no longer than 50 characters.\n" +
"special characters in '" + app_id + "' will be replaced by '_'");
}
- if (!validBarName(bar_name)) {
- console.log("BAR filename can only contain alpha-numeric, '.', '-' and '_' characters");
- help();
- process.exit(2);
- }
}
function clean() {
@@ -203,7 +192,7 @@ function updateProject() {
}
function help() {
- console.log("\nUsage: create <project path> [package name [BAR filename]] \n");
+ console.log("\nUsage: create <project path> [package name] \n");
console.log("Options: \n");
console.log(" -h, --help output usage information \n");
}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/ed53b6c4/blackberry10/bin/test/cordova/integration/create.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/test/cordova/integration/create.js b/blackberry10/bin/test/cordova/integration/create.js
index 1947896..6ac2d88 100644
--- a/blackberry10/bin/test/cordova/integration/create.js
+++ b/blackberry10/bin/test/cordova/integration/create.js
@@ -100,8 +100,4 @@ describe("create tests", function () {
expect(_output).toContain("App ID must be sequence of alpha-numeric (optionally seperated by '.') characters, no longer than 50 characters");
});
- it("Invalid barName error", function () {
- executeScript(CREATE_COMMAND, [appFolder, "com.example.app", "%bad@bar^name"], true);
- expect(_output).toContain("BAR filename can only contain alpha-numeric, '.', '-' and '_' characters");
- });
});