You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2013/08/09 16:04:44 UTC
webworks commit: [CB-4076] Modified config-parser to default to the
uri attribute
Updated Branches:
refs/heads/master cfee530f6 -> 0dbdf3084
[CB-4076] Modified config-parser to default to the uri attribute
Reviewed by Bryan Higgins <bh...@blackberry.com>
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/0dbdf308
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/0dbdf308
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/0dbdf308
Branch: refs/heads/master
Commit: 0dbdf308456ac588b099cac1052190ba5dae6974
Parents: cfee530
Author: Kristoffer Flores <kf...@blackberry.com>
Authored: Thu Aug 8 11:43:29 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Fri Aug 9 10:05:10 2013 -0400
----------------------------------------------------------------------
.../bin/templates/project/cordova/lib/config-parser.js | 6 +++++-
blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/0dbdf308/blackberry10/bin/templates/project/cordova/lib/config-parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/config-parser.js b/blackberry10/bin/templates/project/cordova/lib/config-parser.js
index 0cb06e5..65b78a1 100644
--- a/blackberry10/bin/templates/project/cordova/lib/config-parser.js
+++ b/blackberry10/bin/templates/project/cordova/lib/config-parser.js
@@ -202,7 +202,11 @@ function processWidgetData(data, widgetConfig, session) {
} else {
attribs.subdomains = packagerUtils.toBoolean(attribs.subdomains);
if (attribs.uri || attribs.origin) {
- widgetConfig.accessList.push(createAccessListObj(attribs.uri || attribs.origin, attribs.subdomains));
+ if (uriExist === true && originExist === true) {
+ widgetConfig.accessList.push(createAccessListObj(attribs.uri, attribs.subdomains)); //using uri attribute by default
+ } else {
+ widgetConfig.accessList.push(createAccessListObj(attribs.uri || attribs.origin, attribs.subdomains));
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/0dbdf308/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js b/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
index 32cacf0..b526b01 100644
--- a/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
+++ b/blackberry10/bin/test/cordova/unit/spec/lib/config-parser.js
@@ -502,10 +502,10 @@ describe("config parser", function () {
//hasMultiAccess was set to false
expect(configObj.hasMultiAccess).toEqual(false);
expect(configObj.accessList).toEqual([ {
- origin : 'WIDGET_LOCAL',
+ uri : 'WIDGET_LOCAL',
allowSubDomain : true
}, {
- "origin" : "http://www.somedomain1.com"
+ "uri" : "http://www.somedomain1.com"
} ]);
});
});