You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/03/23 23:23:36 UTC
android commit: CB-8735: Fixing the regex so that it's more compliant
with Java package rules
Repository: cordova-android
Updated Branches:
refs/heads/master 8d5cb00be -> e4c9bebe3
CB-8735: Fixing the regex so that it's more compliant with Java package rules
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/e4c9bebe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/e4c9bebe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/e4c9bebe
Branch: refs/heads/master
Commit: e4c9bebe34005a9246c8688c63d4079485c4115e
Parents: 8d5cb00
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Mar 23 15:23:30 2015 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Mar 23 15:23:30 2015 -0700
----------------------------------------------------------------------
bin/lib/create.js | 2 +-
spec/create.spec.js | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e4c9bebe/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 1d78d91..739c398 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -149,7 +149,7 @@ function copyScripts(projectPath) {
function validatePackageName(package_name) {
//Make the package conform to Java package types
//Enforce underscore limitation
- if (!/^[a-zA-Z]+(\.[a-zA-Z0-9][a-zA-Z0-9_]*)+$/.test(package_name)) {
+ if (!/^[a-zA-Z][a-zA-Z0-9_]+(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(package_name)) {
return Q.reject('Package name must look like: com.company.Name');
}
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e4c9bebe/spec/create.spec.js
----------------------------------------------------------------------
diff --git a/spec/create.spec.js b/spec/create.spec.js
index 8e08793..8385fc2 100644
--- a/spec/create.spec.js
+++ b/spec/create.spec.js
@@ -27,7 +27,8 @@ describe("create", function () {
var valid = [
"org.apache.mobilespec"
, "com.example"
- , "com.42floors.package"
+ , "com.floors42.package",
+ , "ball8.ball8.ball8ball",
];
var invalid = [
""
@@ -40,6 +41,10 @@ describe("create", function () {
, "_underscore.anything"
, "underscore._something"
, "_underscore._all._the._things"
+ , "8.ball",
+ , "8ball.ball",
+ , "ball8.8ball",
+ , "ball8.com.8ball"
];
valid.forEach(function(package_name) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org