You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/09/05 20:14:06 UTC
[01/50] git commit: CB-7255 Fixed writing plist unescaped
Repository: cordova-lib
Updated Branches:
refs/heads/master 61aee683e -> 5f499aaf9
CB-7255 Fixed writing plist unescaped
- Use current plist npm instead of plist-with-patches
- Solve resulting deprecation warnings
We originally switched to plist-with-patches to add some patches which didn't
get through to the upstream plist at the time. The upstream plist has those
fixes now, and some more.
github: close #70
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/62dd5f66
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/62dd5f66
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/62dd5f66
Branch: refs/heads/master
Commit: 62dd5f666ba875f18cf1898a4e3547025cdc5984
Parents: 04a624b
Author: Ulrich Geilmann <ug...@googlemail.com>
Authored: Mon Aug 4 22:45:06 2014 +0200
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
cordova-lib/spec-cordova/metadata/ios_parser.spec.js | 4 ++--
cordova-lib/spec-plugman/platforms/ios.spec.js | 2 +-
cordova-lib/spec-plugman/util/config-changes.spec.js | 2 +-
cordova-lib/src/cordova/metadata/ios_parser.js | 4 ++--
cordova-lib/src/plugman/platforms/ios.js | 4 ++--
cordova-lib/src/plugman/util/config-changes.js | 7 ++++---
cordova-lib/src/plugman/util/plist-helpers.js | 6 +++---
8 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 1518065..6bffa4d 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -25,7 +25,7 @@
"npm": "1.3.4",
"npmconf": "0.1.x",
"osenv": "0.0.x",
- "plist-with-patches": "0.5.x",
+ "plist": "1.0.x",
"properties-parser": "~0.2.3",
"q": "~0.9",
"rc": "0.3.0",
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
index 7cceb98..b17ce0d 100644
--- a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
@@ -20,7 +20,7 @@ var platforms = require('../../src/cordova/platforms'),
util = require('../../src/cordova/util'),
path = require('path'),
shell = require('shelljs'),
- plist = require('plist-with-patches'),
+ plist = require('plist'),
xcode = require('xcode'),
et = require('elementtree'),
fs = require('fs'),
@@ -89,7 +89,7 @@ describe('ios project parser', function () {
var update_name, xc_write;
beforeEach(function() {
mv = spyOn(shell, 'mv');
- plist_parse = spyOn(plist, 'parseFileSync').andReturn({
+ plist_parse = spyOn(plist, 'parse').andReturn({
});
plist_build = spyOn(plist, 'build').andReturn('');
update_name = jasmine.createSpy('update_name');
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/spec-plugman/platforms/ios.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/ios.spec.js b/cordova-lib/spec-plugman/platforms/ios.spec.js
index cc8dcfd..d0acd9e 100644
--- a/cordova-lib/spec-plugman/platforms/ios.spec.js
+++ b/cordova-lib/spec-plugman/platforms/ios.spec.js
@@ -23,7 +23,7 @@ var ios = require('../../src/plugman/platforms/ios'),
et = require('elementtree'),
shell = require('shelljs'),
os = require('osenv'),
- plist = require('plist-with-patches'),
+ plist = require('plist'),
bplist = require('bplist-parser'),
temp = path.join(os.tmpdir(), 'plugman'),
plugins_dir = path.join(temp, 'cordova', 'plugins'),
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/spec-plugman/util/config-changes.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/util/config-changes.spec.js b/cordova-lib/spec-plugman/util/config-changes.spec.js
index c7137ee..d745c18 100644
--- a/cordova-lib/spec-plugman/util/config-changes.spec.js
+++ b/cordova-lib/spec-plugman/util/config-changes.spec.js
@@ -28,7 +28,7 @@ var configChanges = require('../../src/plugman/util/config-changes'),
events = require('../../src/events'),
et = require('elementtree'),
path = require('path'),
- plist = require('plist-with-patches'),
+ plist = require('plist'),
shell = require('shelljs'),
xcode = require('xcode'),
temp = path.join(os.tmpdir(), 'plugman'),
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index fa136dc..a6254ac 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -29,7 +29,7 @@ var fs = require('fs'),
util = require('../util'),
events = require('../../events'),
shell = require('shelljs'),
- plist = require('plist-with-patches'),
+ plist = require('plist'),
Q = require('q'),
ConfigParser = require('../../configparser/ConfigParser'),
CordovaError = require('../../CordovaError');
@@ -65,7 +65,7 @@ module.exports.prototype = {
// Update package id (bundle id)
var plistFile = path.join(this.cordovaproj, this.originalName + '-Info.plist');
- var infoPlist = plist.parseFileSync(plistFile);
+ var infoPlist = plist.parse(fs.readFileSync(plistFile, 'utf8'));
infoPlist['CFBundleIdentifier'] = pkg;
// Update version (bundle version)
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/src/plugman/platforms/ios.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ios.js b/cordova-lib/src/plugman/platforms/ios.js
index 6e2f3fd..49336fc 100644
--- a/cordova-lib/src/plugman/platforms/ios.js
+++ b/cordova-lib/src/plugman/platforms/ios.js
@@ -26,7 +26,7 @@ var path = require('path')
, fs = require('fs')
, glob = require('glob')
, xcode = require('xcode')
- , plist = require('plist-with-patches')
+ , plist = require('plist')
, shell = require('shelljs')
, events = require('../../events')
, cachedProjectFiles = {}
@@ -38,7 +38,7 @@ module.exports = {
},
package_name:function(project_dir) {
var plist_file = glob.sync(path.join(project_dir, '**', '*-Info.plist'))[0];
- return plist.parseFileSync(plist_file).CFBundleIdentifier;
+ return plist.parse(fs.readFileSync(plist_file, 'utf8')).CFBundleIdentifier;
},
'source-file':{
install:function(source_el, plugin_dir, project_dir, plugin_id, project) {
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index f93a9b5..6e713f5 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -38,7 +38,7 @@
var fs = require('fs'),
path = require('path'),
glob = require('glob'),
- plist = require('plist-with-patches'),
+ plist = require('plist'),
bplist = require('bplist-parser'),
et = require('elementtree'),
semver = require('semver'),
@@ -554,8 +554,9 @@ function ConfigFile_load() {
// We always write out text plist, not binary.
// Do we still need to support binary plist?
// If yes, use plist.parseStringSync() and read the file once.
- self.plist_module = (isBinaryPlist(filepath) ? bplist : plist);
- self.data = self.plist_module.parseFileSync(filepath);
+ self.data = isBinaryPlist(filepath) ?
+ bplist.parseBuffer(fs.readFileSync(filepath)) :
+ plist.parse(fs.readFileSync(filepath, 'utf8'));
}
}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/62dd5f66/cordova-lib/src/plugman/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/plist-helpers.js b/cordova-lib/src/plugman/util/plist-helpers.js
index b8d93f2..605a6c2 100644
--- a/cordova-lib/src/plugman/util/plist-helpers.js
+++ b/cordova-lib/src/plugman/util/plist-helpers.js
@@ -23,12 +23,12 @@
// contains PLIST utility functions
-var plist = require('plist-with-patches');
+var plist = require('plist');
// adds node to doc at selector
module.exports.graftPLIST = graftPLIST;
function graftPLIST(doc, xml, selector) {
- var obj = plist.parseStringSync('<plist>'+xml+'</plist>');
+ var obj = plist.parse('<plist>'+xml+'</plist>');
var node = doc[selector];
if (node && Array.isArray(node) && Array.isArray(obj))
@@ -42,7 +42,7 @@ function graftPLIST(doc, xml, selector) {
// removes node from doc at selector
module.exports.prunePLIST = prunePLIST;
function prunePLIST(doc, xml, selector) {
- var obj = plist.parseStringSync('<plist>'+xml+'</plist>');
+ var obj = plist.parse('<plist>'+xml+'</plist>');
pruneOBJECT(doc, selector, obj);
[12/50] git commit: Well that looks like an error
Posted by an...@apache.org.
Well that looks like an error
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/629ce77d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/629ce77d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/629ce77d
Branch: refs/heads/master
Commit: 629ce77df5a7f6f1b61c4aff08a05f5910764484
Parents: b5b7b4d
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Aug 15 14:53:03 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/metadata/windows8_parser.spec.js | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/629ce77d/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
index 7e03404..2d9c3f3 100644
--- a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
@@ -147,7 +147,6 @@ describe('windows8 project parser', function() {
beforeEach(function() {
config = spyOn(parser, 'update_from_config');
www = spyOn(parser, 'update_www');
- www = spyOn(parser, 'update_project');
shellls = spyOn(shell, 'ls').andReturn([]);
svn = spyOn(util, 'deleteSvnFolders');
exists.andReturn(false);
[35/50] git commit: ubuntu: support target-dir for resource-file
Posted by an...@apache.org.
ubuntu: support target-dir for resource-file
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/e7b09b5c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e7b09b5c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e7b09b5c
Branch: refs/heads/master
Commit: e7b09b5cc9989f8439e877c7ed0cd38c3cecc2ea
Parents: 55c3d1e
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Tue Aug 19 15:10:17 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/ubuntu.js | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e7b09b5c/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
index 89e0ed8..4fd01f2 100644
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -92,10 +92,14 @@ module.exports = {
'resource-file':{
install:function(source_el, plugin_dir, project_dir, plugin_id) {
var dest = path.join('qml', path.basename(source_el.attrib.src));
+ if (source_el.attrib['target-dir'])
+ dest = path.join(source_el.attrib['target-dir'], path.basename(source_el.attrib.src));
common.copyFile(plugin_dir, source_el.attrib.src, project_dir, dest);
},
uninstall:function(source_el, project_dir, plugin_id) {
var dest = path.join(project_dir, 'qml');
+ if (source_el.attrib['target-dir'])
+ dest = path.join(project_dir, source_el.attrib['target-dir']);
shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
}
},
[17/50] git commit: Fixing failing tests: update_proj should be
update_project
Posted by an...@apache.org.
Fixing failing tests: update_proj should be update_project
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b5b7b4d4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b5b7b4d4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b5b7b4d4
Branch: refs/heads/master
Commit: b5b7b4d49e9a854b8d1c958d1af5c230f50dd773
Parents: 29adcc8
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Aug 15 14:29:45 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/metadata/windows8_parser.spec.js | 6 +++---
cordova-lib/spec-cordova/metadata/wp8_parser.spec.js | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b5b7b4d4/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
index 75b651c..7e03404 100644
--- a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
@@ -132,9 +132,9 @@ describe('windows8 project parser', function() {
});
});
describe('update_www method', function() {
- var update_proj;
+ var update_project;
beforeEach(function() {
- update_proj = spyOn(parser, 'update_proj');
+ update_project = spyOn(parser, 'update_project');
});
it('should rm project-level www and cp in platform agnostic www', function() {
parser.update_www(path.join('lib','dir'));
@@ -147,7 +147,7 @@ describe('windows8 project parser', function() {
beforeEach(function() {
config = spyOn(parser, 'update_from_config');
www = spyOn(parser, 'update_www');
- www = spyOn(parser, 'update_proj');
+ www = spyOn(parser, 'update_project');
shellls = spyOn(shell, 'ls').andReturn([]);
svn = spyOn(util, 'deleteSvnFolders');
exists.andReturn(false);
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b5b7b4d4/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
index 45c5e4a..2c5451c 100644
--- a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
@@ -147,9 +147,9 @@ describe('wp8 project parser', function() {
});
});
describe('update_www method', function() {
- var update_proj;
+ var update_project;
beforeEach(function() {
- update_proj = spyOn(p, 'update_proj');
+ update_project = spyOn(p, 'update_project');
});
it('should rm project-level www and cp in platform agnostic www', function() {
p.update_www();
@@ -158,12 +158,12 @@ describe('wp8 project parser', function() {
});
});
describe('update_project method', function() {
- var config, www, overrides, svn, csproj;
+ var config, www, overrides, svn, proj;
beforeEach(function() {
config = spyOn(p, 'update_from_config');
www = spyOn(p, 'update_www');
svn = spyOn(util, 'deleteSvnFolders');
- csproj = spyOn(p, 'update_proj');
+ proj = spyOn(p, 'update_project');
exists.andReturn(false);
});
it('should call update_from_config', function(done) {
[16/50] git commit: ffos: Make author url optional
Posted by an...@apache.org.
ffos: Make author url optional
github: close #74
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/2b32d93a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/2b32d93a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/2b32d93a
Branch: refs/heads/master
Commit: 2b32d93a6c39909f5565f198d70d2364df53d745
Parents: 6050e93
Author: Rodrigo Silveira <ro...@outlook.com>
Authored: Tue Aug 19 12:12:59 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/metadata/firefoxos_parser.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2b32d93a/cordova-lib/src/cordova/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/firefoxos_parser.js b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
index 0ec5b6d..e3f4818 100644
--- a/cordova-lib/src/cordova/metadata/firefoxos_parser.js
+++ b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
@@ -61,7 +61,7 @@ module.exports.prototype = {
};
var authorNode = config.doc.find('author');
- var authorUrl = authorNode.attrib['href'];
+ var authorUrl = authorNode && authorNode.attrib['href'];
if (authorUrl) {
manifest.developer.url = authorUrl;
[06/50] git commit: Style fixes - white space only
Posted by an...@apache.org.
Style fixes - white space only
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/dac44fcc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/dac44fcc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/dac44fcc
Branch: refs/heads/master
Commit: dac44fcc1fdec3a775c696e20495aa07b8e36e9e
Parents: b4a485e
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Wed Aug 6 13:14:09 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/events.js | 2 +-
cordova-lib/src/plugman/plugman.js | 16 ++++++++--------
cordova-lib/src/plugman/util/config-changes.js | 2 +-
cordova-lib/src/util/windows/jsproj.js | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/dac44fcc/cordova-lib/src/events.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/events.js b/cordova-lib/src/events.js
index 8c9272d..a6ec340 100644
--- a/cordova-lib/src/events.js
+++ b/cordova-lib/src/events.js
@@ -16,4 +16,4 @@
specific language governing permissions and limitations
under the License.
*/
-module.exports = new (require('events').EventEmitter)();
\ No newline at end of file
+module.exports = new (require('events').EventEmitter)();
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/dac44fcc/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 5598628..d39544b 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -102,10 +102,10 @@ plugman.commands = {
var cli_variables = {};
if (cli_opts.variable) {
cli_opts.variable.forEach(function (variable) {
- var tokens = variable.split('=');
- var key = tokens.shift().toUpperCase();
- if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
- });
+ var tokens = variable.split('=');
+ var key = tokens.shift().toUpperCase();
+ if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
+ });
}
var opts = {
subdir: '.',
@@ -208,10 +208,10 @@ plugman.commands = {
var cli_variables = {};
if (cli_opts.variable) {
cli_opts.variable.forEach(function (variable) {
- var tokens = variable.split('=');
- var key = tokens.shift().toUpperCase();
- if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
- });
+ var tokens = variable.split('=');
+ var key = tokens.shift().toUpperCase();
+ if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
+ });
}
plugman.create( cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || '.', cli_variables );
},
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/dac44fcc/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index b8b21c5..f93a9b5 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -357,7 +357,7 @@ function generate_plugin_config_munge(plugin_dir, vars) {
var parent = change.attrib['parent'];
var after = change.attrib['after'];
var xmls = change.getchildren();
- xmls.forEach(function(xml) {
+ xmls.forEach(function(xml) {
// 1. stringify each xml
var stringified = (new et.ElementTree(xml)).write({xml_declaration:false});
// interp vars
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/dac44fcc/cordova-lib/src/util/windows/jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/util/windows/jsproj.js b/cordova-lib/src/util/windows/jsproj.js
index d1cd7e4..d847603 100644
--- a/cordova-lib/src/util/windows/jsproj.js
+++ b/cordova-lib/src/util/windows/jsproj.js
@@ -135,7 +135,7 @@ jsproj.prototype = {
relative_path.forEach(function(filePath) {
filePath = filePath.split('/').join('\\');
filePath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + filePath : filePath;
-
+
var content = new et.Element('Content');
content.attrib.Include = filePath;
item.append(content);
[49/50] git commit: CB-7457 - Add malformed plugin for tests
Posted by an...@apache.org.
CB-7457 - Add malformed plugin for tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/5750b766
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/5750b766
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/5750b766
Branch: refs/heads/master
Commit: 5750b766cacac47aed1b96e76f43587cdc15ce9a
Parents: 11e1c89
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Sep 3 14:05:28 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
.../spec-cordova/fixtures/plugins/malformed/plugin.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/5750b766/cordova-lib/spec-cordova/fixtures/plugins/malformed/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/fixtures/plugins/malformed/plugin.xml b/cordova-lib/spec-cordova/fixtures/plugins/malformed/plugin.xml
new file mode 100644
index 0000000..d7c1884
--- /dev/null
+++ b/cordova-lib/spec-cordova/fixtures/plugins/malformed/plugin.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+< <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+ id="org.apache.cordova.fakeplugin1"
+ version="0.1.0-dev">
+ <name>malformed</name>
+ <description>Cordova malformed plugin for tests</description>
+ <license>Apache 2.0</license>
+ <keywords>cordova,cli,test</keywords>
+</plugin>
[27/50] git commit: CB-7416 Fixes file path reference when adding new
source file
Posted by an...@apache.org.
CB-7416 Fixes file path reference when adding new source file
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/4b3b55dc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/4b3b55dc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/4b3b55dc
Branch: refs/heads/master
Commit: 4b3b55dc722f95c5edc7b51ece4d8d7ba5823f8f
Parents: 241a786
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Aug 28 13:05:50 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/windows.js | 2 +-
cordova-lib/src/util/windows/jsproj.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4b3b55dc/cordova-lib/src/plugman/platforms/windows.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows.js b/cordova-lib/src/plugman/platforms/windows.js
index c8e1511..dc5089f 100644
--- a/cordova-lib/src/plugman/platforms/windows.js
+++ b/cordova-lib/src/plugman/platforms/windows.js
@@ -69,7 +69,7 @@ module.exports = {
},
uninstall:function(source_el, project_dir, plugin_id, project_file) {
var dest = path.join('www', 'plugins', plugin_id,
- source_el.attrib['target-dir'] ? source_el.attrib['target-dir'] : '',
+ source_el.attrib['target-dir'] || '',
path.basename(source_el.attrib['src']));
common.removeFile(project_dir, dest);
// remove reference to this file from csproj.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/4b3b55dc/cordova-lib/src/util/windows/jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/util/windows/jsproj.js b/cordova-lib/src/util/windows/jsproj.js
index d847603..a20fe7f 100644
--- a/cordova-lib/src/util/windows/jsproj.js
+++ b/cordova-lib/src/util/windows/jsproj.js
@@ -131,10 +131,10 @@ jsproj.prototype = {
}
// make ItemGroup to hold file.
var item = new et.Element('ItemGroup');
-
+ var me = this;
relative_path.forEach(function(filePath) {
filePath = filePath.split('/').join('\\');
- filePath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + filePath : filePath;
+ filePath = me.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + filePath : filePath;
var content = new et.Element('Content');
content.attrib.Include = filePath;
[40/50] git commit: CB-7347 Improve cordova platform add /path/to
handling
Posted by an...@apache.org.
CB-7347 Improve cordova platform add /path/to handling
split name/path errors
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/586d8744
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/586d8744
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/586d8744
Branch: refs/heads/master
Commit: 586d8744ceb7cd36177c45d73f9dd68c43e249fb
Parents: ea717cb
Author: Josh Soref <js...@blackberry.com>
Authored: Tue Aug 19 12:13:59 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/platform.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/586d8744/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index 7a01783..58e7f24 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -350,12 +350,16 @@ function platform(command, targets, opts) {
var pPath = path.resolve(t);
if (fs.existsSync(pPath)) return;
// Neither path, nor platform name - throw.
- var msg = 'Platform "' + t +
+ var msg;
+ if (/[~:/\\.]/.test(t)) {
+ msg = 'Platform path "' + t + '" not found.';
+ } else {
+ msg = 'Platform "' + t +
'" not recognized as a core cordova platform. See `' +
cordova_util.binname + ' platform list`.'
;
+ }
throw new CordovaError(msg);
-
});
} else if (command == 'add' || command == 'rm') {
msg = 'You need to qualify `add` or `remove` with one or more platforms!';
[48/50] git commit: updated Releasenotes.md
Posted by an...@apache.org.
updated Releasenotes.md
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/35fe7cb9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/35fe7cb9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/35fe7cb9
Branch: refs/heads/master
Commit: 35fe7cb95d7c78cdc678a2e243e09ae4553da1f4
Parents: b88a2f6
Author: Steven Gill <st...@gmail.com>
Authored: Tue Sep 2 17:34:45 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/RELEASENOTES.md | 144 ++++++++++++++++-----------------------
1 file changed, 60 insertions(+), 84 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/35fe7cb9/cordova-lib/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/cordova-lib/RELEASENOTES.md b/cordova-lib/RELEASENOTES.md
index 0c539c5..bd5b287 100644
--- a/cordova-lib/RELEASENOTES.md
+++ b/cordova-lib/RELEASENOTES.md
@@ -20,66 +20,6 @@
-->
# Cordova-lib Release Notes
-
-### 0.21.4 (Jun 23, 2014)
-* CB-3571, CB-2606: support for splashscreens
-* CB-6976 Add support for Windows Universal apps (Windows 8.1 and WP 8.1)
-* Use Plugininfo module to determine plugin id and version
-* Fix plugin check error, when plugin dependency with specific version is given
-* CB-6709 Do not create merges/ folder when adding a platform
-* CB-6140 Don't allow deletion of platform dependencies
-* CB-6698: Fix 'android update lib-project' to work with paths containing spaces
-* CB-6973: Run JSHint on all code in src/ via npm test
-* CB-6542: Delay creating project until there's some chance that it will succeed
-* folder_contents() now ignores .svn folders
-* CB-6970 Share win project files manipulation code between cordova and plugman
-* CB-6954: Share events.js between cordova and plugman
-* CB-6698 Automatically copy sub-libraries to project's directory
-* Revert "CB-6698 Resolve android <framework> relative to plugin_dir when custom=true"
-* CB-6942 Describe running hooks only in verbose mode.
-* CB-6512: Allow "cordova platform add /path/to/platform/files"
-* Update hooks-README.md - shebang line in hooks on Windows.
-* CB-6895 Add more config properties into manifest
-* Allow "cordova platform add platform@version"
-* Add util func for chaining promises
-* removing doWrap from prepare
-* adding configurable attribute
-* cleaning up plugman.js for uninstall
-* adding param to uninstall
-* adding support for prepare flag
-* adding prepare-browserify
-* adding options to prepare
-* adding and freezing cordova-js
-* [CB-6879] config parser breakout into a cordova level module
-* CB-6698 Resolve android <framework> relative to plugin_dir when custom=true
-* Fix tests on node 0.11.x
-* Fix android <framework> unit tests to not expect end of line.
-* CB-6024: Accept cli vars as part of opts param
-* Refer properties-parser package from NPM.
-* CB-6859 Removed all wp7 references, tests still passing
-* Extract AndroidProject class into a separate .js file
-* CB-6698: Support library references for Android via the framework tag
-* CB-6854 Strip BOM when adding cordova.define() to js-modules
-* Add npm cache based downloading to lazy_load
-* Use PluginInfo in plugman/install.js
-* Extend PluginInfo to parse more of plugin.xml
-* CB-6772 Provide a default for AndroidLaunchMode
-* CB-6711: Use parseProjectFile when working with XCode projects.
-* Start using PluginInfo object in plugman/install.js
-* CB-6709 Remove merges/ folder for default apps
-* support for shrinkwrap flag
-* Initial implementation for restore and save plugin
-* CB-6668: Use <description> for "plugin ls" when <name> is missing.
-* Add --noregstry flag for disabling plugin lookup in the registry
-* Remove --force from default npm settings for plugin registry
-* Use "npm info" for fetching plugin metadata
-* Use "npm cache add" for downloading plugins
-* CB-6691: Change some instances of Error() to CordovaError()
-
-
-### 0.21.1
-Initial release v0.21.1 (picks up from the same version number as plugman was).
-
### 0.21.8 (Aug 29, 2014)
* CB-5535: Remove "--arc" from ios platform creation args
* CB-7416 Fixes file path reference when adding new source file
@@ -156,27 +96,63 @@ Initial release v0.21.1 (picks up from the same version number as plugman was).
* CB-7087 Retire blackberry10/ directory
* CB-6776: Fix uri/url renaming bug
* Remove npm-shrinkwrap.json
-* Look at the old uri in config.json in addition to the new url (i vs. l).
-* Add --captureExceptions flag to jasmine
-* CB-6992 Fix ios platform add/prepare when app name contains unicode chars
-* CB-7070 Don't create hooks/ if it already exists
-* CB-6357 (fix latent bug)
-* CB-6776 (correct windows8 fallback path)
-* CB-6776 (avoid stomping on global platforms properties)
-* CB-7065 lazy_load: do not append tgz for non urls
-* CB-7063 (fix case of Q)
-* CB-6776 (use .extend instead of custom mixin function)
-* CB-6776 Make project/.cordova/config.json integrate with platforms.js
-* CB-7056 make tests conditional using it/xit instead of iit/it
-* CB-7045 (fix up quotes to make jshint happy)
-* CB-7063 save.spec and restore.spec use a proper spy
-* CB-7056 serve: fix Android test, make tests conditional
-* CB-7037 platform check doesn't warn when it can't install a platform
-* removed extra whitespace
-* removed "pkgName "
-* CB-7056 serve: return promise of server
-* CB-7045 plugman.install: engine.currentVersion should be a semver or null
-* CB-7045 plugman.install.spec: shell.which depends on plugman.raw.fetch actually being called
-* CB-7042 serve.spec: really expect not a Cordova-based project exception
-* CB-7042 serve.spec: enable basic serve test
-* CB-6879 fix cordova serve
+
+
+### 0.21.4 (Jun 23, 2014)
+* CB-3571, CB-2606: support for splashscreens
+* CB-6976 Add support for Windows Universal apps (Windows 8.1 and WP 8.1)
+* Use Plugininfo module to determine plugin id and version
+* Fix plugin check error, when plugin dependency with specific version is given
+* CB-6709 Do not create merges/ folder when adding a platform
+* CB-6140 Don't allow deletion of platform dependencies
+* CB-6698: Fix 'android update lib-project' to work with paths containing spaces
+* CB-6973: Run JSHint on all code in src/ via npm test
+* CB-6542: Delay creating project until there's some chance that it will succeed
+* folder_contents() now ignores .svn folders
+* CB-6970 Share win project files manipulation code between cordova and plugman
+* CB-6954: Share events.js between cordova and plugman
+* CB-6698 Automatically copy sub-libraries to project's directory
+* Revert "CB-6698 Resolve android <framework> relative to plugin_dir when custom=true"
+* CB-6942 Describe running hooks only in verbose mode.
+* CB-6512: Allow "cordova platform add /path/to/platform/files"
+* Update hooks-README.md - shebang line in hooks on Windows.
+* CB-6895 Add more config properties into manifest
+* Allow "cordova platform add platform@version"
+* Add util func for chaining promises
+* removing doWrap from prepare
+* adding configurable attribute
+* cleaning up plugman.js for uninstall
+* adding param to uninstall
+* adding support for prepare flag
+* adding prepare-browserify
+* adding options to prepare
+* adding and freezing cordova-js
+* [CB-6879] config parser breakout into a cordova level module
+* CB-6698 Resolve android <framework> relative to plugin_dir when custom=true
+* Fix tests on node 0.11.x
+* Fix android <framework> unit tests to not expect end of line.
+* CB-6024: Accept cli vars as part of opts param
+* Refer properties-parser package from NPM.
+* CB-6859 Removed all wp7 references, tests still passing
+* Extract AndroidProject class into a separate .js file
+* CB-6698: Support library references for Android via the framework tag
+* CB-6854 Strip BOM when adding cordova.define() to js-modules
+* Add npm cache based downloading to lazy_load
+* Use PluginInfo in plugman/install.js
+* Extend PluginInfo to parse more of plugin.xml
+* CB-6772 Provide a default for AndroidLaunchMode
+* CB-6711: Use parseProjectFile when working with XCode projects.
+* Start using PluginInfo object in plugman/install.js
+* CB-6709 Remove merges/ folder for default apps
+* support for shrinkwrap flag
+* Initial implementation for restore and save plugin
+* CB-6668: Use <description> for "plugin ls" when <name> is missing.
+* Add --noregstry flag for disabling plugin lookup in the registry
+* Remove --force from default npm settings for plugin registry
+* Use "npm info" for fetching plugin metadata
+* Use "npm cache add" for downloading plugins
+* CB-6691: Change some instances of Error() to CordovaError()
+
+
+### 0.21.1
+Initial release v0.21.1 (picks up from the same version number as plugman was).
[21/50] git commit: Taking care of dashes in amazon-fireos platform
name.
Posted by an...@apache.org.
Taking care of dashes in amazon-fireos platform name.
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/6491f0c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/6491f0c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/6491f0c3
Branch: refs/heads/master
Commit: 6491f0c35774284528277586d515bafde5d5966d
Parents: d3cffc8
Author: Archana Naik <na...@lab126.com>
Authored: Thu Aug 14 12:06:39 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/platform.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6491f0c3/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index dca8ed4..2cb8c2e 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -111,6 +111,9 @@ function add(hooks, projectRoot, targets, opts) {
// Package names for Cordova platforms look like "cordova-ios".
var nameParts = pkg.name.split('-');
var name = nameParts[1];
+ if (name == 'amazon') {
+ name = 'amazon-fireos';
+ }
if( !platforms[name] ) {
throw new CordovaError(msg);
}
[20/50] git commit: Fix failing tests. update_jsproj and
update_csproj are now just update_proj
Posted by an...@apache.org.
Fix failing tests. update_jsproj and update_csproj are now just update_proj
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/29adcc80
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/29adcc80
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/29adcc80
Branch: refs/heads/master
Commit: 29adcc80dfe0418dac5f34ad1fa6479f68c08705
Parents: 247a5f4
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Aug 15 14:17:17 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/metadata/windows8_parser.spec.js | 6 +++---
cordova-lib/spec-cordova/metadata/wp8_parser.spec.js | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/29adcc80/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
index b4b804f..75b651c 100644
--- a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
@@ -132,9 +132,9 @@ describe('windows8 project parser', function() {
});
});
describe('update_www method', function() {
- var update_jsproj;
+ var update_proj;
beforeEach(function() {
- update_jsproj = spyOn(parser, 'update_jsproj');
+ update_proj = spyOn(parser, 'update_proj');
});
it('should rm project-level www and cp in platform agnostic www', function() {
parser.update_www(path.join('lib','dir'));
@@ -147,7 +147,7 @@ describe('windows8 project parser', function() {
beforeEach(function() {
config = spyOn(parser, 'update_from_config');
www = spyOn(parser, 'update_www');
- www = spyOn(parser, 'update_jsproj');
+ www = spyOn(parser, 'update_proj');
shellls = spyOn(shell, 'ls').andReturn([]);
svn = spyOn(util, 'deleteSvnFolders');
exists.andReturn(false);
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/29adcc80/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
index bf05411..45c5e4a 100644
--- a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
@@ -147,9 +147,9 @@ describe('wp8 project parser', function() {
});
});
describe('update_www method', function() {
- var update_csproj;
+ var update_proj;
beforeEach(function() {
- update_csproj = spyOn(p, 'update_csproj');
+ update_proj = spyOn(p, 'update_proj');
});
it('should rm project-level www and cp in platform agnostic www', function() {
p.update_www();
@@ -163,7 +163,7 @@ describe('wp8 project parser', function() {
config = spyOn(p, 'update_from_config');
www = spyOn(p, 'update_www');
svn = spyOn(util, 'deleteSvnFolders');
- csproj = spyOn(p, 'update_csproj');
+ csproj = spyOn(p, 'update_proj');
exists.andReturn(false);
});
it('should call update_from_config', function(done) {
[24/50] git commit: Fix jshint errors in amazon_fireos_parser : mixed
single/double quotes
Posted by an...@apache.org.
Fix jshint errors in amazon_fireos_parser : mixed single/double quotes
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/247a5f49
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/247a5f49
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/247a5f49
Branch: refs/heads/master
Commit: 247a5f498bc32e970a90f9f4eca19d45463bd6fe
Parents: 17da68b
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Aug 15 13:42:52 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
.../src/cordova/metadata/amazon_fireos_parser.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/247a5f49/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
index 4878f4e..517cd49 100644
--- a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
+++ b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
@@ -227,8 +227,8 @@ handleIcons: function(config) {
// Update the version by changing the AndroidManifest android:versionName
var version = config.version();
var versionCode = config.android_versionCode() || default_versionCode(version);
- manifest.getroot().attrib["android:versionName"] = version;
- manifest.getroot().attrib["android:versionCode"] = versionCode;
+ manifest.getroot().attrib['android:versionName'] = version;
+ manifest.getroot().attrib['android:versionCode'] = versionCode;
// Update package name by changing the AndroidManifest id and moving the entry class around to the proper package directory
var pkg = config.packageName();
@@ -243,22 +243,22 @@ handleIcons: function(config) {
if (orientationPref) {
switch (orientationPref) {
case 'default':
- delete act.attrib["android:screenOrientation"];
+ delete act.attrib['android:screenOrientation'];
break;
case 'portrait':
- act.attrib["android:screenOrientation"] = 'portrait';
+ act.attrib['android:screenOrientation'] = 'portrait';
break;
case 'landscape':
- act.attrib["android:screenOrientation"] = 'landscape';
+ act.attrib['android:screenOrientation'] = 'landscape';
}
}
// Set android:launchMode in AndroidManifest
var androidLaunchModePref = this.findAndroidLaunchModePreference(config);
if (androidLaunchModePref) {
- act.attrib["android:launchMode"] = androidLaunchModePref;
+ act.attrib['android:launchMode'] = androidLaunchModePref;
} else { // User has (explicitly) set an invalid value for AndroidLaunchMode preference
- delete act.attrib["android:launchMode"]; // use Android default value (standard)
+ delete act.attrib['android:launchMode']; // use Android default value (standard)
}
// Write out AndroidManifest.xml
[26/50] git commit: CB-7416 handleInstall tests for null platformTag.
removed uncalled 'hasPlatformSection' from PluginInfo.js
Posted by an...@apache.org.
CB-7416 handleInstall tests for null platformTag. removed uncalled 'hasPlatformSection' from PluginInfo.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/241a7861
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/241a7861
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/241a7861
Branch: refs/heads/master
Commit: 241a786123e96e357869fb3d881554427308fe25
Parents: d406be5
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Aug 27 13:53:05 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/PluginInfo.js | 7 -------
cordova-lib/src/plugman/install.js | 4 ++--
2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/241a7861/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/PluginInfo.js b/cordova-lib/src/PluginInfo.js
index dcc1da5..1d2b24a 100644
--- a/cordova-lib/src/PluginInfo.js
+++ b/cordova-lib/src/PluginInfo.js
@@ -200,13 +200,6 @@ function PluginInfo(dirname) {
var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, cloneAttribs);
return libFiles;
}
-
- // Tell whether there is a <platform> section for the given platform.
- self.hasPlatformSection = hasPlatformSection;
- function hasPlatformSection(platform) {
- var platformTag = pelem.find('./platform[@name="' + platform + '"]');
- return !!platformTag;
- }
///// End of PluginInfo methods /////
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/241a7861/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index 83834b4..045afb7 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -512,19 +512,19 @@ function handleInstall(actions, pluginInfo, platform, project_dir, plugins_dir,
var handler = platform_modules[platform];
var platformTag = pluginInfo._et.find('./platform[@name="'+platform+'"]');
+
// CB-6976 Windows Universal Apps. For smooth transition and to prevent mass api failures
// we allow using windows8 tag for new windows platform
if (platform == 'windows' && !platformTag) {
platformTag = pluginInfo._et.find('platform[@name="' + 'windows8' + '"]');
}
- if ( pluginInfo.hasPlatformSection(platform) ) {
+ if (platformTag) {
var sourceFiles = platformTag.findall('./source-file'),
headerFiles = platformTag.findall('./header-file'),
resourceFiles = platformTag.findall('./resource-file'),
frameworkFiles = platformTag.findall('./framework'),
libFiles = platformTag.findall('./lib-file');
-
// queue up native stuff
sourceFiles && sourceFiles.forEach(function(item) {
actions.push(actions.createAction(handler['source-file'].install,
[13/50] git commit: windows: update as per changed manifest file names
Posted by an...@apache.org.
windows: update as per changed manifest file names
See https://github.com/apache/cordova-windows/commit/bdc4af329c02658ed989b3e9b4013f81c3626cd6
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/985b3bb8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/985b3bb8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/985b3bb8
Branch: refs/heads/master
Commit: 985b3bb8f33743feb3748cd1e57de6055616dee1
Parents: 7b104f9
Author: sgrebnov <v-...@microsoft.com>
Authored: Sat Aug 16 16:55:45 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/windows.js | 4 ++--
cordova-lib/src/plugman/util/config-changes.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/985b3bb8/cordova-lib/src/plugman/platforms/windows.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows.js b/cordova-lib/src/plugman/platforms/windows.js
index 803a3c8..c8e1511 100644
--- a/cordova-lib/src/plugman/platforms/windows.js
+++ b/cordova-lib/src/plugman/platforms/windows.js
@@ -39,8 +39,8 @@ module.exports = {
package_name:function(project_dir) {
// CB-6976 Windows Universal Apps. To make platform backward compatible
// with old template we look for package.appxmanifest file as well.
- var manifestPath = fs.existsSync(path.join(project_dir, 'package.store.appxmanifest')) ?
- path.join(project_dir, 'package.store.appxmanifest') :
+ var manifestPath = fs.existsSync(path.join(project_dir, 'package.windows.appxmanifest')) ?
+ path.join(project_dir, 'package.windows.appxmanifest') :
path.join(project_dir, 'package.appxmanifest');
var manifest = xml_helpers.parseElementtreeSync(manifestPath);
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/985b3bb8/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index 45cde7d..8a580cc 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -201,7 +201,7 @@ function remove_plugin_changes(plugin_name, plugin_id, is_top_level) {
if (self.platform == 'windows' && file == 'package.appxmanifest' &&
!fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) {
// New windows template separate manifest files for Windows8, Windows8.1 and WP8.1
- var substs = ['package.phone.appxmanifest', 'package.store.appxmanifest', 'package.store80.appxmanifest'];
+ var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows80.appxmanifest'];
for (var subst in substs) {
events.emit('verbose', 'Applying munge to ' + substs[subst]);
self.apply_file_munge(substs[subst], munge.files[file], true);
@@ -260,7 +260,7 @@ function add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increme
// CB-6976 Windows Universal Apps. Compatibility fix for existing plugins.
if (self.platform == 'windows' && file == 'package.appxmanifest' &&
!fs.existsSync(path.join(self.project_dir, 'package.appxmanifest'))) {
- var substs = ['package.phone.appxmanifest', 'package.store.appxmanifest', 'package.store80.appxmanifest'];
+ var substs = ['package.phone.appxmanifest', 'package.windows.appxmanifest', 'package.windows80.appxmanifest'];
for (var subst in substs) {
events.emit('verbose', 'Applying munge to ' + substs[subst]);
self.apply_file_munge(substs[subst], munge.files[file]);
[14/50] git commit: CB-7142 Add to for "plugin
restore" command
Posted by an...@apache.org.
CB-7142 Add <variable> to <feature> for "plugin restore" command
github: close #63
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/6050e93e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/6050e93e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/6050e93e
Branch: refs/heads/master
Commit: 6050e93ece9dc0521f1e70274f769fe7644f80c9
Parents: 3de053c
Author: motorro <mo...@gmail.com>
Authored: Wed Jul 16 05:43:36 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/ConfigParser.spec.js | 158 +++++++++++++++++++
cordova-lib/spec-cordova/test-config.xml | 24 ++-
cordova-lib/src/configparser/ConfigParser.js | 96 +++++++++++
.../src/configparser/ConfigParser.spec.js | 99 ------------
cordova-lib/src/cordova/platform.js | 17 +-
cordova-lib/src/cordova/prepare.js | 2 +-
cordova-lib/src/cordova/restore.js | 60 +++----
7 files changed, 325 insertions(+), 131 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/spec-cordova/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/ConfigParser.spec.js b/cordova-lib/spec-cordova/ConfigParser.spec.js
new file mode 100644
index 0000000..9c8c8e6
--- /dev/null
+++ b/cordova-lib/spec-cordova/ConfigParser.spec.js
@@ -0,0 +1,158 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+var path = require('path'),
+ fs = require('fs'),
+ ConfigParser = require('../src/configparser/ConfigParser'),
+ xml = path.join(__dirname, 'test-config.xml'),
+ xml_contents = fs.readFileSync(xml, 'utf-8');
+
+describe('config.xml parser', function () {
+ var readFile;
+ beforeEach(function() {
+ readFile = spyOn(fs, 'readFileSync').andReturn(xml_contents);
+ });
+
+ it('should create an instance based on an xml file', function() {
+ var cfg;
+ expect(function () {
+ cfg = new ConfigParser(xml);
+ }).not.toThrow();
+ expect(cfg).toBeDefined();
+ expect(cfg.doc).toBeDefined();
+ });
+
+ describe('methods', function() {
+ var cfg;
+ beforeEach(function() {
+ cfg = new ConfigParser(xml);
+ });
+
+ describe('package name / id', function() {
+ it('should get the (default) packagename', function() {
+ expect(cfg.packageName()).toEqual('io.cordova.hellocordova');
+ });
+ it('should allow setting the packagename', function() {
+ cfg.setPackageName('this.is.bat.country');
+ expect(cfg.packageName()).toEqual('this.is.bat.country');
+ });
+ });
+
+ describe('version', function() {
+ it('should get the version', function() {
+ expect(cfg.version()).toEqual('0.0.1');
+ });
+ it('should allow setting the version', function() {
+ cfg.setVersion('2.0.1');
+ expect(cfg.version()).toEqual('2.0.1');
+ });
+ });
+
+ describe('app name', function() {
+ it('should get the (default) app name', function() {
+ expect(cfg.name()).toEqual('Hello Cordova');
+ });
+ it('should allow setting the app name', function() {
+ cfg.setName('this.is.bat.country');
+ expect(cfg.name()).toEqual('this.is.bat.country');
+ });
+ });
+ describe('preference', function() {
+ it('should get value of existing preference', function() {
+ expect(cfg.getPreference('fullscreen')).toEqual('true');
+ });
+ it('should get undefined as non existing preference', function() {
+ expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
+ });
+ });
+ describe('feature',function(){
+ it('should read feature id list', function() {
+ var expectedList = [
+ "org.apache.cordova.featurewithvars",
+ "org.apache.cordova.featurewithurl",
+ "org.apache.cordova.featurewithversion",
+ "org.apache.cordova.featurewithurlandversion",
+ "org.apache.cordova.justafeature"
+ ];
+ var list = cfg.getFeatureIdList();
+ expect(list.length).toEqual(expectedList.length);
+ expectedList.forEach(function(feature){
+ expect(list).toContain(feature);
+ });
+ });
+ it('should read feature given id', function(){
+ var feature = cfg.getFeature("org.apache.cordova.justafeature");
+ expect(feature).toBeDefined();
+ expect(feature.name).toEqual("A simple feature");
+ expect(feature.id).toEqual("org.apache.cordova.justafeature");
+ expect(feature.params).toBeDefined();
+ expect(feature.params.id).toBeDefined();
+ expect(feature.params.id).toEqual("org.apache.cordova.justafeature");
+ });
+ it('should not read feature given undefined id', function(){
+ var feature = cfg.getFeature("org.apache.cordova.undefinedfeature");
+ expect(feature).not.toBeDefined();
+ });
+ it('should read feature with url and set \'url\' param', function(){
+ var feature = cfg.getFeature("org.apache.cordova.featurewithurl");
+ expect(feature.url).toEqual("http://cordova.apache.org/featurewithurl");
+ expect(feature.params).toBeDefined();
+ expect(feature.params.url).toBeDefined();
+ expect(feature.params.url).toEqual("http://cordova.apache.org/featurewithurl");
+ });
+ it('should read feature with version and set \'version\' param', function(){
+ var feature = cfg.getFeature("org.apache.cordova.featurewithversion");
+ expect(feature.version).toEqual("1.1.1");
+ expect(feature.params).toBeDefined();
+ expect(feature.params.version).toBeDefined();
+ expect(feature.params.version).toEqual("1.1.1");
+ });
+ it('should read feature variables', function () {
+ var feature = cfg.getFeature("org.apache.cordova.featurewithvars");
+ expect(feature.variables).toBeDefined();
+ expect(feature.variables.var).toBeDefined();
+ expect(feature.variables.var).toEqual("varvalue");
+ });
+ it('should allow adding a new feature', function(){
+ cfg.addFeature('myfeature');
+ var features = cfg.doc.findall('feature');
+ var featureNames = features.map(function(feature){
+ return feature.attrib.name;
+ });
+ expect(featureNames).toContain('myfeature');
+ });
+ it('should allow adding features with params', function(){
+ cfg.addFeature('afeature', JSON.parse('[{"name":"paraname", "value":"paravalue"}]'));
+ var features = cfg.doc.findall('feature');
+ var feature = (function(){
+ var i = features.length;
+ var f;
+ while (--i >= 0) {
+ f = features[i];
+ if ('afeature' === f.attrib.name) return f;
+ }
+ return undefined;
+ })();
+ expect(feature).toBeDefined();
+ var params = feature.findall('param');
+ expect(params[0].attrib.name).toEqual('paraname');
+ expect(params[0].attrib.value).toEqual('paravalue');
+ });
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/spec-cordova/test-config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/test-config.xml b/cordova-lib/spec-cordova/test-config.xml
index 5e01e48..3308ae0 100644
--- a/cordova-lib/spec-cordova/test-config.xml
+++ b/cordova-lib/spec-cordova/test-config.xml
@@ -22,5 +22,27 @@
<icon id="logo" src="logo.png" width="255" height="255" />
<platform name="android">
<icon src="logo-android.png" width="255" height="255" density="mdpi" />
- </platform>
+ </platform>
+
+ <!-- Features -->
+ <feature name="A feature with preference">
+ <param name="id" value="org.apache.cordova.featurewithvars"/>
+ <variable name="var" value="varvalue"/>
+ </feature>
+ <feature name="A feature with url">
+ <param name="id" value="org.apache.cordova.featurewithurl" />
+ <param name="url" value="http://cordova.apache.org/featurewithurl" />
+ </feature>
+ <feature name="A feature with version">
+ <param name="id" value="org.apache.cordova.featurewithversion" />
+ <param name="version" value="1.1.1" />
+ </feature>
+ <feature name="A feature with url and version">
+ <param name="id" value="org.apache.cordova.featurewithurlandversion" />
+ <param name="version" value="1.1.1" />
+ <param name="url" value="http://cordova.apache.org/featurewithurlandversion" />
+ </feature>
+ <feature name="A simple feature">
+ <param name="id" value="org.apache.cordova.justafeature" />
+ </feature>
</widget>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/src/configparser/ConfigParser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.js b/cordova-lib/src/configparser/ConfigParser.js
index 84de2a6..75f798b 100644
--- a/cordova-lib/src/configparser/ConfigParser.js
+++ b/cordova-lib/src/configparser/ConfigParser.js
@@ -27,6 +27,15 @@ var et = require('elementtree'),
CordovaError = require('../CordovaError'),
fs = require('fs');
+/**
+ * Array of 'feature' params that are set as properties
+ * @type {string[]}
+ */
+var FEATURE_SPECIAL_PARAMS = [
+ 'id',
+ 'url',
+ 'version'
+];
/** Wraps a config.xml file */
function ConfigParser(path) {
@@ -217,6 +226,93 @@ ConfigParser.prototype = {
},
/**
+ * Returns a list of features (IDs)
+ * @return {string[]} Array of feature IDs
+ */
+ getFeatureIdList: function () {
+ var features = this.doc.findall('feature'),
+ feature, idTag, id,
+ result = [];
+
+ // Check for valid features that have IDs set
+ for (var i = 0, l = features.length; i < l; ++i) {
+ feature = features[i];
+ idTag = feature.find('./param[@name="id"]');
+ if (null === idTag) {
+ // Invalid feature
+ continue;
+ }
+ id = idTag.attrib.value;
+ if (!!id) {
+ // Has id and id is non-empty
+ result.push(id);
+ }
+ }
+
+ return result;
+ },
+
+ /**
+ * Gets feature info
+ * @param {string} id Feature id
+ * @returns {Feature} Feature object
+ */
+ getFeature: function(id) {
+ if (!id) {
+ return undefined;
+ }
+ var feature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..');
+ if (null === feature) {
+ return undefined;
+ }
+
+ var result = {};
+ result.id = id;
+ result.name = feature.attrib.name;
+
+ // Iterate params and fill-in 'params' structure
+ // For special cases like 'id', 'url, 'version' - copy to the main space
+ result.params = processChildren (
+ 'param',
+ function(name, value) {
+ if (FEATURE_SPECIAL_PARAMS.indexOf(name) >= 0) {
+ result[name] = value;
+ }
+ }
+ );
+
+ // Iterate preferences
+ result.variables = processChildren('variable');
+
+ return result;
+
+ /**
+ * Processes a set of children
+ * having a pair of 'name' and 'value' attributes
+ * filling in 'output' object
+ * @param {string} xPath Search expression
+ * @param {function} [specialProcessing] Performs some additional actions on each valid element
+ * @return {object} A transformed object
+ */
+ function processChildren (xPath, specialProcessing) {
+ var result = {};
+ var needsProcessing = 'function' === typeof specialProcessing;
+ var nodes = feature.findall(xPath);
+ nodes.forEach(function(param){
+ var name = param.attrib.name;
+ var value = param.attrib.value;
+ if (name) {
+ result[name] = value;
+ if (needsProcessing) {
+ specialProcessing(name, value);
+ }
+ }
+ });
+ return result;
+ }
+ },
+
+ /**
*This does not check for duplicate feature entries
*/
addFeature: function (name, params){
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/src/configparser/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.spec.js b/cordova-lib/src/configparser/ConfigParser.spec.js
deleted file mode 100644
index a1ba102..0000000
--- a/cordova-lib/src/configparser/ConfigParser.spec.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-var path = require('path'),
- fs = require('fs'),
- ConfigParser = require('../src/cordova/ConfigParser'),
- xml = path.join(__dirname, 'test-config.xml'),
- xml_contents = fs.readFileSync(xml, 'utf-8');
-
-describe('config.xml parser', function () {
- var readFile;
- beforeEach(function() {
- readFile = spyOn(fs, 'readFileSync').andReturn(xml_contents);
- });
-
- it('should create an instance based on an xml file', function() {
- var cfg;
- expect(function () {
- cfg = new ConfigParser(xml);
- }).not.toThrow();
- expect(cfg).toBeDefined();
- expect(cfg.doc).toBeDefined();
- });
-
- describe('methods', function() {
- var cfg;
- beforeEach(function() {
- cfg = new ConfigParser(xml);
- });
-
- describe('package name / id', function() {
- it('should get the (default) packagename', function() {
- expect(cfg.packageName()).toEqual('io.cordova.hellocordova');
- });
- it('should allow setting the packagename', function() {
- cfg.setPackageName('this.is.bat.country');
- expect(cfg.packageName()).toEqual('this.is.bat.country');
- });
- });
-
- describe('version', function() {
- it('should get the version', function() {
- expect(cfg.version()).toEqual('0.0.1');
- });
- it('should allow setting the version', function() {
- cfg.setVersion('2.0.1');
- expect(cfg.version()).toEqual('2.0.1');
- });
- });
-
- describe('app name', function() {
- it('should get the (default) app name', function() {
- expect(cfg.name()).toEqual('Hello Cordova');
- });
- it('should allow setting the app name', function() {
- cfg.setName('this.is.bat.country');
- expect(cfg.name()).toEqual('this.is.bat.country');
- });
- });
- describe('preference', function() {
- it('should get value of existing preference', function() {
- expect(cfg.getPreference('fullscreen')).toEqual('true');
- });
- it('should get undefined as non existing preference', function() {
- expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
- });
- });
- describe('feature',function(){
- it('should allow adding a new feature', function(){
- cfg.addFeature('myfeature');
- var features = cfg.doc.findall('feature');
- expect(features[0].attrib.name).toEqual('myfeature');
- });
- it('should allow adding features with params', function(){
- cfg.addFeature('afeature', JSON.parse('[{"name":"paraname", "value":"paravalue"}]'));
- var features = cfg.doc.findall('feature');
- expect(features[0].attrib.name).toEqual('afeature');
- var params = features[0].findall('param');
- expect(params[0].attrib.name).toEqual('paraname');
- expect(params[0].attrib.value).toEqual('paravalue');
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index 2cb8c2e..7a01783 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -454,7 +454,22 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir, opts)
return plugins.reduce(function(soFar, plugin) {
return soFar.then(function() {
events.emit('verbose', 'Installing plugin "' + plugin + '" following successful platform add of ' + target);
- return plugman.raw.install(target, output, path.basename(plugin), plugins_dir);
+ plugin = path.basename(plugin);
+ var options = (function(){
+ // Get plugin preferences from config features if have any
+ // Pass them as cli_variables to plugman
+ var feature = cfg.getFeature(plugin);
+ var variables = feature && feature.variables;
+ if (!!variables) {
+ events.emit('verbose', 'Found variables for "' + plugin + '". Processing as cli_variables.');
+ return {
+ cli_variables: variables
+ };
+ }
+ return null;
+ })();
+
+ return plugman.raw.install(target, output, plugin, plugins_dir, options);
});
}, Q());
});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/src/cordova/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/prepare.js b/cordova-lib/src/cordova/prepare.js
index c69a4d7..09be122 100644
--- a/cordova-lib/src/cordova/prepare.js
+++ b/cordova-lib/src/cordova/prepare.js
@@ -126,7 +126,7 @@ function prepare(options) {
});
}
-var BLACKLIST = ['platform'];
+var BLACKLIST = ['platform', 'feature'];
var SINGLETONS = ['content', 'author'];
function mergeXml(src, dest, platform, clobber) {
// Do nothing for blacklisted tags.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6050e93e/cordova-lib/src/cordova/restore.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/restore.js b/cordova-lib/src/cordova/restore.js
index ffd1edc..6e4d262 100644
--- a/cordova-lib/src/cordova/restore.js
+++ b/cordova-lib/src/cordova/restore.js
@@ -60,39 +60,41 @@ function installPlatformsFromConfigXML(cfg){
//returns a Promise
function installPluginsFromConfigXML(cfg) {
//Install plugins that are listed on config.xml
- var pluginsFromConfig = [];
var projectRoot = cordova_util.cdProjectRoot();
var plugins_dir = path.join(projectRoot, 'plugins');
- var features = cfg.doc.findall('feature');
- features.forEach(function(feature){
- var params = feature.findall('param');
- var pluginId = '';
- var pluginVersion = '';
- for (var i = 0; i < params.length; i++) {
- if (params[i].attrib.name === 'id') {
- pluginId = params[i].attrib.value;
- }
- if (params[i].attrib.name === 'version') {
- pluginVersion = params[i].attrib.value;
- }
+ // Get all configured plugins
+ var features = cfg.getFeatureIdList();
+ if (0 === features.length) {
+ return Q.all('No config.xml plugins to install');
+ }
+
+ return features.reduce(function(soFar, featureId) {
+
+ var pluginPath = path.join(plugins_dir, featureId);
+ if (fs.existsSync(pluginPath)) {
+ // Plugin already exists
+ return soFar;
}
- var pluginPath = path.join(plugins_dir,pluginId);
- // contents of the plugins folder takes precedence hence
- // we ignore if the correct version is installed or not.
- if (pluginId !== '' && !fs.existsSync(pluginPath)) {
- if ( pluginVersion !== '') {
- pluginId = pluginId + '@' + pluginVersion;
+
+ return soFar.then(function() {
+ events.emit('log', 'Discovered ' + featureId + ' in config.xml. Installing to the project');
+
+ var feature = cfg.getFeature(featureId);
+
+ // Install from given URL if defined or using a plugin id
+ var installFrom = feature.url;
+ if (!installFrom) {
+ installFrom = feature.id;
+ if (!!feature.version) {
+ installFrom += ('@' + feature.version);
+ }
}
- events.emit('log', 'Discovered ' + pluginId + ' in config.xml. Installing to the project');
- pluginsFromConfig.push(pluginId);
- }
- });
- //Use cli instead of plugman directly ensuring all the hooks
- // to get fired.
- if (pluginsFromConfig.length >0) {
- return plugin('add', pluginsFromConfig);
- }
- return Q.all('No config.xml plugins to install');
+ // Add feature preferences as CLI variables if have any
+ var options = 'undefined' !== typeof feature.variables ? {cli_variables: feature.variables} : null;
+
+ return plugin('add', installFrom, options);
+ });
+ }, Q());
}
[45/50] git commit: updated platforms.js to use 3.6.0
Posted by an...@apache.org.
updated platforms.js to use 3.6.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b7fa7b98
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b7fa7b98
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b7fa7b98
Branch: refs/heads/master
Commit: b7fa7b9878b3286de8a7c34abcae003252f6d4ae
Parents: c709cb5
Author: Steven Gill <st...@gmail.com>
Authored: Fri Aug 29 17:14:07 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/platforms.js | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b7fa7b98/cordova-lib/src/cordova/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platforms.js b/cordova-lib/src/cordova/platforms.js
index cde3809..55411a8 100644
--- a/cordova-lib/src/cordova/platforms.js
+++ b/cordova-lib/src/cordova/platforms.js
@@ -26,60 +26,60 @@ module.exports = {
hostos : ['darwin'],
parser : './metadata/ios_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git',
- version: '3.5.0'
+ version: '3.6.0'
},
'android' : {
parser : './metadata/android_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git',
- version: '3.5.1'
+ version: '3.6.0'
},
'ubuntu' : {
hostos : ['linux'],
parser : './metadata/ubuntu_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ubuntu.git',
- version: '3.5.0'
+ version: '3.6.0'
},
'amazon-fireos' : {
parser : './metadata/amazon_fireos_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-amazon-fireos.git',
- version: '3.5.0'
+ version: '3.6.0'
},
'wp8' : {
hostos : ['win32'],
parser : './metadata/wp8_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.5.0',
+ version: '3.6.0',
altplatform: 'wp',
subdirectory: 'wp8'
},
'blackberry10' : {
parser : './metadata/blackberry10_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
- version: '3.5.0'
+ version: '3.6.0'
},
'www':{
hostos : [],
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
source : 'git',
- version: '3.5.0'
+ version: '3.6.0'
},
'firefoxos':{
parser: './metadata/firefoxos_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-firefoxos.git',
- version: '3.5.0'
+ version: '3.6.0'
},
'windows8':{
hostos : ['win32'],
parser: './metadata/windows_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git',
- version: 'master',
+ version: '3.6.0',
subdirectory: 'windows'
},
'windows':{
hostos : ['win32'],
parser: './metadata/windows_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git',
- version: 'master',
+ version: '3.6.0',
subdirectory: 'windows'
},
'browser':{
[36/50] git commit: ubuntu: support incremental builds
Posted by an...@apache.org.
ubuntu: support incremental builds
github: close #73
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/2207e479
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/2207e479
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/2207e479
Branch: refs/heads/master
Commit: 2207e47985a475cd73046f0d8caf38c44c4eed0e
Parents: e7b09b5
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Tue Aug 19 15:13:06 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/ubuntu.js | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/2207e479/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
index 4fd01f2..bf2665b 100644
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -53,10 +53,16 @@ module.exports = {
install:function(source_el, plugin_dir, project_dir, plugin_id) {
var dest = path.join('build', 'src', 'plugins', plugin_id, path.basename(source_el.attrib.src));
common.copyFile(plugin_dir, source_el.attrib.src, project_dir, dest);
+
+ var cmake = path.join(project_dir, 'build', 'CMakeLists.txt');
+ shell.exec('touch ' + cmake);
},
uninstall:function(source_el, project_dir, plugin_id) {
var dest = path.join(project_dir, 'build', 'src', 'plugins', plugin_id);
shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
+
+ var cmake = path.join(project_dir, 'build', 'CMakeLists.txt');
+ shell.exec('touch ' + cmake);
}
},
'header-file':{
[43/50] git commit: [Windows8] Fix failing test to match updated
functionality
Posted by an...@apache.org.
[Windows8] Fix failing test to match updated functionality
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/11e1c890
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/11e1c890
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/11e1c890
Branch: refs/heads/master
Commit: 11e1c890b09cd5d48f7241891af4786189bcc3a0
Parents: 35fe7cb
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Sep 3 01:49:07 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-plugman/platforms/windows8.spec.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/11e1c890/cordova-lib/spec-plugman/platforms/windows8.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/platforms/windows8.spec.js b/cordova-lib/spec-plugman/platforms/windows8.spec.js
index ee68bd8..fd550e9 100644
--- a/cordova-lib/spec-plugman/platforms/windows8.spec.js
+++ b/cordova-lib/spec-plugman/platforms/windows8.spec.js
@@ -108,7 +108,7 @@ describe('windows8 project handler', function() {
var source = copyArray(valid_source);
var s = spyOn(common, 'copyFile');
windows8['source-file'].install(source[0], dummyplugin, temp, dummy_id, proj_files);
- expect(s).toHaveBeenCalledWith(dummyplugin, 'src/windows8/dummer.js', temp, path.join('www', 'plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
+ expect(s).toHaveBeenCalledWith(dummyplugin, 'src/windows8/dummer.js', temp, path.join('plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
});
it('should throw if source-file src cannot be found', function() {
var source = copyArray(invalid_source);
@@ -118,7 +118,7 @@ describe('windows8 project handler', function() {
});
it('should throw if source-file target already exists', function() {
var source = copyArray(valid_source);
- var target = path.join(temp, 'www', 'plugins', dummy_id, 'dummer.js');
+ var target = path.join(temp, 'plugins', dummy_id, 'dummer.js');
shell.mkdir('-p', path.dirname(target));
fs.writeFileSync(target, 'some bs', 'utf-8');
expect(function() {
@@ -144,7 +144,7 @@ describe('windows8 project handler', function() {
.then(function() {
var source = copyArray(valid_source);
windows8['source-file'].uninstall(source[0], temp, dummy_id, proj_files);
- expect(s).toHaveBeenCalledWith(temp, path.join('www', 'plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
+ expect(s).toHaveBeenCalledWith(temp, path.join('plugins', 'com.phonegap.plugins.dummyplugin', 'dummer.js'));
done();
});
});
[19/50] git commit: Add link to BuildBot at ci.cordova.io in README
Posted by an...@apache.org.
Add link to BuildBot at ci.cordova.io in README
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/06afe8c8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/06afe8c8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/06afe8c8
Branch: refs/heads/master
Commit: 06afe8c86ecb07662faf5c3ba611707b7407fdca
Parents: 62dd5f6
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Thu Aug 7 16:50:24 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/06afe8c8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ec4e3df..c28cae4 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,8 @@
[](https://ci.appveyor.com/project/Humbedooh/cordova-lib)
[](https://travis-ci.org/apache/cordova-lib)
-[](https://www.npmjs.org/package/cordova-lib)
+[](https://www.npmjs.org/package/cordova-lib)
+[BuildBot waterfall](http://ci.cordova.io/) with [cordova-mobile-spec](https://github.com/apache/cordova-mobile-spec) running on real Android and iOS devices.
# cordova-lib
Contains npm modules used primarily by [cordova](https://github.com/apache/cordova-cli/) and [plugman](https://github.com/apache/cordova-plugman/).
[23/50] git commit: Upleveled amazon-fireos changes.
Posted by an...@apache.org.
Upleveled amazon-fireos changes.
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/d3cffc85
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/d3cffc85
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/d3cffc85
Branch: refs/heads/master
Commit: d3cffc856dec609b6fe28b06968522604a17016c
Parents: 35202bc
Author: Archana Naik <na...@lab126.com>
Authored: Thu Aug 14 11:42:52 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
.../cordova/metadata/amazon_fireos_parser.js | 267 +++++++++++--------
1 file changed, 160 insertions(+), 107 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d3cffc85/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
index 3b39605..4878f4e 100644
--- a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
+++ b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
@@ -54,16 +54,158 @@ module.exports.prototype = {
},
findAndroidLaunchModePreference: function(config) {
- var ret = config.getPreference('AndroidLaunchMode');
- var valid = ['standard', 'singleTop', 'singleTask', 'singleInstance'].indexOf(ret) !== -1;
- if (ret && !valid) {
- events.emit('warn', 'Unknown value for launchMode preference: ' + ret);
- ret = null;
+ var launchMode = config.getPreference('AndroidLaunchMode');
+ if (!launchMode) {
+ // Return a default value
+ return 'singleTop';
}
-
- return ret;
+
+ var expectedValues = ['standard', 'singleTop', 'singleTask', 'singleInstance'];
+ var valid = expectedValues.indexOf(launchMode) !== -1;
+ if (!valid) {
+ events.emit('warn', 'Unrecognized value for AndroidLaunchMode preference: ' + launchMode);
+ events.emit('warn', ' Expected values are: ' + expectedValues.join(', '));
+ // Note: warn, but leave the launch mode as developer wanted, in case the list of options changes in the future
+ }
+
+ return launchMode;
},
-
+
+ // remove the default resource name from all drawable folders
+ // return the array of the densities in this project
+deleteDefaultResource:function(name) {
+ var densities = [];
+ var res = path.join(this.path, 'res');
+ var dirs = fs.readdirSync(res);
+
+ for (var i=0; i<dirs.length; i++) {
+ var filename = dirs[i];
+ if (filename.indexOf('drawable-') === 0) {
+ var density = filename.substr(9);
+ densities.push(density);
+ var template = path.join(res, filename, name);
+ try {
+ fs.unlinkSync(template);
+ events.emit('verbose', 'deleted: ' + template);
+ } catch(e) {
+ // ignored. template screen does probably not exist
+ }
+ }
+ }
+ return densities;
+},
+
+handleSplashes:function(config) {
+ var resources = config.getSplashScreens('android');
+ var destfilepath;
+ // if there are "splash" elements in config.xml
+ if (resources.length > 0) {
+ var densities = this.deleteDefaultResource('screen.png');
+ events.emit('verbose', 'splash screens: ' + JSON.stringify(resources));
+ var res = path.join(this.path, 'res');
+
+ if (resources.defaultResource) {
+ destfilepath = path.join(res, 'drawable', 'screen.png');
+ events.emit('verbose', 'copying splash icon from ' + resources.defaultResource.src + ' to ' + destfilepath);
+ shell.cp('-f', resources.defaultResource.src, destfilepath);
+ }
+ for (var i=0; i<densities.length; i++) {
+ var density = densities[i];
+ var resource = resources.getByDensity(density);
+ if (resource) {
+ // copy splash screens.
+ destfilepath = path.join(res, 'drawable-' + density, 'screen.png');
+ events.emit('verbose', 'copying splash icon from ' + resource.src + ' to ' + destfilepath);
+ shell.cp('-f', resource.src, destfilepath);
+ }
+ }
+ }
+},
+
+handleIcons: function(config) {
+ var icons = config.getIcons('android');
+ // if there are icon elements in config.xml
+ if (icons.length === 0) {
+ events.emit('verbose', 'This app does not have launcher icons defined');
+ return;
+ }
+
+ var densities = this.deleteDefaultResource('icon.png');
+
+ var android_icons = {};
+ var default_icon;
+ // http://developer.android.com/design/style/iconography.html
+ var densityToSizeMap = {
+ 'ldpi' : 36,
+ 'mdpi' : 48,
+ 'hdpi' : 72,
+ 'xhdpi' : 96
+ };
+ // find the best matching icon for a given density or size
+ // @output android_icons
+ var parseIcon = function(icon, icon_size, size, density) {
+ // do I have a platform icon for that density already
+ var previous = android_icons[density];
+ if (previous && previous.platform) {
+ return;
+ }
+ // already have one but this one is a platform icon
+ if (previous && icon.platform && icon.density == density) {
+ android_icons[density] = icon;
+ return;
+ }
+ // if density is explicitly defined take this one
+ if (density === icon.density) {
+ android_icons[density] = icon;
+ return;
+ }
+ if (size === parseInt(icon_size)) {
+ android_icons[density] = icon;
+ }
+ };
+ // iterate over all icon elements to find the default icon and call parseIcon
+ for (var i=0; i<icons.length; i++) {
+ var icon = icons[i];
+ var size = icon.width;
+ if (!size) {
+ size = icon.height;
+ }
+ if (!size && !icon.density) {
+ if (default_icon) {
+ events.emit('verbose', 'more than one default icon: ' + JSON.stringify(icon));
+ } else {
+ default_icon = icon;
+ }
+ } else {
+ for (var k=0; k<densities.length; k++) {
+ parseIcon(icon, size, densityToSizeMap[densities[k]], densities[k]);
+ }
+ }
+ }
+ var projectRoot = util.isCordova(this.path);
+ var srcfilepath;
+ var destfilepath;
+ // copy the default icon to the drawable folder
+ if (default_icon) {
+ srcfilepath = path.join(projectRoot, default_icon.src);
+ destfilepath = path.join(this.path, 'res', 'drawable', 'icon.png');
+ events.emit('verbose', 'Copying default icon from ' + srcfilepath + ' to ' + destfilepath);
+ shell.cp('-f', srcfilepath, destfilepath);
+ }
+ // copyIcon does the actual copying into the drawable folders
+ var copyIcon = function(density) {
+ if (android_icons[density]) {
+ srcfilepath = path.join(projectRoot, android_icons[density].src);
+ destfilepath = path.join(this.path, 'res', 'drawable-'+density, 'icon.png');
+ events.emit('verbose', 'Copying icon from ' + srcfilepath + ' to ' + destfilepath);
+ shell.cp('-f', srcfilepath, destfilepath);
+ }
+ }.bind(this);
+ for (var j=0; j<densities.length; j++) {
+ copyIcon(densities[j]);
+ }
+ },
+
update_from_config:function(config) {
// TODO: share code for this func with Android. Or fix it and remove
// the below JSHint hacks line.
@@ -78,104 +220,15 @@ module.exports.prototype = {
fs.writeFileSync(this.strings, strings.write({indent: 4}), 'utf-8');
events.emit('verbose', 'Wrote out Android application name to "' + name + '"');
- var icons = config.getIcons('amazon-fireos');
- // if there are icon elements in config.xml
- if (icons) {
- var android_icons = {};
- var projectRoot = util.isCordova(this.path);
- var default_icon;
- var max_size;
- var max_density;
- // http://developer.android.com/design/style/iconography.html
- var densities = {
- 'ldpi' : 36,
- 'mdpi' : 48,
- 'hdpi' : 72,
- 'xhdpi' : 96
- };
- for (var i=0; i<icons.length; i++) {
- var icon = icons[i];
- var destfilepath;
- var size = icon.width;
- if (!size) {
- size = icon.height;
- }
- if (!size && !icon.density) {
- if (default_icon) {
- events.emit('verbose', 'more than one default icon: ' + JSON.stringify(icon));
- } else {
- default_icon = icon;
- }
- } else {
- var parseIcon = function(icon, icon_size, size, density) {
- // if density is explicitly defined, no need to calculate it from width/height
- if (icon.density) {
- android_icons[icon.density] = icon;
- return;
- }
-
- var i = parseInt(icon_size);
- if (size == parseInt(icon_size)) {
- var previous = android_icons[density];
- if (previous) {
- // already have that density. platform rules
- if (!previous.platform) {
- android_icons[density] = icon;
- } // else already have a platform icon of that density
- } else {
- android_icons[density] = icon;
- }
- android_icons[density] = icon;
- if (!max_size) {
- max_size = size;
- max_density = density;
- } else {
- if (max_size < size) {
- max_size = size;
- max_density = density;
- }
- }
- }
- };
- for (var density in densities) {
- parseIcon(icon, size, densities[density], density);
- }
- }
- }
-
- var copyIcon = function(density) {
- var srcfilepath;
- var destfilepath = path.join(this.path, 'res', 'drawable-'+density, 'icon.png');
- if (android_icons[density]) {
- srcfilepath = path.join(projectRoot, android_icons[density].src);
- } else {
- if (default_icon) {
- srcfilepath = path.join(projectRoot, default_icon.src);
- } else {
- if (max_density) {
- srcfilepath = path.join(projectRoot, android_icons[max_density].src);
- } else {
- events.emit('verbose', 'no icon found matching Android typical densities');
- }
- }
- }
- if (srcfilepath) {
- events.emit('verbose', 'Copying icon from ' + srcfilepath + ' to ' + destfilepath);
- shell.cp('-f', srcfilepath, destfilepath);
- }
- }.bind(this);
- for (var density in densities) {
- copyIcon(density);
- }
-
- }
-
+ this.handleSplashes(config);
+ this.handleIcons(config);
+
var manifest = xml.parseElementtreeSync(this.manifest);
// Update the version by changing the AndroidManifest android:versionName
var version = config.version();
var versionCode = config.android_versionCode() || default_versionCode(version);
- manifest.getroot().attrib['android:versionName'] = version;
- manifest.getroot().attrib['android:versionCode'] = versionCode;
+ manifest.getroot().attrib["android:versionName"] = version;
+ manifest.getroot().attrib["android:versionCode"] = versionCode;
// Update package name by changing the AndroidManifest id and moving the entry class around to the proper package directory
var pkg = config.packageName();
@@ -190,22 +243,22 @@ module.exports.prototype = {
if (orientationPref) {
switch (orientationPref) {
case 'default':
- delete act.attrib['android:screenOrientation'];
+ delete act.attrib["android:screenOrientation"];
break;
case 'portrait':
- act.attrib['android:screenOrientation'] = 'portrait';
+ act.attrib["android:screenOrientation"] = 'portrait';
break;
case 'landscape':
- act.attrib['android:screenOrientation'] = 'landscape';
+ act.attrib["android:screenOrientation"] = 'landscape';
}
}
// Set android:launchMode in AndroidManifest
var androidLaunchModePref = this.findAndroidLaunchModePreference(config);
if (androidLaunchModePref) {
- act.attrib['android:launchMode'] = androidLaunchModePref;
+ act.attrib["android:launchMode"] = androidLaunchModePref;
} else { // User has (explicitly) set an invalid value for AndroidLaunchMode preference
- delete act.attrib['android:launchMode']; // use Android default value (standard)
+ delete act.attrib["android:launchMode"]; // use Android default value (standard)
}
// Write out AndroidManifest.xml
[42/50] git commit: updated version to 0.21.10-dev
Posted by an...@apache.org.
updated version to 0.21.10-dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b88a2f64
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b88a2f64
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b88a2f64
Branch: refs/heads/master
Commit: b88a2f641aba8827347a0882a747e7b8488fa295
Parents: 0d1074c
Author: Steven Gill <st...@gmail.com>
Authored: Tue Sep 2 14:07:50 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b88a2f64/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 98f9bad..551cf6e 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
"author": "Apache Software Foundation",
"name": "cordova-lib",
"description": "Apache Cordova tools core lib and API",
- "version": "0.21.9",
+ "version": "0.21.10-dev",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
[11/50] git commit: Don't spy and expect it to call the other spy ...
Posted by an...@apache.org.
Don't spy and expect it to call the other spy ...
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/7b104f98
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/7b104f98
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/7b104f98
Branch: refs/heads/master
Commit: 7b104f98019044c5d1989abfd06334207a53da73
Parents: 629ce77
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Aug 15 15:02:12 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/metadata/wp8_parser.spec.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/7b104f98/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
index 2c5451c..dd85d26 100644
--- a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
@@ -158,12 +158,11 @@ describe('wp8 project parser', function() {
});
});
describe('update_project method', function() {
- var config, www, overrides, svn, proj;
+ var config, www, overrides, svn;
beforeEach(function() {
config = spyOn(p, 'update_from_config');
www = spyOn(p, 'update_www');
svn = spyOn(util, 'deleteSvnFolders');
- proj = spyOn(p, 'update_project');
exists.andReturn(false);
});
it('should call update_from_config', function(done) {
[09/50] git commit: CB-7228: Fixed issue with "cordova prepare
--browserify"
Posted by an...@apache.org.
CB-7228: Fixed issue with "cordova prepare --browserify"
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/5431468e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/5431468e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/5431468e
Branch: refs/heads/master
Commit: 5431468e53dd0984387d3978653a2d4eb72e07df
Parents: 429292f
Author: Suraj Pindoria <su...@yahoo.com>
Authored: Mon Aug 4 16:36:27 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/prepare.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/5431468e/cordova-lib/src/cordova/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/prepare.js b/cordova-lib/src/cordova/prepare.js
index 529cbf0..c69a4d7 100644
--- a/cordova-lib/src/cordova/prepare.js
+++ b/cordova-lib/src/cordova/prepare.js
@@ -97,8 +97,10 @@ function prepare(options) {
if (options.browserify) {
plugman.prepare = require('../plugman/prepare-browserify');
+ plugman.prepare(platformPath, platform, plugins_dir, false, true);
+ } else {
+ plugman.prepare(platformPath, platform, plugins_dir);
}
- plugman.prepare(platformPath, platform, plugins_dir);
// Make sure that config changes for each existing plugin is in place
var munger = new plugman.config_changes.PlatformMunger(platform, platformPath, plugins_dir);
[25/50] git commit: CB-6699 Include files from www folder via single
element (use ** glob pattern)
Posted by an...@apache.org.
CB-6699 Include files from www folder via single element (use ** glob pattern)
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/17da68bc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/17da68bc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/17da68bc
Branch: refs/heads/master
Commit: 17da68bc5596801c6a8c3d9534dc431b47d18d1e
Parents: 6491f0c
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Fri Aug 15 14:56:13 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
.../src/cordova/metadata/windows_parser.js | 40 +------------------
cordova-lib/src/cordova/metadata/wp8_parser.js | 41 +-------------------
cordova-lib/src/plugman/prepare.js | 20 ----------
3 files changed, 2 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17da68bc/cordova-lib/src/cordova/metadata/windows_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/windows_parser.js b/cordova-lib/src/cordova/metadata/windows_parser.js
index eaeacbb..aefb94e 100644
--- a/cordova-lib/src/cordova/metadata/windows_parser.js
+++ b/cordova-lib/src/cordova/metadata/windows_parser.js
@@ -30,8 +30,7 @@ var fs = require('fs'),
ConfigParser = require('../../configparser/ConfigParser'),
CordovaError = require('../../CordovaError'),
xml = require('../../util/xml-helpers'),
- hooker = require('../hooker'),
- jsproj = require('../../util/windows/jsproj');
+ hooker = require('../hooker');
module.exports = function windows_parser(project) {
try {
@@ -229,42 +228,6 @@ module.exports.prototype = {
shell.cp('-rf', path.join(platform_www, '*'), this.www_dir());
},
- // Returns an array of all the files in the given directory with relative paths
- // - name : the name of the top level directory (i.e all files will start with this in their path)
- // - dir : the directory whos contents will be listed under 'name' directory
- folder_contents:function(name, dir) {
- var results = [];
- var folder_dir = fs.readdirSync(dir);
- for(var item in folder_dir) {
- var stat = fs.statSync(path.join(dir, folder_dir[item]));
- // Add all subfolder item paths if it's not a .svn dir.
- if( stat.isDirectory() && (folder_dir[item] !== '.svn') ) {
- var sub_dir = this.folder_contents(path.join(name, folder_dir[item]), path.join(dir, folder_dir[item]));
- for(var sub_item in sub_dir) {
- results.push(sub_dir[sub_item]);
- }
- } else if(stat.isFile()) {
- results.push(path.join(name, folder_dir[item]));
- }
- // else { it is a FIFO, or a Socket, Symbolic Link or something ... }
- }
- return results;
- },
-
- // updates the jsproj file to explicitly list all www content.
- update_jsproj:function() {
- var projFile = new jsproj(this.projFilePath);
- // remove any previous references to the www files
- projFile.removeSourceFile(/^(\$\(MSBuildThisFileDirectory\))?www\\/i);
-
- // now add all www references back in from the root www folder
- var www_files = this.folder_contents('www', this.www_dir());
- projFile.addSourceFile(www_files);
-
- // save file
- projFile.write();
- },
-
// calls the nessesary functions to update the windows8 project
update_project:function(cfg) {
// console.log("Updating windows8 project...");
@@ -282,7 +245,6 @@ module.exports.prototype = {
return hooks.fire('pre_package', { wwwPath:this.www_dir(), platforms: ['windows8'] })
.then(function() {
// overrides (merges) are handled in update_www()
- that.update_jsproj();
that.add_bom();
util.deleteSvnFolders(that.www_dir());
});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17da68bc/cordova-lib/src/cordova/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/wp8_parser.js b/cordova-lib/src/cordova/metadata/wp8_parser.js
index 0d458ee..4d5b332 100644
--- a/cordova-lib/src/cordova/metadata/wp8_parser.js
+++ b/cordova-lib/src/cordova/metadata/wp8_parser.js
@@ -30,8 +30,7 @@ var fs = require('fs'),
ConfigParser = require('../../configparser/ConfigParser'),
CordovaError = require('../../CordovaError'),
xml = require('../../util/xml-helpers'),
- hooker = require('../hooker'),
- csproj = require('../../util/windows/csproj');
+ hooker = require('../hooker');
module.exports = function wp8_parser(project) {
try {
@@ -197,43 +196,6 @@ module.exports.prototype = {
shell.cp('-rf', path.join(platform_www, '*'), this.www_dir());
},
- // updates the csproj file to explicitly list all www content.
- update_csproj:function() {
- var projFile = new csproj(this.csproj_path);
-
- // remove any previous references to the www files
- projFile.removeSourceFile(new RegExp('www\\\\*', 'i'));
-
- // now add all www references back in from the root www folder
- var www_files = this.folder_contents('www', this.www_dir());
- projFile.addSourceFile(www_files);
- // save file
- projFile.write();
- },
- // Returns an array of all the files in the given directory with relative paths
- // - name : the name of the top level directory (i.e all files will start with this in their path)
- // - dir : the directory whos contents will be listed under 'name' directory
- folder_contents:function(name, dir) {
- var results = [];
- var folder_dir = fs.readdirSync(dir);
- for(var item in folder_dir) {
- var stat = fs.statSync(path.join(dir, folder_dir[item]));
-
- if(stat.isDirectory()) {
- var sub_dir = this.folder_contents(path.join(name, folder_dir[item]), path.join(dir, folder_dir[item]));
- //Add all subfolder item paths
- for(var sub_item in sub_dir) {
- results.push(sub_dir[sub_item]);
- }
- }
- else if(stat.isFile()) {
- results.push(path.join(name, folder_dir[item]));
- }
- // else { it is a FIFO, or a Socket or something ... }
- }
- return results;
- },
-
// calls the nessesary functions to update the wp8 project
// Returns a promise.
update_project:function(cfg) {
@@ -250,7 +212,6 @@ module.exports.prototype = {
var hooks = new hooker(projectRoot);
return hooks.fire('pre_package', { wwwPath:this.www_dir(), platforms: ['wp8'] })
.then(function() {
- that.update_csproj();
util.deleteSvnFolders(that.www_dir());
});
}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/17da68bc/cordova-lib/src/plugman/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/prepare.js b/cordova-lib/src/plugman/prepare.js
index 6083cbf..284d164 100644
--- a/cordova-lib/src/plugman/prepare.js
+++ b/cordova-lib/src/plugman/prepare.js
@@ -26,8 +26,6 @@ var platform_modules = require('./platforms'),
path = require('path'),
config_changes = require('./util/config-changes'),
xml_helpers = require('../util/xml-helpers'),
- wp8 = require('./platforms/wp8'),
- windows = require('./platforms/windows'),
common = require('./platforms/common'),
fs = require('fs'),
shell = require('shelljs'),
@@ -73,16 +71,6 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
events.emit('verbose', 'Processing configuration changes for plugins.');
config_changes.process(plugins_dir, project_dir, platform);
- // for windows phone and windows8 platforms we need to add all www resources to the .csproj(.jsproj) file
- // first we need to remove them all to prevent duplicates
- var projFile;
- if (platform == 'wp8' || platform == 'windows8' || platform == 'windows') {
- projFile = (platform == 'wp8') ? wp8.parseProjectFile(project_dir) :
- windows.parseProjectFile(project_dir);
- // remove reference to cordova_plugins.js and all files inside plugins folder
- projFile.removeSourceFile(/^(\$\(MSBuildThisFileDirectory\))?www\\(cordova_plugins.js|plugins\\)/i);
- }
-
platform_json = config_changes.get_platform_json(plugins_dir, platform);
// This array holds all the metadata for each module and ends up in cordova_plugins.json
var plugins = Object.keys(platform_json.installed_plugins).concat(Object.keys(platform_json.dependent_plugins));
@@ -155,9 +143,6 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
}
scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
fs.writeFileSync(path.join(platformPluginsDir, plugin_id, fsPath), scriptContent, 'utf-8');
- if(platform == 'wp8' || platform == 'windows8') {
- projFile.addSourceFile(path.join('www', 'plugins', plugin_id, fsPath));
- }
// Prepare the object for cordova_plugins.json.
var obj = {
@@ -198,9 +183,4 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
events.emit('verbose', 'Writing out cordova_plugins.js...');
fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.js'), final_contents, 'utf-8');
-
- if(platform == 'wp8' || platform == 'windows8' || platform == 'windows') {
- projFile.addSourceFile(path.join('www', 'cordova_plugins.js'));
- projFile.write();
- }
};
[32/50] git commit: CB-7420 Windows. Plugin s are
removed from platform during prepare
Posted by an...@apache.org.
CB-7420 Windows. Plugin <resource-file>s are removed from platform during prepare
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/55d4a683
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/55d4a683
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/55d4a683
Branch: refs/heads/master
Commit: 55d4a683969047f37279393857dd4cfe6fd44ccf
Parents: 4b3b55d
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Aug 28 16:23:42 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/windows.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/55d4a683/cordova-lib/src/plugman/platforms/windows.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/windows.js b/cordova-lib/src/plugman/platforms/windows.js
index dc5089f..347e6a3 100644
--- a/cordova-lib/src/plugman/platforms/windows.js
+++ b/cordova-lib/src/plugman/platforms/windows.js
@@ -61,14 +61,14 @@ module.exports = {
'source-file': {
install:function(source_el, plugin_dir, project_dir, plugin_id, project_file) {
var targetDir = source_el.attrib['target-dir'] || '';
- var dest = path.join('www', 'plugins', plugin_id, targetDir, path.basename(source_el.attrib['src']));
+ var dest = path.join('plugins', plugin_id, targetDir, path.basename(source_el.attrib['src']));
common.copyNewFile(plugin_dir, source_el.attrib['src'], project_dir, dest);
// add reference to this file to jsproj.
project_file.addSourceFile(dest);
},
uninstall:function(source_el, project_dir, plugin_id, project_file) {
- var dest = path.join('www', 'plugins', plugin_id,
+ var dest = path.join('plugins', plugin_id,
source_el.attrib['target-dir'] || '',
path.basename(source_el.attrib['src']));
common.removeFile(project_dir, dest);
[38/50] git commit: CB-7118 Use updated version of node-xcode
Posted by an...@apache.org.
CB-7118 Use updated version of node-xcode
Conflicts:
cordova-lib/src/cordova/metadata/ios_parser.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/867a01ef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/867a01ef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/867a01ef
Branch: refs/heads/master
Commit: 867a01ef945d96bf8d86176162f9efa3caae51bb
Parents: db00cdc
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Aug 20 10:49:05 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
cordova-lib/src/cordova/metadata/ios_parser.js | 22 +++++----------------
2 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/867a01ef/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 6bffa4d..1d8ab81 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -34,7 +34,7 @@
"shelljs": "0.1.x",
"tar": "0.1.x",
"underscore": "1.4.4",
- "xcode": "0.6.6",
+ "xcode": "0.6.7",
"cordova-js": "3.x.x",
"unorm": ">=1.3"
},
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/867a01ef/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index f43f194..19b63e8 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -239,14 +239,13 @@ module.exports.prototype = {
d.reject(new Error('An error occured during parsing of project.pbxproj. Start weeping. Output: ' + err));
return;
}
- var buildConfiguration = proj.pbxXCBuildConfigurationSection();
if (targetDevice) {
- // TODO: replace propReplace with proj.updateBuildProperty after below is release
- // https://github.com/alunny/node-xcode/pull/33
- propReplace(buildConfiguration, 'TARGETED_DEVICE_FAMILY', targetDevice);
+ events.emit('verbose', 'Set TARGETED_DEVICE_FAMILY to ' + targetDevice + '.');
+ proj.updateBuildProperty('TARGETED_DEVICE_FAMILY', targetDevice);
}
if (deploymentTarget) {
- propReplace(buildConfiguration, 'IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
+ events.emit('verbose', 'Set IPHONEOS_DEPLOYMENT_TARGET to "' + deploymentTarget + '".');
+ proj.updateBuildProperty('IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
}
fs.writeFileSync(me.pbxproj, proj.writeSync(), 'utf-8');
d.resolve();
@@ -261,6 +260,7 @@ module.exports.prototype = {
function default_CFBundleVersion(version) {
return version.split('-')[0];
}
+
// Converts cordova specific representation of target device to XCode value
function parseTargetDevicePreference(value) {
if (!value) return null;
@@ -271,15 +271,3 @@ function parseTargetDevicePreference(value) {
events.emit('warn', 'Unknown target-device preference value: "' + value + '".');
return null;
}
-// helper recursive prop search+replace
-function propReplace(obj, prop, value) {
- for (var p in obj) {
- if (obj.hasOwnProperty(p)) {
- if (typeof obj[p] == 'object') {
- propReplace(obj[p], prop, value);
- } else if (p == prop) {
- obj[p] = value;
- }
- }
- }
-}
[07/50] git commit: Add JSCS config file
Posted by an...@apache.org.
Add JSCS config file
But not running it as part of `npm test` yet.
See discussion here:
http://markmail.org/thread/rzzvn2ax3tqzabfw
JSHint people want to focus on syntax linting and are dropping style oriented
options. They recommends using JSCS (in addition to JSHint) for style:
https://github.com/jshint/jshint/issues/1339
JSCS has recently added the options dropped from JSHint.
https://github.com/mdevils/node-jscs/issues/102
This commit contains a JSCS config file with some basic settings that generate
very few errors with the existing cordova-cli and lib code.
My goal is to eventually run JSCS together with JSHint as part of `npm test`.
The nice thing about JSCS is that style flame wars can be way more structured
with it as we can argue about very specific well named JSCS config options :)
I'm using it with SublimeLinter-jscs
https://sublime.wbond.net/packages/SublimeLinter-jscs
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b4a485ec
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b4a485ec
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b4a485ec
Branch: refs/heads/master
Commit: b4a485ec2437127f93f493335c8996cf905abecb
Parents: 628d810
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Thu Jul 31 13:42:47 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/.jscs.json | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b4a485ec/cordova-lib/.jscs.json
----------------------------------------------------------------------
diff --git a/cordova-lib/.jscs.json b/cordova-lib/.jscs.json
new file mode 100644
index 0000000..5cc7e26
--- /dev/null
+++ b/cordova-lib/.jscs.json
@@ -0,0 +1,24 @@
+{
+ "disallowMixedSpacesAndTabs": true,
+ "disallowTrailingWhitespace": true,
+ "validateLineBreaks": "LF",
+ "validateIndentation": 4,
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": true,
+ "disallowSpaceBeforePostfixUnaryOperators": true,
+ "requireSpaceAfterLineComment": true,
+ "requireCapitalizedConstructors": true,
+
+ "disallowSpacesInNamedFunctionExpression": {
+ "beforeOpeningRoundBrace": true
+ },
+
+ "requireSpaceAfterKeywords": [
+ "if",
+ "else",
+ "for",
+ "while",
+ "do"
+ ]
+}
[33/50] git commit: ubuntu: check icon existence
Posted by an...@apache.org.
ubuntu: check icon existence
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/d4ea7900
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/d4ea7900
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/d4ea7900
Branch: refs/heads/master
Commit: d4ea7900f28f50988c756331f6b75b62418c7c9b
Parents: 2b32d93
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Tue Aug 19 15:03:48 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
.../src/cordova/metadata/ubuntu_parser.js | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d4ea7900/cordova-lib/src/cordova/metadata/ubuntu_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ubuntu_parser.js b/cordova-lib/src/cordova/metadata/ubuntu_parser.js
index 634a575..a199662 100644
--- a/cordova-lib/src/cordova/metadata/ubuntu_parser.js
+++ b/cordova-lib/src/cordova/metadata/ubuntu_parser.js
@@ -87,14 +87,18 @@ module.exports.prototype = {
architecture: arch,
description: sanitize(this.config.description()) };
- var name = this.config.name().replace(/\n/g, ' '); //FIXME: escaping
- var content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nIcon=qmlscene\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
-
- name = sanitize(this.config.name()); //FIXME: escaping
- content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
-
- if (this.config.doc.find('icon') && this.config.doc.find('icon').attrib.src && fs.existsSync(path.join(this.path, 'www', this.config.doc.find('icon').attrib.src))) {
- content += '\nIcon=www/' + this.config.doc.find('icon').attrib.src;
+ var name = sanitize(this.config.name()); //FIXME: escaping
+ var content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
+
+ if (this.config.doc.find('icon') && this.config.doc.find('icon').attrib.src) {
+ var iconPath = path.join(this.path, 'www', this.config.doc.find('icon').attrib.src);
+ if (fs.existsSync(iconPath))
+ content += '\nIcon=www/' + this.config.doc.find('icon').attrib.src;
+ else
+ return Q.reject(new Error('icon does not exist: ' + iconPath));
+ } else {
+ content += '\nIcon=qmlscene';
+ console.warn('missing icon element in config.xml');
}
fs.writeFileSync(path.join(this.path, 'manifest.json'), JSON.stringify(manifest));
fs.writeFileSync(path.join(this.path, 'cordova.desktop'), content);
[44/50] git commit: CB-7383 Incremented package version to -dev
Posted by an...@apache.org.
CB-7383 Incremented package version to -dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/6ac4a419
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/6ac4a419
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/6ac4a419
Branch: refs/heads/master
Commit: 6ac4a419e07010fd91007ea125f68a153dfa6ab2
Parents: b7fa7b9
Author: Steven Gill <st...@gmail.com>
Authored: Fri Aug 29 17:15:45 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/6ac4a419/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index b49e64a..8148cc2 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
"author": "Apache Software Foundation",
"name": "cordova-lib",
"description": "Apache Cordova tools core lib and API",
- "version": "0.21.8",
+ "version": "0.21.9-dev",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
[29/50] git commit: ubuntu: use common.copyFile
Posted by an...@apache.org.
ubuntu: use common.copyFile
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/55c3d1ee
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/55c3d1ee
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/55c3d1ee
Branch: refs/heads/master
Commit: 55c3d1ee4f9641cf69a42c74c11f811eaefddf22
Parents: d4ea790
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Tue Aug 19 16:03:07 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/platforms/ubuntu.js | 29 ++++++++----------------
1 file changed, 9 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/55c3d1ee/cordova-lib/src/plugman/platforms/ubuntu.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platforms/ubuntu.js b/cordova-lib/src/plugman/platforms/ubuntu.js
index c422d7c..89e0ed8 100644
--- a/cordova-lib/src/plugman/platforms/ubuntu.js
+++ b/cordova-lib/src/plugman/platforms/ubuntu.js
@@ -32,8 +32,10 @@ function toCamelCase(str) {
}).join('');
}
-var fs = require('fs')
+var shell = require('shelljs')
+ , fs = require('fs')
, path = require('path')
+ , common = require('./common')
, events = require('../../events')
, xml_helpers = require(path.join(__dirname, '..', '..', 'util', 'xml-helpers'));
@@ -49,26 +51,18 @@ module.exports = {
},
'source-file':{
install:function(source_el, plugin_dir, project_dir, plugin_id) {
- var shell = require('shelljs');
- var dest = path.join(project_dir, 'build', 'src', 'plugins', plugin_id);
- shell.mkdir(dest);
- shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
-
- shell.exec('touch ' + path.join(project_dir, 'CMakeLists.txt'));
+ var dest = path.join('build', 'src', 'plugins', plugin_id, path.basename(source_el.attrib.src));
+ common.copyFile(plugin_dir, source_el.attrib.src, project_dir, dest);
},
uninstall:function(source_el, project_dir, plugin_id) {
- var shell = require('shelljs');
-
var dest = path.join(project_dir, 'build', 'src', 'plugins', plugin_id);
shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
}
},
'header-file':{
install:function(source_el, plugin_dir, project_dir, plugin_id) {
- var shell = require('shelljs');
- var dest = path.join(project_dir, 'build', 'src', 'plugins', plugin_id);
- shell.mkdir(dest);
- shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
+ var dest = path.join('build', 'src', 'plugins', plugin_id, path.basename(source_el.attrib.src));
+ common.copyFile(plugin_dir, source_el.attrib.src, project_dir, dest);
var plugins = path.join(project_dir, 'build', 'src', 'coreplugins.cpp');
var src = String(fs.readFileSync(plugins));
@@ -81,7 +75,6 @@ module.exports = {
fs.writeFileSync(plugins, src);
},
uninstall:function(source_el, project_dir, plugin_id) {
- var shell = require('shelljs');
var dest = path.join(project_dir, 'build', 'src', 'plugins', plugin_id);
shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
@@ -98,14 +91,10 @@ module.exports = {
},
'resource-file':{
install:function(source_el, plugin_dir, project_dir, plugin_id) {
- var shell = require('shelljs');
- var dest = path.join(project_dir, 'qml');
- shell.mkdir(dest);
- shell.cp(path.join(plugin_dir, source_el.attrib.src), dest);
+ var dest = path.join('qml', path.basename(source_el.attrib.src));
+ common.copyFile(plugin_dir, source_el.attrib.src, project_dir, dest);
},
uninstall:function(source_el, project_dir, plugin_id) {
- var shell = require('shelljs');
-
var dest = path.join(project_dir, 'qml');
shell.rm(path.join(dest, path.basename(source_el.attrib.src)));
}
[22/50] git commit: Fix link/copy parent check for windows
Posted by an...@apache.org.
Fix link/copy parent check for windows
Reported as cca issue #260
https://github.com/MobileChromeApps/mobile-chrome-apps/issues/260
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/35202bc6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/35202bc6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/35202bc6
Branch: refs/heads/master
Commit: 35202bc654c3b73e7780ec9d5f49aded0586a35d
Parents: b10be02
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Tue Aug 12 16:53:16 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/create.js | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/35202bc6/cordova-lib/src/cordova/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/create.js b/cordova-lib/src/cordova/create.js
index 7aef292..c8cb694 100644
--- a/cordova-lib/src/cordova/create.js
+++ b/cordova-lib/src/cordova/create.js
@@ -105,11 +105,15 @@ function create(dir, id, name, cfg) {
config_json.lib.www.id = config_json.lib.www.id || 'dummy_id';
symlink = !!config_json.lib.www.link;
- // Make sure that the source www/ is not a direct ancestor of the target www/, or else we will recursively copy forever.
- // To do this, we make sure that the shortest relative path from source-to-target must start by going up at least one directory.
- var relative_path_from_source_to_target = path.relative(config_json.lib.www.url, www_dir);
- var does_relative_path_go_up_at_least_one_dir = relative_path_from_source_to_target.split(path.sep)[0] == '..';
- if (!does_relative_path_go_up_at_least_one_dir) {
+ // Make sure that the source www/ is not a direct ancestor of the
+ // target www/, or else we will recursively copy forever. To do this,
+ // we make sure that the shortest relative path from source-to-target
+ // must start by going up at least one directory or with a drive
+ // letter for Windows.
+ var rel_path = path.relative(config_json.lib.www.url, www_dir);
+ var goes_up = rel_path.split(path.sep)[0] == '..';
+
+ if (!(goes_up || rel_path[1] == ':')) {
throw new CordovaError(
'Project dir "' +
dir +
[39/50] git commit: CB-7118 (fix jshint warnings)
Posted by an...@apache.org.
CB-7118 (fix jshint warnings)
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/ea717cbf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/ea717cbf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/ea717cbf
Branch: refs/heads/master
Commit: ea717cbf0f77cb7f3a1bae36d38597f6b8fac20d
Parents: e86fab8
Author: Josh Soref <js...@blackberry.com>
Authored: Wed Aug 20 16:39:47 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/metadata/ios_parser.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/ea717cbf/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index 19b63e8..b853fab 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -264,9 +264,9 @@ function default_CFBundleVersion(version) {
// Converts cordova specific representation of target device to XCode value
function parseTargetDevicePreference(value) {
if (!value) return null;
- var map = { 'universal': '"1,2"', 'handset': '"1"', 'tablet': '"2"'}
+ var map = { 'universal': '"1,2"', 'handset': '"1"', 'tablet': '"2"'};
if (map[value.toLowerCase()]) {
- return map[value.toLowerCase()]
+ return map[value.toLowerCase()];
}
events.emit('warn', 'Unknown target-device preference value: "' + value + '".');
return null;
[02/50] git commit: CB-7234 added better outputs for plugin registry
workflows
Posted by an...@apache.org.
CB-7234 added better outputs for plugin registry workflows
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/429292fd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/429292fd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/429292fd
Branch: refs/heads/master
Commit: 429292fd2ce1a2a5369a1bc06375199db124f800
Parents: f528fdd
Author: Steven Gill <st...@gmail.com>
Authored: Mon Aug 4 15:36:05 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/plugman.js | 17 ++++++++++++-----
cordova-lib/src/plugman/registry/registry.js | 12 +++++++++---
2 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/429292fd/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 9e42382..5598628 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -178,9 +178,13 @@ plugman.commands = {
if(!plugin_path) {
return console.log(plugman.help());
}
- plugman.publish(plugin_path, function(err) {
- if (err) throw err;
- else console.log('Plugin published');
+ plugman.publish(plugin_path, function(arg1, err) {
+ if (err) {
+ console.log('Error Code: '+err.code);
+ throw err;
+ } else {
+ console.log('Plugin published');
+ }
});
},
@@ -189,8 +193,11 @@ plugman.commands = {
if(!plugin) {
return console.log(plugman.help());
}
- plugman.unpublish(plugin, function(err) {
- if (err) throw err;
+ plugman.unpublish(plugin, function(arg1, err) {
+ if (err) {
+ console.log('Error Code: ' + err.code);
+ throw err;
+ }
else console.log('Plugin unpublished');
});
},
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/429292fd/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
index c1a6c7c..d74a572 100644
--- a/cordova-lib/src/plugman/registry/registry.js
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -31,6 +31,7 @@ var npm = require('npm'),
Q = require('q'),
request = require('request'),
home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,
+ events = require('../../events'),
plugmanConfigDir = path.resolve(home, '.plugman'),
plugmanCacheDir = path.resolve(plugmanConfigDir, 'cache');
@@ -91,10 +92,13 @@ module.exports = {
}).then(function() {
// With no --force we'll get a 409 (conflict) when trying to
// overwrite an existing package@version.
- npm.config.set('force', true);
+ //npm.config.set('force', true);
+ events.emit('log', 'attempting to publish plugin to registry');
return Q.ninvoke(npm.commands, 'publish', args);
- }).fin(function() {
+ }).then(function() {
fs.unlink(path.resolve(args[0], 'package.json'));
+ }).catch(function(err){
+ return err;
});
});
},
@@ -125,10 +129,11 @@ module.exports = {
}).then(function() {
// --force is required to delete an entire plugin with all versions.
// Without --force npm can only unpublish a specific version.
- npm.config.set('force', true);
+ //npm.config.set('force', true);
// Note, npm.unpublish does not report back errors (at least some)
// e.g.: `unpublish non.existent.plugin`
// will complete with no errors.
+ events.emit('log', 'attempting to unpublish plugin from registry');
return Q.ninvoke(npm.commands, 'unpublish', args);
}).then(function() {
// npm.unpublish removes the cache for the unpublished package
@@ -177,6 +182,7 @@ module.exports = {
// Plugin info should be accessed as info[version]. If a version
// specifier like >=x.y.z was used when calling npm view, info
// can contain several versions, but we take the first one here.
+ console.log(info);
var version = Object.keys(info)[0];
return info[version];
});
[50/50] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/cordova-lib
Posted by an...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-lib
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/5f499aaf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/5f499aaf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/5f499aaf
Branch: refs/heads/master
Commit: 5f499aaf93a02b1db027b39452aedff6f59f4d59
Parents: 9484021 61aee68
Author: Anis Kadri <an...@apache.org>
Authored: Fri Sep 5 11:12:32 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:32 2014 -0700
----------------------------------------------------------------------
----------------------------------------------------------------------
[15/50] git commit: Style fixes - comments
Posted by an...@apache.org.
Style fixes - comments
//xyz -> // Xyz (space and capitalization).
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b10be028
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b10be028
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b10be028
Branch: refs/heads/master
Commit: b10be028913360734080c9f735605ec0617daae5
Parents: 92e9e44
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Fri Aug 8 14:46:55 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/create.js | 16 +++++++-------
cordova-lib/src/plugman/platform.js | 24 ++++++++++-----------
cordova-lib/src/plugman/registry/manifest.js | 9 ++++----
cordova-lib/src/plugman/util/config-changes.js | 4 ++--
4 files changed, 26 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b10be028/cordova-lib/src/plugman/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/create.js b/cordova-lib/src/plugman/create.js
index 684b126..a63ffea 100644
--- a/cordova-lib/src/plugman/create.js
+++ b/cordova-lib/src/plugman/create.js
@@ -37,38 +37,38 @@ module.exports = function create( name, id, version, pluginPath, options ) {
clobber,
jsMod;
- //check we are not already in a plugin
+ // Check we are not already in a plugin
if( fs.existsSync( cwd + 'plugin.xml' ) ) {
return Q.reject( new CordovaError( 'plugin.xml already exists. Are you already in a plugin?' ) );
}
- //Create a plugin.xml file
+ // Create a plugin.xml file
root = et.Element( 'plugin' );
root.set( 'xmlns', 'http://apache.org/cordova/ns/plugins/1.0' );
root.set( 'xmlns:android', 'http://schemas.android.com/apk/res/android' );
root.set( 'id', id );
root.set( 'version', version );
- //Add the name tag
+ // Add the name tag
pluginName = et.XML( '<name>' );
pluginName.text = name;
root.append( pluginName );
- //loop through the options( variables ) for other tags
+ // Loop through the options( variables ) for other tags
for( var key in options ) {
var temp = et.XML( '<' + key + '>');
temp.text = options[ key ];
root.append( temp );
}
- //setup the directory structure
+ // Setup the directory structure
shell.mkdir( '-p', cwd + 'www' );
shell.mkdir( '-p', cwd + 'src' );
- //create a base plugin.js file
+ // Create a base plugin.js file
baseJS = fs.readFileSync( templatesDir + 'base.js', 'utf-8').replace( /%pluginName%/g, name );
fs.writeFileSync( cwd + 'www/' + name + '.js', baseJS, 'utf-8' );
- //Add it to the xml as a js module
+ // Add it to the xml as a js module
jsMod = et.Element( 'js-module' );
jsMod.set( 'src', 'www/' + name + '.js' );
jsMod.set( 'name', name );
@@ -79,7 +79,7 @@ module.exports = function create( name, id, version, pluginPath, options ) {
root.append( jsMod );
- //Write out the plugin.xml file
+ // Write out the plugin.xml file
fs.writeFileSync( cwd + 'plugin.xml', new et.ElementTree( root ).write( {indent: 4} ), 'utf-8' );
return Q();
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b10be028/cordova-lib/src/plugman/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/platform.js b/cordova-lib/src/plugman/platform.js
index 414e975..8761986 100644
--- a/cordova-lib/src/plugman/platform.js
+++ b/cordova-lib/src/plugman/platform.js
@@ -33,23 +33,23 @@ module.exports = {
var pluginxml,
platform;
- //check to make sure we are in the plugin first
+ // Check to make sure we are in the plugin first
if( !fs.existsSync( 'plugin.xml' ) ) {
return Q.reject( new Error( "can't find a plugin.xml. Are you in the plugin?" ) );
}
- //Get the current plugin.xml file
+ // Get the current plugin.xml file
pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
- //Check if this platform exists
+ // Check if this platform exists
if( pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
return Q.reject( new Error( "platform: " + platformName + " already added" ) );
}
- //Get the platform specific elements
+ // Get the platform specific elements
platform = doPlatform( platformName, pluginxml.find("./name").text, pluginxml.getroot().get( "id" ) );
- //Make sure we support it
+ // Make sure we support it
if( !platform ) {
return Q.reject( new Error( "platform: " + platformName + " not yet supported" ) );
}
@@ -60,26 +60,26 @@ module.exports = {
return Q();
},
remove: function( platformName ) {
- //check to make sure we are in the plugin first
+ // Check to make sure we are in the plugin first
if( !fs.existsSync( 'plugin.xml' ) ) {
return Q.reject( new Error( "can't find a plugin.xml. Are you in the plugin?" ) );
}
- //Get the current plugin.xml file
+ // Get the current plugin.xml file
var pluginxml = et.parse( fs.readFileSync('plugin.xml', 'utf-8') );
- //Check if this platform exists
+ // Check if this platform exists
if( !pluginxml.find("./platform/[@name='"+ platformName +"']") ) {
return Q.reject( new Error( "platform: " + platformName + " hasn't been added" ) );
}
- //Remove the Platform in question
+ // Remove the Platform in question
pluginxml.getroot().remove( 0, pluginxml.find("./platform/[@name='"+ platformName +"']") );
- //Rewrite the plugin.xml file back out
+ // Rewrite the plugin.xml file back out
fs.writeFileSync( "plugin.xml", pluginxml.write( "plugin.xml", {indent: 4} ), 'utf-8' );
- //Remove the src/"platform"
+ // Remove the src/"platform"
shell.rm( '-rf', 'src/' + platformName );
return Q();
@@ -107,7 +107,7 @@ function doPlatform( platformName, pluginName, pluginID, pluginVersion ) {
}
function doPlatformBase( templatesDir, platformName, pluginName, pluginID, pluginVersion ) {
- //Create the default plugin file
+ // Create the default plugin file
var baseFiles = [],
i = 0;
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b10be028/cordova-lib/src/plugman/registry/manifest.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/manifest.js b/cordova-lib/src/plugman/registry/manifest.js
index 5306b0e..4496f34 100644
--- a/cordova-lib/src/plugman/registry/manifest.js
+++ b/cordova-lib/src/plugman/registry/manifest.js
@@ -88,7 +88,7 @@ function generatePackageJsonFromPluginXml(plugin_path) {
if(keywords) package_json.keywords = keywords.split(',');
if(platforms) package_json.platforms = platforms;
- // adding engines
+ // Adding engines
if(engines) {
package_json.engines = [];
for(var i = 0, j = engines.length ; i < j ; i++) {
@@ -96,10 +96,10 @@ function generatePackageJsonFromPluginXml(plugin_path) {
}
}
- //set docs_path to doc/index.md exists
+ // Set docs_path to doc/index.md exists
var docs_path = path.resolve(plugin_path, 'doc/index.md');
if(!(fs.existsSync(docs_path))){
- //set docs_path to doc/en/index.md
+ // Set docs_path to doc/en/index.md
docs_path = path.resolve(plugin_path, 'doc/en/index.md');
}
if(fs.existsSync(docs_path)){
@@ -107,9 +107,8 @@ function generatePackageJsonFromPluginXml(plugin_path) {
package_json.englishdoc = englishdoc;
}
- // write package.json
+ // Write package.json
var package_json_path = path.resolve(plugin_path, 'package.json');
- //console.log('about to write package.json');
fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
return package_json;
});
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b10be028/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index 11765b3..45cde7d 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -421,8 +421,8 @@ ConfigKeeper.prototype.get = ConfigKeeper_get;
function ConfigKeeper_get(project_dir, platform, file) {
var self = this;
- //This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
- //https://issues.apache.org/jira/browse/CB-6414
+ // This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml
+ // https://issues.apache.org/jira/browse/CB-6414
if(file == 'config.xml' && platform == 'android'){
file = 'res/xml/config.xml';
}
[31/50] git commit: Windows helper. Removes unnecessary
$(MSBuildThisFileDirectory)
Posted by an...@apache.org.
Windows helper. Removes unnecessary $(MSBuildThisFileDirectory)
This property is not required since all main .jsproj and other shared project files are in the same folder
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/a974991b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/a974991b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/a974991b
Branch: refs/heads/master
Commit: a974991bcf9392b9bc3917a60b4d39d14c8be4de
Parents: 55d4a68
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Aug 28 16:48:24 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/util/windows/jsproj.js | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a974991b/cordova-lib/src/util/windows/jsproj.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/util/windows/jsproj.js b/cordova-lib/src/util/windows/jsproj.js
index a20fe7f..ef1cb38 100644
--- a/cordova-lib/src/util/windows/jsproj.js
+++ b/cordova-lib/src/util/windows/jsproj.js
@@ -82,8 +82,6 @@ jsproj.prototype = {
events.emit('verbose','addReference::' + relPath);
- relPath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relPath : relPath;
-
var item = new et.Element('ItemGroup');
var extName = path.extname(relPath);
@@ -110,8 +108,6 @@ jsproj.prototype = {
removeReference:function(relPath) {
events.emit('verbose','removeReference::' + relPath);
- relPath = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relPath : relPath;
-
var extName = path.extname(relPath);
var includeText = path.basename(relPath,extName);
// <ItemGroup>
@@ -131,10 +127,9 @@ jsproj.prototype = {
}
// make ItemGroup to hold file.
var item = new et.Element('ItemGroup');
- var me = this;
+
relative_path.forEach(function(filePath) {
filePath = filePath.split('/').join('\\');
- filePath = me.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + filePath : filePath;
var content = new et.Element('Content');
content.attrib.Include = filePath;
@@ -148,7 +143,6 @@ jsproj.prototype = {
if (!isRegexp) {
// path.normalize(relative_path);// ??
relative_path = relative_path.split('/').join('\\');
- relative_path = this.isUniversalWindowsApp ? '$(MSBuildThisFileDirectory)' + relative_path : relative_path;
}
var root = this.xml.getroot();
[04/50] git commit: CB-7091: Remove check_requirements() funcs from
platform parsers
Posted by an...@apache.org.
CB-7091: Remove check_requirements() funcs from platform parsers
No longer used, removing. They were either:
1) Empty
2) Duplicating the chqck_reqs call that is also done by platform create scripts
3) In Ubuntu duplicated the code from check_reqs
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f6ada9ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f6ada9ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f6ada9ea
Branch: refs/heads/master
Commit: f6ada9eae850f3aa0d55fb56fbcde2dfdbcd0505
Parents: 21b71f5
Author: Josh Soref <js...@blackberry.com>
Authored: Wed Jul 30 16:58:34 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js | 6 +-----
cordova-lib/src/cordova/metadata/blackberry10_parser.js | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f6ada9ea/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
index db0c68d..2bc30c8 100644
--- a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
@@ -25,7 +25,6 @@ var platforms = require('../../src/cordova/platforms'),
et = require('elementtree'),
xmlHelpers = require('../../src/util/xml-helpers'),
Q = require('q'),
- child_process = require('child_process'),
config = require('../../src/cordova/config'),
ConfigParser = require('../../src/configparser/ConfigParser'),
cordova = require('../../src/cordova/cordova');
@@ -52,13 +51,10 @@ var TEST_XML = '<?xml version="1.0" encoding="UTF-8"?>\n' +
describe('blackberry10 project parser', function() {
var proj = '/some/path';
- var exists, custom, sh;
+ var exists, custom;
beforeEach(function() {
exists = spyOn(fs, 'existsSync').andReturn(true);
custom = spyOn(config, 'has_custom_path').andReturn(false);
- sh = spyOn(child_process, 'exec').andCallFake(function(cmd, opts, cb) {
- (cb || opts)(0, '', '');
- });
spyOn(ConfigParser.prototype, 'write');
spyOn(xmlHelpers, 'parseElementtreeSync').andCallFake(function() {
return new et.ElementTree(et.XML(TEST_XML));
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f6ada9ea/cordova-lib/src/cordova/metadata/blackberry10_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/blackberry10_parser.js b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
index 04a5cbf..31493a4 100644
--- a/cordova-lib/src/cordova/metadata/blackberry10_parser.js
+++ b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
@@ -26,7 +26,6 @@ var fs = require('fs'),
shell = require('shelljs'),
util = require('../util'),
Q = require('q'),
- child_process = require('child_process'),
ConfigParser = require('../../configparser/ConfigParser'),
CordovaError = require('../../CordovaError'),
events = require('../../events');
[05/50] git commit: Allow plugin modules to be .json files
Posted by an...@apache.org.
Allow plugin modules to be .json files
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/04a624b4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/04a624b4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/04a624b4
Branch: refs/heads/master
Commit: 04a624b44a518e1baa716af1dc0271518e19c0f9
Parents: dac44fc
Author: Joseph Frazier <jo...@onsip.com>
Authored: Thu Aug 7 10:06:39 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/prepare.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/04a624b4/cordova-lib/src/plugman/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/prepare.js b/cordova-lib/src/plugman/prepare.js
index 961141e..6083cbf 100644
--- a/cordova-lib/src/plugman/prepare.js
+++ b/cordova-lib/src/plugman/prepare.js
@@ -150,6 +150,9 @@ module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_
var fsPath = path.join.apply(path, pathParts);
var scriptContent = fs.readFileSync(path.join(pluginDir, fsPath), 'utf-8').replace(/^\ufeff/, ''); // Window BOM
+ if (fsPath.match(/.*\.json$/)) {
+ scriptContent = 'module.exports = ' + scriptContent;
+ }
scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) { ' + scriptContent + '\n});\n';
fs.writeFileSync(path.join(platformPluginsDir, plugin_id, fsPath), scriptContent, 'utf-8');
if(platform == 'wp8' || platform == 'windows8') {
[03/50] git commit: CB-7100: Use npm based lazy-load by default
Posted by an...@apache.org.
CB-7100: Use npm based lazy-load by default
fixing test to use imaginary version to avoid colliding with actual local content
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/f528fddb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/f528fddb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/f528fddb
Branch: refs/heads/master
Commit: f528fddb218b4da06d55f27c30a2818cab83893c
Parents: f6ada9e
Author: Josh Soref <js...@blackberry.com>
Authored: Wed Jul 30 16:33:40 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/lazy_load.spec.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f528fddb/cordova-lib/spec-cordova/lazy_load.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/lazy_load.spec.js b/cordova-lib/spec-cordova/lazy_load.spec.js
index d54f019..72a26bf 100644
--- a/cordova-lib/spec-cordova/lazy_load.spec.js
+++ b/cordova-lib/spec-cordova/lazy_load.spec.js
@@ -43,9 +43,15 @@ describe('lazy_load module', function() {
};
});
describe('cordova method (loads stock cordova libs)', function() {
- var custom;
+ var custom,
+ version;
beforeEach(function() {
custom = spyOn(lazy_load, 'custom').andReturn(Q(path.join('lib','dir')));
+ version = platforms.android.version;
+ platforms.android.version = "3.14.15.9265";
+ });
+ afterEach(function () {
+ platforms.android.version = version;
});
it('should throw if platform is not a stock cordova platform', function(done) {
lazy_load.cordova('atari').then(function() {
[34/50] git commit: CB-5535: Remove "--arc" from ios platform
creation args
Posted by an...@apache.org.
CB-5535: Remove "--arc" from ios platform creation args
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/94dea94f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/94dea94f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/94dea94f
Branch: refs/heads/master
Commit: 94dea94f1e4aa03aa306e5449349b1338f80b5c5
Parents: a974991
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Aug 29 09:24:51 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/platform.js | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/94dea94f/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index 58e7f24..c206f37 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -427,7 +427,6 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir, opts)
}
} else if (target == 'ios') {
platformVersion = fs.readFileSync(path.join(libDir, 'CordovaLib', 'VERSION'), 'UTF-8').trim();
- args.push('--arc');
if (semver.gt(platformVersion, '3.3.0')) {
args.push('--cli');
}
[37/50] git commit: CB-7114 Android: add support of min/max/target
SDK to config.xml
Posted by an...@apache.org.
CB-7114 Android: add support of min/max/target SDK to config.xml
github: close #56
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/e86fab8a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/e86fab8a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/e86fab8a
Branch: refs/heads/master
Commit: e86fab8ad0934a77620888301801d1d415392812
Parents: 867a01e
Author: sgrebnov <v-...@microsoft.com>
Authored: Thu Jul 10 12:09:03 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/spec-cordova/ConfigParser.spec.js | 5 +++++
cordova-lib/spec-cordova/test-config.xml | 3 ++-
cordova-lib/src/configparser/ConfigParser.js | 6 +++++-
cordova-lib/src/cordova/metadata/android_parser.js | 15 +++++++++++++++
4 files changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e86fab8a/cordova-lib/spec-cordova/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/ConfigParser.spec.js b/cordova-lib/spec-cordova/ConfigParser.spec.js
index 9c8c8e6..7028034 100644
--- a/cordova-lib/spec-cordova/ConfigParser.spec.js
+++ b/cordova-lib/spec-cordova/ConfigParser.spec.js
@@ -80,6 +80,11 @@ describe('config.xml parser', function () {
expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
});
});
+ describe('platform specific preference', function() {
+ it('should get value of existing platform specific preference', function() {
+ expect(cfg.getPreference('android-minSdkVersion', 'android')).toEqual('10');
+ });
+ });
describe('feature',function(){
it('should read feature id list', function() {
var expectedList = [
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e86fab8a/cordova-lib/spec-cordova/test-config.xml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/test-config.xml b/cordova-lib/spec-cordova/test-config.xml
index 3308ae0..27838b7 100644
--- a/cordova-lib/spec-cordova/test-config.xml
+++ b/cordova-lib/spec-cordova/test-config.xml
@@ -22,6 +22,7 @@
<icon id="logo" src="logo.png" width="255" height="255" />
<platform name="android">
<icon src="logo-android.png" width="255" height="255" density="mdpi" />
+ <preference name="android-minSdkVersion" value="10" />
</platform>
<!-- Features -->
@@ -45,4 +46,4 @@
<feature name="A simple feature">
<param name="id" value="org.apache.cordova.justafeature" />
</feature>
-</widget>
\ No newline at end of file
+</widget>
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e86fab8a/cordova-lib/src/configparser/ConfigParser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.js b/cordova-lib/src/configparser/ConfigParser.js
index 75f798b..da6376e 100644
--- a/cordova-lib/src/configparser/ConfigParser.js
+++ b/cordova-lib/src/configparser/ConfigParser.js
@@ -117,8 +117,12 @@ ConfigParser.prototype = {
author: function() {
return getNodeTextSafe(this.doc.find('author'));
},
- getPreference: function(name) {
+ getPreference: function(name, platform) {
var preferences = this.doc.findall('preference');
+ if (platform) { // include platform specific preferences
+ preferences = preferences.concat(
+ this.doc.findall('platform[@name=\'' + platform + '\']/preference'));
+ }
var ret = null;
preferences.forEach(function (preference) {
// Take the last one that matches.
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/e86fab8a/cordova-lib/src/cordova/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/android_parser.js b/cordova-lib/src/cordova/metadata/android_parser.js
index 12a6d1f..9f338dd 100644
--- a/cordova-lib/src/cordova/metadata/android_parser.js
+++ b/cordova-lib/src/cordova/metadata/android_parser.js
@@ -23,6 +23,7 @@
var fs = require('fs'),
path = require('path'),
+ et = require('elementtree'),
xml = require('../../util/xml-helpers'),
util = require('../util'),
events = require('../../events'),
@@ -261,6 +262,20 @@ module.exports.prototype = {
delete act.attrib["android:launchMode"]; // use Android default value (standard)
}
+ // Set min/max/target SDK version
+ //<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" ... />
+ var usesSdk = manifest.getroot().find('./uses-sdk');
+ ['minSdkVersion', 'maxSdkVersion', 'targetSdkVersion'].forEach(function(sdkPrefName) {
+ var sdkPrefValue = config.getPreference('android-' + sdkPrefName, 'android');
+ if (!sdkPrefValue) return;
+
+ if (!usesSdk) { // if there is no required uses-sdk element, we should create it first
+ usesSdk = new et.Element('uses-sdk');
+ manifest.getroot().append(usesSdk);
+ }
+ usesSdk.attrib['android:' + sdkPrefName] = sdkPrefValue;
+ });
+
// Write out AndroidManifest.xml
fs.writeFileSync(this.manifest, manifest.write({indent: 4}), 'utf-8');
[46/50] git commit: updated version, updated ffos to use 3.6.1,
updated cordova-js dependency to be strcit
Posted by an...@apache.org.
updated version, updated ffos to use 3.6.1, updated cordova-js dependency to be strcit
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/0d1074c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/0d1074c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/0d1074c3
Branch: refs/heads/master
Commit: 0d1074c3be73855b4dc6f435193238e91c486ed8
Parents: 6ac4a41
Author: Steven Gill <st...@gmail.com>
Authored: Tue Sep 2 14:01:45 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 4 ++--
cordova-lib/src/cordova/platforms.js | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0d1074c3/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 8148cc2..98f9bad 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
"author": "Apache Software Foundation",
"name": "cordova-lib",
"description": "Apache Cordova tools core lib and API",
- "version": "0.21.9-dev",
+ "version": "0.21.9",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
@@ -35,7 +35,7 @@
"tar": "0.1.x",
"underscore": "1.4.4",
"xcode": "0.6.7",
- "cordova-js": "3.x.x",
+ "cordova-js": "3.6.3",
"unorm": ">=1.3"
},
"devDependencies": {
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0d1074c3/cordova-lib/src/cordova/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platforms.js b/cordova-lib/src/cordova/platforms.js
index 55411a8..2b53dd6 100644
--- a/cordova-lib/src/cordova/platforms.js
+++ b/cordova-lib/src/cordova/platforms.js
@@ -66,7 +66,7 @@ module.exports = {
'firefoxos':{
parser: './metadata/firefoxos_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-firefoxos.git',
- version: '3.6.0'
+ version: '3.6.1'
},
'windows8':{
hostos : ['win32'],
[08/50] git commit: CB-7260 Get cordova-android 3.5.1 instead of 3.5.0
Posted by an...@apache.org.
CB-7260 Get cordova-android 3.5.1 instead of 3.5.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/628d8107
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/628d8107
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/628d8107
Branch: refs/heads/master
Commit: 628d8107afd57f8bcb35394f6de487016e3bb0a4
Parents: 5431468
Author: Marcel Kinard <cm...@gmail.com>
Authored: Mon Aug 4 20:37:38 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:17 2014 -0700
----------------------------------------------------------------------
cordova-lib/package.json | 2 +-
cordova-lib/src/cordova/platforms.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/628d8107/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 9df6a84..1518065 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
"author": "Apache Software Foundation",
"name": "cordova-lib",
"description": "Apache Cordova tools core lib and API",
- "version": "0.21.7-dev",
+ "version": "0.21.8-dev",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/628d8107/cordova-lib/src/cordova/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platforms.js b/cordova-lib/src/cordova/platforms.js
index 132c22a..cde3809 100644
--- a/cordova-lib/src/cordova/platforms.js
+++ b/cordova-lib/src/cordova/platforms.js
@@ -31,7 +31,7 @@ module.exports = {
'android' : {
parser : './metadata/android_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git',
- version: '3.5.0'
+ version: '3.5.1'
},
'ubuntu' : {
hostos : ['linux'],
[41/50] git commit: Remove use of path.join for manifest.launch_path
Posted by an...@apache.org.
Remove use of path.join for manifest.launch_path
I was having issues on Windows when creating a new FirefoxOS project. A brand new project, when added to the Firefox App Manager, gave an error: "Launch path has to be an absolute path starting with '/': '\index.html'". The issue is the use of path.join to generate manifest.launch_path. On Windows, this uses backslashes, which caused the issue. I have opted to simply use concatenation instead.
I have also fixed an issue where "cordova prepare firefoxos" would fail if there was no <content> tag in the config.xml. If it is not present, we default to index.html.
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/d406be5e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/d406be5e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/d406be5e
Branch: refs/heads/master
Commit: d406be5ede49a13ce2fddd220fc2ea557a7d093e
Parents: 586d874
Author: Menardi <he...@gearoid.me>
Authored: Fri Aug 22 22:35:13 2014 +0100
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/metadata/firefoxos_parser.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d406be5e/cordova-lib/src/cordova/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/firefoxos_parser.js b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
index e3f4818..b4e435e 100644
--- a/cordova-lib/src/cordova/metadata/firefoxos_parser.js
+++ b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
@@ -49,8 +49,8 @@ module.exports.prototype = {
// overwrite properties existing in config.xml
var contentNode = config.doc.find('content');
- var contentSrc = contentNode.attrib['src'];
- manifest.launch_path = path.join('/', contentSrc) || '/index.html';
+ var contentSrc = contentNode && contentNode.attrib['src'] || 'index.html';
+ manifest.launch_path = '/' + contentSrc;
manifest.installs_allowed_from = manifest.installs_allowed_from || ['*'];
manifest.version = config.version();
[10/50] git commit: Set git clone depth to 10 for Travis to make it
faster
Posted by an...@apache.org.
Set git clone depth to 10 for Travis to make it faster
Some background:
http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
Suggested in https://github.com/apache/cordova-lib/pull/72
github: close #72
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3de053cb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3de053cb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3de053cb
Branch: refs/heads/master
Commit: 3de053cb83ccdc934f19ab4e4985b4888983624a
Parents: 985b3bb
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Mon Aug 18 10:38:56 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
.travis.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3de053cb/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index f96ddca..3cf588b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,6 @@
language: node_js
+git:
+ depth: 10
node_js:
- "0.10"
-before_install: cd cordova-lib
\ No newline at end of file
+before_install: cd cordova-lib
[28/50] git commit: CB-7118 iOS: add target-device and
MinimumOSVersion support to config.xml
Posted by an...@apache.org.
CB-7118 iOS: add target-device and MinimumOSVersion support to config.xml
github: close #57
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/db00cdcd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/db00cdcd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/db00cdcd
Branch: refs/heads/master
Commit: db00cdcd01b7cb249a755e5ecc46c33e7f92134d
Parents: 2207e47
Author: sgrebnov <v-...@microsoft.com>
Authored: Fri Jul 11 09:44:50 2014 +0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/metadata/ios_parser.js | 71 +++++++++++++++++++--
1 file changed, 64 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/db00cdcd/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index a6254ac..f43f194 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -134,11 +134,17 @@ module.exports.prototype = {
shell.cp('-f', src, dest);
}
});
+
+ var me = this;
+ return this.update_build_settings(config).then(function() {
+ if (name == me.originalName) {
+ events.emit('verbose', 'iOS Product Name has not changed (still "' + me.originalName + '")');
+ return Q();
+ }
- if (name != this.originalName) {
// Update product name inside pbxproj file
- var proj = new xcode.project(this.pbxproj);
- var parser = this;
+ var proj = new xcode.project(me.pbxproj);
+ var parser = me;
var d = Q.defer();
proj.parse(function(err,hash) {
if (err) {
@@ -163,10 +169,7 @@ module.exports.prototype = {
}
});
return d.promise;
- } else {
- events.emit('verbose', 'iOS Product Name has not changed (still "' + this.originalName + '")');
- return Q();
- }
+ });
},
// Returns the platform-specific www directory.
@@ -217,6 +220,38 @@ module.exports.prototype = {
self.update_overrides();
util.deleteSvnFolders(self.www_dir());
});
+ },
+
+ update_build_settings:function(config) {
+ var targetDevice = parseTargetDevicePreference(config.getPreference('target-device', 'ios'));
+ var deploymentTarget = config.getPreference('deployment-target', 'ios');
+
+ // no build settings provided, we don't need to parse and update .pbxproj file
+ if (!targetDevice && !deploymentTarget) {
+ return Q();
+ }
+
+ var me = this;
+ var d = Q.defer();
+ var proj = new xcode.project(this.pbxproj);
+ proj.parse(function(err,hash) {
+ if (err) {
+ d.reject(new Error('An error occured during parsing of project.pbxproj. Start weeping. Output: ' + err));
+ return;
+ }
+ var buildConfiguration = proj.pbxXCBuildConfigurationSection();
+ if (targetDevice) {
+ // TODO: replace propReplace with proj.updateBuildProperty after below is release
+ // https://github.com/alunny/node-xcode/pull/33
+ propReplace(buildConfiguration, 'TARGETED_DEVICE_FAMILY', targetDevice);
+ }
+ if (deploymentTarget) {
+ propReplace(buildConfiguration, 'IPHONEOS_DEPLOYMENT_TARGET', deploymentTarget);
+ }
+ fs.writeFileSync(me.pbxproj, proj.writeSync(), 'utf-8');
+ d.resolve();
+ });
+ return d.promise;
}
};
@@ -226,3 +261,25 @@ module.exports.prototype = {
function default_CFBundleVersion(version) {
return version.split('-')[0];
}
+// Converts cordova specific representation of target device to XCode value
+function parseTargetDevicePreference(value) {
+ if (!value) return null;
+ var map = { 'universal': '"1,2"', 'handset': '"1"', 'tablet': '"2"'}
+ if (map[value.toLowerCase()]) {
+ return map[value.toLowerCase()]
+ }
+ events.emit('warn', 'Unknown target-device preference value: "' + value + '".');
+ return null;
+}
+// helper recursive prop search+replace
+function propReplace(obj, prop, value) {
+ for (var p in obj) {
+ if (obj.hasOwnProperty(p)) {
+ if (typeof obj[p] == 'object') {
+ propReplace(obj[p], prop, value);
+ } else if (p == prop) {
+ obj[p] = value;
+ }
+ }
+ }
+}
[47/50] git commit: CB-7457 - cordova plugin add --searchpath does
not recurse through subfolders when a plugin.xml is malformed in one of them
Posted by an...@apache.org.
CB-7457 - cordova plugin add --searchpath does not recurse through subfolders when a plugin.xml is malformed in one of them
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/94840211
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/94840211
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/94840211
Branch: refs/heads/master
Commit: 948402112b77dd216c356d16eefae13cd67b8f83
Parents: 5750b76
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Sep 3 13:56:13 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:20 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/PluginInfo.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/94840211/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/PluginInfo.js b/cordova-lib/src/PluginInfo.js
index 1d2b24a..94d6fb1 100644
--- a/cordova-lib/src/PluginInfo.js
+++ b/cordova-lib/src/PluginInfo.js
@@ -270,10 +270,15 @@ function loadPluginsDir(dirname) {
var plugins = [];
subdirs.forEach(function (subdir) {
var d = path.join(dirname, subdir);
- if (!fs.existsSync(path.join(d, 'plugin.xml')))
+ if (!fs.existsSync(path.join(d, 'plugin.xml'))) {
return; // continue
- var p = new PluginInfo(d);
- plugins.push(p);
+ }
+ try {
+ var p = new PluginInfo(d);
+ plugins.push(p);
+ } catch (e) {
+ // ignore errors while parsing so we can continue with searching
+ }
});
return plugins;
}
[18/50] git commit: Fix error in comments for munge functions
Posted by an...@apache.org.
Fix error in comments for munge functions
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/92e9e444
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/92e9e444
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/92e9e444
Branch: refs/heads/master
Commit: 92e9e44456e345025060bb5f7cf5a4f86b453072
Parents: 06afe8c
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Fri Aug 8 11:45:16 2014 -0400
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:18 2014 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/util/config-changes.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/92e9e444/cordova-lib/src/plugman/util/config-changes.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/config-changes.js b/cordova-lib/src/plugman/util/config-changes.js
index 6e713f5..11765b3 100644
--- a/cordova-lib/src/plugman/util/config-changes.js
+++ b/cordova-lib/src/plugman/util/config-changes.js
@@ -797,7 +797,7 @@ function process_munge(obj, createParents, func, keys /* or key1, key2 .... */ )
}
// All values from munge are added to base as
-// base[file][selector][child] += base[file][selector][child]
+// base[file][selector][child] += munge[file][selector][child]
// Returns a munge object containing values that exist in munge
// but not in base.
function increment_munge(base, munge) {
@@ -820,7 +820,7 @@ function increment_munge(base, munge) {
}
// Update the base munge object as
-// base[file][selector][child] -= base[file][selector][child]
+// base[file][selector][child] -= munge[file][selector][child]
// nodes that reached zero value are removed from base and added to the returned munge
// object.
function decrement_munge(base, munge) {
[30/50] git commit: Updated version and RELEASENOTES.md for release
0.21.8
Posted by an...@apache.org.
Updated version and RELEASENOTES.md for release 0.21.8
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/c709cb5f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/c709cb5f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/c709cb5f
Branch: refs/heads/master
Commit: c709cb5f4e5d5f2cb5d7b7c49b2a1bed3e3f7da7
Parents: 94dea94
Author: Steven Gill <st...@gmail.com>
Authored: Fri Aug 29 16:54:41 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700
----------------------------------------------------------------------
cordova-lib/RELEASENOTES.md | 103 ++++++++++++++++++++++++++++++++++++++-
cordova-lib/package.json | 2 +-
2 files changed, 103 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c709cb5f/cordova-lib/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/cordova-lib/RELEASENOTES.md b/cordova-lib/RELEASENOTES.md
index 7dc6914..0c539c5 100644
--- a/cordova-lib/RELEASENOTES.md
+++ b/cordova-lib/RELEASENOTES.md
@@ -78,4 +78,105 @@
### 0.21.1
-Initial release v0.21.1 (picks up from the same version number as plugman was).
\ No newline at end of file
+Initial release v0.21.1 (picks up from the same version number as plugman was).
+
+### 0.21.8 (Aug 29, 2014)
+* CB-5535: Remove "--arc" from ios platform creation args
+* CB-7416 Fixes file path reference when adding new source file
+* CB-7416 handleInstall tests for null platformTag. removed uncalled 'hasPlatformSection' from PluginInfo.js
+* Remove use of path.join for manifest.launch_path
+* CB-7347 Improve cordova platform add /path/to handling
+* CB-7118 (fix jshint warnings)
+* CB-7114 Android: add support of min/max/target SDK to config.xml
+* CB-7118 Use updated version of node-xcode
+* CB-7118 iOS: add target-device and MinimumOSVersion support to config.xml
+* ubuntu: support incremental builds
+* ubuntu: support target-dir for resource-file
+* ubuntu: use common.copyFile
+* ubuntu: check icon existence
+* ffos: Make author url optional
+* CB-7142 Add <variable> to <feature> for "plugin restore" command
+* Set git clone depth to 10 for Travis to make it faster
+* windows: update as per changed manifest file names
+* Don't spy and expect it to call the other spy ...
+* Well that looks like an error
+* Fixing failing tests: update_proj should be update_project
+* Fix failing tests. update_jsproj and update_csproj are now just update_proj
+* Fix jshint errors in amazon_fireos_parser : mixed single/double quotes
+* CB-6699 Include files from www folder via single element (use ** glob pattern)
+* Allow plugin modules to be .json files
+* Taking care of dashes in amazon-fireos platform name.
+* Upleveled amazon-fireos changes.
+* Fix link/copy parent check for windows
+* Style fixes - comments
+* Fix error in comments for munge functions
+* Add link to BuildBot at ci.cordova.io in README
+* CB-7255 Fixed writing plist unescaped
+* Style fixes - white space only
+* Add JSCS config file
+* CB-7228: Fixed issue with "cordova prepare --browserify"
+* CB-7001: Create a --browserify option for run action
+* CB-7228: Cordova prepare --browserify runs on all installed plugins
+* CB-7190: Add browserify support in cordova-lib/cordova-cli
+* CB-7260 Get cordova-android 3.5.1 instead of 3.5.0
+* CB-7001: Create a --browserify option for run action
+* CB-7228: Cordova prepare --browserify runs on all installed plugins
+* CB-7190: Add browserify support in cordova-lib/cordova-cli
+* CB-7234 added better outputs for plugin registry workflows
+* CB-7100: Use npm based lazy-load by default
+* CB-7091: Remove check_requirements() funcs from platform parsers
+* CB-7091: Remove check_requirements() funcs from platform parsers
+* CB-7140 Check plugin versions in local search path
+* small refactor for missing code block after conditional statement
+* CB-7203 isRelativePath needs to pass path through
+* CB-7199 control git/npm using platform.js
+* CB-7199 control git/npm using platform.js
+* Fix style errors - make jshint happy
+* CB-6756 Adds save and restore command for platforms.
+* Add VERSION files to fix failing tests (forgot to git add in b7781cb)
+* CB-7132 Fix regression regarding default resources
+* CB-7187 Make CoreLocation a required library only for cordova-ios < 3.6.0
+* Add AppVeyor badge to README
+* Add Travis and npm badges to README.md
+* fix(tests): cordova/lazy_load spec on Windows
+* Fix plugman/install spec
+* build configuration for AppVeyor
+* build configurations for Travis
+* CB-7124 Wrap the cordova platform string in Platform object
+* CB-7140: Switch to using PluginInfo in plugman/fetch.js
+* Minor style fixes in fetch.js
+* CB-7078: Disable serve.spec.js
+* CB-6512: platform add <path> was using wrong www/cordova.js
+* CB-7083 Missing SDKReference support on Windows Phone
+* CB-6874 Consolidate <Content> tag additions into 1 ItemGroup
+* CB-7100: Use npm based lazy-load by default
+* CB-7091: Remove check_requirements() funcs from platform parsers
+* CB-7091: Don't call check_requirements during platform add
+* Fix typo in comment.
+* CB-7087 Retire blackberry10/ directory
+* CB-6776: Fix uri/url renaming bug
+* Remove npm-shrinkwrap.json
+* Look at the old uri in config.json in addition to the new url (i vs. l).
+* Add --captureExceptions flag to jasmine
+* CB-6992 Fix ios platform add/prepare when app name contains unicode chars
+* CB-7070 Don't create hooks/ if it already exists
+* CB-6357 (fix latent bug)
+* CB-6776 (correct windows8 fallback path)
+* CB-6776 (avoid stomping on global platforms properties)
+* CB-7065 lazy_load: do not append tgz for non urls
+* CB-7063 (fix case of Q)
+* CB-6776 (use .extend instead of custom mixin function)
+* CB-6776 Make project/.cordova/config.json integrate with platforms.js
+* CB-7056 make tests conditional using it/xit instead of iit/it
+* CB-7045 (fix up quotes to make jshint happy)
+* CB-7063 save.spec and restore.spec use a proper spy
+* CB-7056 serve: fix Android test, make tests conditional
+* CB-7037 platform check doesn't warn when it can't install a platform
+* removed extra whitespace
+* removed "pkgName "
+* CB-7056 serve: return promise of server
+* CB-7045 plugman.install: engine.currentVersion should be a semver or null
+* CB-7045 plugman.install.spec: shell.which depends on plugman.raw.fetch actually being called
+* CB-7042 serve.spec: really expect not a Cordova-based project exception
+* CB-7042 serve.spec: enable basic serve test
+* CB-6879 fix cordova serve
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c709cb5f/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index 1d8ab81..b49e64a 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -2,7 +2,7 @@
"author": "Apache Software Foundation",
"name": "cordova-lib",
"description": "Apache Cordova tools core lib and API",
- "version": "0.21.8-dev",
+ "version": "0.21.8",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"