You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/11/27 21:11:23 UTC
[01/10] git commit: Append subdirectory for concerned platforms
Updated Branches:
refs/heads/master 700c9d6ef -> 2c62a273c
Append subdirectory for concerned platforms
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/a6d8d655
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/a6d8d655
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/a6d8d655
Branch: refs/heads/master
Commit: a6d8d6550a4a41581712c144d6b0ca5b08bc28e3
Parents: 19513a1
Author: SomaticIT <co...@somatic.fr>
Authored: Thu Nov 14 22:05:09 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Thu Nov 14 22:05:09 2013 +0100
----------------------------------------------------------------------
platforms.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/a6d8d655/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
index bcb3032..1e439c0 100644
--- a/platforms.js
+++ b/platforms.js
@@ -31,17 +31,20 @@ module.exports = {
'wp7' : {
parser : './src/metadata/wp7_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.2.0-rc1'
+ version: '3.2.0-rc1',
+ subdirectory: 'wp7'
},
'wp8' : {
parser : './src/metadata/wp8_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.2.0-rc1'
+ version: '3.2.0-rc1',
+ subdirectory: 'wp8'
},
'blackberry10' : {
parser : './src/metadata/blackberry10_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
- version: '3.2.0-rc1'
+ version: '3.2.0-rc1',
+ subdirectory: 'blackberry10'
},
'www':{
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
@@ -55,7 +58,8 @@ module.exports = {
'windows8':{
parser: './src/metadata/windows8_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git',
- version: '3.2.0-rc1'
+ version: '3.2.0-rc1',
+ subdirectory: 'windows8'
}
};
[05/10] git commit: Update tests to match improvements
Posted by pu...@apache.org.
Update tests to match improvements
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/372e598f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/372e598f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/372e598f
Branch: refs/heads/master
Commit: 372e598f41350646ef52f1fba021e5e7007f1ffa
Parents: abab971
Author: SomaticIT <co...@somatic.fr>
Authored: Thu Nov 14 22:07:30 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Thu Nov 14 22:07:30 2013 +0100
----------------------------------------------------------------------
spec/metadata/windows8_parser.spec.js | 5 -----
spec/platform.spec.js | 4 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/372e598f/spec/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/windows8_parser.spec.js b/spec/metadata/windows8_parser.spec.js
index 87a2675..1187ac6 100644
--- a/spec/metadata/windows8_parser.spec.js
+++ b/spec/metadata/windows8_parser.spec.js
@@ -228,7 +228,6 @@ describe('windows8 project parser', function() {
var config, www, overrides, staging, svn;
beforeEach(function() {
config = spyOn(p, 'update_from_config');
- www = spyOn(p, 'update_www');
staging = spyOn(p, 'update_staging');
svn = spyOn(util, 'deleteSvnFolders');
});
@@ -243,10 +242,6 @@ describe('windows8 project parser', function() {
expect(err).toEqual(err);
});
});
- it('should call update_www', function() {
- p.update_project();
- expect(www).toHaveBeenCalled();
- });
it('should call update_staging', function() {
p.update_project();
expect(staging).toHaveBeenCalled();
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/372e598f/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index c9fee80..6df69a1 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -76,9 +76,9 @@ describe('platform command', function() {
fakeLazyLoad = function(id, platform, version) {
if (platform == 'wp7' || platform == 'wp8') {
- return Q(path.join('lib', 'wp', id, version));
+ return Q(path.join('lib', 'wp', id, version, platform));
} else {
- return Q(path.join('lib', platform, id, version));
+ return Q(path.join('lib', platform, id, version, platforms[platform] && platforms[platform].subdirectory ? platforms[platform].subdirectory : ''));
}
};
lazyLoadVersion = '3.1.0';
[07/10] git commit: Merge pull request #2 from purplecabbage/CB-5392
Posted by pu...@apache.org.
Merge pull request #2 from purplecabbage/CB-5392
Cb 5392
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/b9badb35
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/b9badb35
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/b9badb35
Branch: refs/heads/master
Commit: b9badb355e28a127b85209cde279964e8ea35f20
Parents: 5977d74 4e7def9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Nov 26 13:57:18 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Nov 26 13:57:18 2013 -0800
----------------------------------------------------------------------
platforms.js | 12 ++++++++----
spec/metadata/windows8_parser.spec.js | 5 -----
spec/platform.spec.js | 4 ++--
src/lazy_load.js | 15 ++++++++++-----
src/metadata/windows8_parser.js | 5 +----
src/metadata/wp7_parser.js | 2 +-
src/metadata/wp8_parser.js | 2 +-
src/platform.js | 8 --------
8 files changed, 23 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
[04/10] git commit: Update parsers to match new libDir returned by
lazy_load
Posted by pu...@apache.org.
Update parsers to match new libDir returned by lazy_load
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/abab971e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/abab971e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/abab971e
Branch: refs/heads/master
Commit: abab971ed6d30460fb3474c784de9fcea6b7351f
Parents: 20faff1
Author: SomaticIT <co...@somatic.fr>
Authored: Thu Nov 14 22:07:06 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Thu Nov 14 22:07:06 2013 +0100
----------------------------------------------------------------------
src/metadata/windows8_parser.js | 4 +---
src/metadata/wp7_parser.js | 2 +-
src/metadata/wp8_parser.js | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/abab971e/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/windows8_parser.js b/src/metadata/windows8_parser.js
index dbddf30..968ba1c 100644
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@ -146,7 +146,7 @@ module.exports.prototype = {
// Used for creating platform_www in projects created by older versions.
cordovajs_path:function(libDir) {
- var jsPath = path.join(libDir, 'windows8', "template", 'www', 'cordova.js');
+ var jsPath = path.join(libDir, "template", 'www', 'cordova.js');
return path.resolve(jsPath);
},
@@ -249,8 +249,6 @@ module.exports.prototype = {
return Q.reject(e);
}
// overrides (merges) are handled in update_www()
- var libDir = path.join(util.libDirectory, 'windows8', 'cordova', require('../../platforms').windows8.version);
- this.update_www(libDir);
this.update_staging();
util.deleteSvnFolders(this.www_dir());
return Q();
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/abab971e/src/metadata/wp7_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp7_parser.js b/src/metadata/wp7_parser.js
index 4cfb63d..55023aa 100644
--- a/src/metadata/wp7_parser.js
+++ b/src/metadata/wp7_parser.js
@@ -156,7 +156,7 @@ module.exports.prototype = {
// Used for creating platform_www in projects created by older versions.
cordovajs_path:function(libDir) {
- var jsPath = path.join(libDir, 'common', 'www', 'cordova.js');
+ var jsPath = path.join(libDir, '..', 'common', 'www', 'cordova.js');
return path.resolve(jsPath);
},
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/abab971e/src/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/wp8_parser.js b/src/metadata/wp8_parser.js
index 401e3c7..39fc3f2 100644
--- a/src/metadata/wp8_parser.js
+++ b/src/metadata/wp8_parser.js
@@ -160,7 +160,7 @@ module.exports.prototype = {
// Used for creating platform_www in projects created by older versions.
cordovajs_path:function(libDir) {
- var jsPath = path.join(libDir, 'common', 'www', 'cordova.js');
+ var jsPath = path.join(libDir, '..', 'common', 'www', 'cordova.js');
return path.resolve(jsPath);
},
[03/10] git commit: Remove platform check in platform add and update
Posted by pu...@apache.org.
Remove platform check in platform add and update
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/20faff11
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/20faff11
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/20faff11
Branch: refs/heads/master
Commit: 20faff115b7f8b647e964e26fb0b9dd40f2bd31c
Parents: 86802d8
Author: SomaticIT <co...@somatic.fr>
Authored: Thu Nov 14 22:06:42 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Thu Nov 14 22:06:42 2013 +0100
----------------------------------------------------------------------
src/platform.js | 8 --------
1 file changed, 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/20faff11/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 214d396..536969c 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -116,10 +116,6 @@ module.exports = function platform(command, targets) {
.then(function() {
return lazy_load.based_on_config(projectRoot, plat);
}).then(function(libDir) {
- // Check for platforms are in subdirectories into repositories
- if (["wp7", "wp8", "windows8", "windows81", "blackberry10"].indexOf(plat) !== -1)
- libDir = path.join(libDir, target);
-
var script = path.join(libDir, 'bin', 'update');
var d = Q.defer();
child_process.exec(script + ' "' + path.join(projectRoot, 'platforms', plat) + '"', function(err, stdout, stderr) {
@@ -226,10 +222,6 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir) {
events.emit('verbose', 'Checking if platform "' + target + '" passes minimum requirements...');
return module.exports.supports(projectRoot, target)
.then(function() {
- // Check for platforms are in subdirectories into repositories
- if (["wp7", "wp8", "windows8", "windows81", "blackberry10"].indexOf(target) !== -1)
- libDir = path.join(libDir, target);
-
// Create a platform app using the ./bin/create scripts that exist in each repo.
var bin = path.join(libDir, 'bin', 'create');
var args = (target=='ios') ? '--arc' : '';
[10/10] git commit: added win-test to be run on windows,
which does not include e2e tests which have multiple failures on
windows.
Posted by pu...@apache.org.
added win-test to be run on windows, which does not include e2e tests which have multiple failures on windows.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/2c62a273
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/2c62a273
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/2c62a273
Branch: refs/heads/master
Commit: 2c62a273c314174c07fc3322b14ce15056d2eb4e
Parents: 9c11350
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Nov 27 12:09:07 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Nov 27 12:09:07 2013 -0800
----------------------------------------------------------------------
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/2c62a273/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 6075474..5074cdd 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
"cordova": "./bin/cordova"
},
"scripts": {
- "test": "jasmine-node --color spec e2e"
+ "test": "jasmine-node --color spec e2e",
+ "win-test" : "jasmine-node --color spec"
},
"repository": {
"type": "git",
[02/10] git commit: Make lazy_load method aware of subdirectory field
Posted by pu...@apache.org.
Make lazy_load method aware of subdirectory field
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/86802d8f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/86802d8f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/86802d8f
Branch: refs/heads/master
Commit: 86802d8f3ea422ed5478bad18f0fb2c6b4deb817
Parents: a6d8d65
Author: SomaticIT <co...@somatic.fr>
Authored: Thu Nov 14 22:06:16 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Thu Nov 14 22:06:16 2013 +0100
----------------------------------------------------------------------
src/lazy_load.js | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/86802d8f/src/lazy_load.js
----------------------------------------------------------------------
diff --git a/src/lazy_load.js b/src/lazy_load.js
index c53e19f..e16dd70 100644
--- a/src/lazy_load.js
+++ b/src/lazy_load.js
@@ -46,9 +46,12 @@ module.exports = {
custom:function(url, id, platform, version) {
var download_dir = (platform == 'wp7' || platform == 'wp8' ? path.join(util.libDirectory, 'wp', id, version) :
path.join(util.libDirectory, platform, id, version));
+
+ var lib_dir = platforms[platform] && platforms[platform].subdirectory ? path.join(download_dir, platforms[platform].subdirectory) : download_dir;
+
if (fs.existsSync(download_dir)) {
events.emit('verbose', id + ' library for "' + platform + '" already exists. No need to download. Continuing.');
- return Q(download_dir);
+ return Q(lib_dir);
}
events.emit('log', 'Downloading ' + id + ' library for ' + platform + '...');
return hooker.fire('before_library_download', {
@@ -99,14 +102,14 @@ module.exports = {
events.emit('log', 'Download complete');
var entries = fs.readdirSync(download_dir);
var entry = path.join(download_dir, entries[0]);
- shell.mv('-f', path.join(entry, (platform=='blackberry10'?'blackberry10':''), '*'), download_dir);
+ shell.mv('-f', path.join(entry, '*'), download_dir);
shell.rm('-rf', entry);
d.resolve(hooker.fire('after_library_download', {
platform:platform,
url:url,
id:id,
version:version,
- path:download_dir,
+ path: lib_dir,
size:size,
symlink:false
}));
@@ -116,16 +119,18 @@ module.exports = {
// Local path.
// Do nothing here; users of this code should be using the returned path.
download_dir = uri.protocol && uri.protocol[1] == ':' ? uri.href : uri.path;
+ lib_dir = platforms[platform] && platforms[platform].subdirectory ? path.join(download_dir, platforms[platform].subdirectory) : download_dir;
+
d.resolve(hooker.fire('after_library_download', {
platform:platform,
url:url,
id:id,
version:version,
- path:download_dir,
+ path: lib_dir,
symlink:false
}));
}
- return d.promise.then(function() { return download_dir; });
+ return d.promise.then(function () { return lib_dir; });
});
},
// Returns a promise for the path to the lazy-loaded directory.
[08/10] git commit: fixed failing tests recently introduced with
Windows8 parser changes
Posted by pu...@apache.org.
fixed failing tests recently introduced with Windows8 parser changes
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/4700a64a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/4700a64a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/4700a64a
Branch: refs/heads/master
Commit: 4700a64a919c27f31034f38fd89ea904d216c5f4
Parents: b9badb3
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Nov 27 11:53:14 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Nov 27 11:53:14 2013 -0800
----------------------------------------------------------------------
spec/metadata/windows8_parser.spec.js | 66 ++++++++++++++----------------
src/metadata/windows8_parser.js | 14 ++++---
2 files changed, 39 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4700a64a/spec/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/spec/metadata/windows8_parser.spec.js b/spec/metadata/windows8_parser.spec.js
index 1187ac6..a9c77d7 100644
--- a/spec/metadata/windows8_parser.spec.js
+++ b/spec/metadata/windows8_parser.spec.js
@@ -44,14 +44,14 @@ describe('windows8 project parser', function() {
cfg_parser = spyOn(util, 'config_parser');
});
- function wrapper(p, done, post) {
- p.then(post, function(err) {
+ function wrapper(promise, done, post) {
+ promise.then(post, function(err) {
expect(err).toBeUndefined();
}).fin(done);
}
- function errorWrapper(p, done, post) {
- p.then(function() {
+ function errorWrapper(promise, done, post) {
+ promise.then(function() {
expect('this call').toBe('fail');
}, post).fin(done);
}
@@ -65,9 +65,9 @@ describe('windows8 project parser', function() {
});
it('should create an instance with path, manifest properties', function() {
expect(function() {
- var p = new platforms.windows8.parser(proj);
- expect(p.windows8_proj_dir).toEqual(proj);
- expect(p.manifest_path).toEqual(path.join(proj, 'package.appxmanifest'));
+ var parser = new platforms.windows8.parser(proj);
+ expect(parser.windows8_proj_dir).toEqual(proj);
+ expect(parser.manifest_path).toEqual(path.join(proj, 'package.appxmanifest'));
}).not.toThrow();
});
});
@@ -100,10 +100,10 @@ describe('windows8 project parser', function() {
});
describe('instance', function() {
- var p, cp, rm, is_cordova, write, read, mv, mkdir;
+ var parser, cp, rm, is_cordova, write, read, mv, mkdir;
var windows8_proj = path.join(proj, 'platforms', 'windows8');
beforeEach(function() {
- p = new platforms.windows8.parser(windows8_proj);
+ parser = new platforms.windows8.parser(windows8_proj);
cp = spyOn(shell, 'cp');
rm = spyOn(shell, 'rm');
mv = spyOn(shell, 'mv');
@@ -130,7 +130,7 @@ describe('windows8 project parser', function() {
};
root_obj = {
attrib:{
- package:'android_pkg'
+ package:'windows8_pkg'
}
};
find = jasmine.createSpy('ElementTree find').andReturn(find_obj);
@@ -154,7 +154,7 @@ describe('windows8 project parser', function() {
cfg_pref_rm = jasmine.createSpy('config_parser pref rm');
cfg_pref_add = jasmine.createSpy('config_parser pref add');
cfg_content = jasmine.createSpy('config_parser content');
- p.config = {
+ parser.config = {
access:{
remove:cfg_access_rm,
get:function(){},
@@ -171,44 +171,40 @@ describe('windows8 project parser', function() {
});
it('should write out the app name to package.appxmanifest', function() {
- //following line outputs json
- p.update_from_config(cfg);
- expect(find_obj.attrib.Id).toEqual('testname');
+ parser.update_from_config(cfg);
+ expect(find_obj.attrib.Name).toEqual(cfg.packageName());
+ expect(find_obj.attrib.DisplayName).toEqual(cfg.name());
});
- // This test removed (jm) does not seem to be valid in winjs land.
- // it('should write out the app id to jsproj file', function() {
- // p.update_from_config(cfg);
- // expect(find_obj.text).toContain('testpkg');
- // });
-
it('should write out the app version to package.appxmanifest', function() {
- p.update_from_config(cfg);
+ parser.update_from_config(cfg);
expect(find_obj.attrib.Version).toEqual('one point oh');
});
- it('should update the content element (start page)', function() {
- p.update_from_config(cfg);
+
+ it('should update the content element (start page)', function() {
+ parser.update_from_config(cfg);
expect(cfg_content).toHaveBeenCalledWith('index.html');
});
});
+
describe('www_dir method', function() {
it('should return www', function() {
- expect(p.www_dir()).toEqual(path.join(windows8_proj, 'www'));
+ expect(parser.www_dir()).toEqual(path.join(windows8_proj, 'www'));
});
});
describe('staging_dir method', function() {
it('should return .staging/www', function() {
- expect(p.staging_dir()).toEqual(path.join(windows8_proj, '.staging', 'www'));
+ expect(parser.staging_dir()).toEqual(path.join(windows8_proj, '.staging', 'www'));
});
});
describe('update_www method', function() {
var update_jsproj;
beforeEach(function() {
- update_jsproj = spyOn(p, 'update_jsproj');
+ update_jsproj = spyOn(parser, 'update_jsproj');
});
it('should rm project-level www and cp in platform agnostic www', function() {
- p.update_www(path.join('lib','dir'));
+ parser.update_www(path.join('lib','dir'));
expect(rm).toHaveBeenCalled();
expect(cp).toHaveBeenCalled();
});
@@ -216,38 +212,38 @@ describe('windows8 project parser', function() {
describe('update_staging method', function() {
it('should do nothing if staging dir does not exist', function() {
exists.andReturn(false);
- p.update_staging();
+ parser.update_staging();
expect(cp).not.toHaveBeenCalled();
});
it('should copy the staging dir into www if staging dir exists', function() {
- p.update_staging();
+ parser.update_staging();
expect(cp).toHaveBeenCalled();
});
});
describe('update_project method', function() {
var config, www, overrides, staging, svn;
beforeEach(function() {
- config = spyOn(p, 'update_from_config');
- staging = spyOn(p, 'update_staging');
+ config = spyOn(parser, 'update_from_config');
+ staging = spyOn(parser, 'update_staging');
svn = spyOn(util, 'deleteSvnFolders');
});
it('should call update_from_config', function() {
- p.update_project();
+ parser.update_project();
expect(config).toHaveBeenCalled();
});
it('should throw if update_from_config throws', function(done) {
var err = new Error('uh oh!');
config.andCallFake(function() { throw err; });
- errorWrapper(p.update_project({}), done, function(err) {
+ errorWrapper(parser.update_project({}), done, function(err) {
expect(err).toEqual(err);
});
});
it('should call update_staging', function() {
- p.update_project();
+ parser.update_project();
expect(staging).toHaveBeenCalled();
});
it('should call deleteSvnFolders', function() {
- p.update_project();
+ parser.update_project();
expect(svn).toHaveBeenCalled();
});
});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4700a64a/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/windows8_parser.js b/src/metadata/windows8_parser.js
index bc41d34..f8e0776 100644
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@ -131,7 +131,7 @@ module.exports.prototype = {
// Update properties
var properties = manifest.find('.//Properties');
- if (properties) {
+ if (properties && properties.find) {
var displayNameElement = properties.find('.//DisplayName');
if (displayNameElement && displayNameElement.text != name) {
displayNameElement.text = name;
@@ -146,7 +146,7 @@ module.exports.prototype = {
// sort Capability elements as per CB-5350 Windows8 build fails due to invalid 'Capabilities' definition
// to sort elements we remove them and then add again in the appropriate order
var capabilitiesRoot = manifest.find('.//Capabilities'),
- capabilities = capabilitiesRoot._children;
+ capabilities = capabilitiesRoot._children || [];
capabilities.forEach(function(elem){
capabilitiesRoot.remove(0, elem);
@@ -288,7 +288,7 @@ module.exports.prototype = {
}
// overrides (merges) are handled in update_www()
this.update_staging();
- this.add_bom();
+ //this.add_bom();
util.deleteSvnFolders(this.www_dir());
return Q();
@@ -296,9 +296,11 @@ module.exports.prototype = {
// Adjust version number as per CB-5337 Windows8 build fails due to invalid app version
fixConfigVersion: function (version) {
- var numVersionComponents = version.match(/\./g).length + 1;
- while (numVersionComponents++ < 4) {
- version += '.0';
+ if(version && version.match(/\.d/g)) {
+ var numVersionComponents = version.match(/\.d/g).length + 1;
+ while (numVersionComponents++ < 4) {
+ version += '.0';
+ }
}
return version;
},
[06/10] git commit: fix merge conflicts
Posted by pu...@apache.org.
fix merge conflicts
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/4e7def91
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/4e7def91
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/4e7def91
Branch: refs/heads/master
Commit: 4e7def9181e891516af19ecd3d412fca1be03cba
Parents: 5977d74 372e598
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Nov 26 13:47:55 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Nov 26 13:47:55 2013 -0800
----------------------------------------------------------------------
platforms.js | 12 ++++++++----
spec/metadata/windows8_parser.spec.js | 5 -----
spec/platform.spec.js | 4 ++--
src/lazy_load.js | 15 ++++++++++-----
src/metadata/windows8_parser.js | 5 +----
src/metadata/wp7_parser.js | 2 +-
src/metadata/wp8_parser.js | 2 +-
src/platform.js | 8 --------
8 files changed, 23 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4e7def91/platforms.js
----------------------------------------------------------------------
diff --cc platforms.js
index 5afb91a,1e439c0..370d056
--- a/platforms.js
+++ b/platforms.js
@@@ -31,17 -31,20 +31,20 @@@ module.exports =
'wp7' : {
parser : './src/metadata/wp7_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.2.0'
- version: '3.2.0-rc1',
++ version: '3.2.0',
+ subdirectory: 'wp7'
},
'wp8' : {
parser : './src/metadata/wp8_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.2.0'
- version: '3.2.0-rc1',
++ version: '3.2.0',
+ subdirectory: 'wp8'
},
'blackberry10' : {
parser : './src/metadata/blackberry10_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
- version: '3.2.0'
- version: '3.2.0-rc1',
++ version: '3.2.0',
+ subdirectory: 'blackberry10'
},
'www':{
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
@@@ -55,7 -58,8 +58,8 @@@
'windows8':{
parser: './src/metadata/windows8_parser',
url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git',
- version: '3.2.0'
- version: '3.2.0-rc1',
++ version: '3.2.0',
+ subdirectory: 'windows8'
}
};
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4e7def91/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --cc src/metadata/windows8_parser.js
index bcbee53,968ba1c..bc41d34
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@@ -287,42 -249,8 +287,39 @@@ module.exports.prototype =
return Q.reject(e);
}
// overrides (merges) are handled in update_www()
- // CB-5340 Windows8 build does no write cordova_plugins.js
- //var libDir = path.join(util.libDirectory, 'windows8', 'cordova', require('../../platforms').windows8.version);
- //this.update_www(libDir);
this.update_staging();
+ this.add_bom();
+
util.deleteSvnFolders(this.www_dir());
return Q();
- }
+ },
+
+ // Adjust version number as per CB-5337 Windows8 build fails due to invalid app version
+ fixConfigVersion: function (version) {
+ var numVersionComponents = version.match(/\./g).length + 1;
+ while (numVersionComponents++ < 4) {
+ version += '.0';
+ }
+ return version;
+ },
+
+ // CB-5421 Add BOM to all html, js, css files to ensure app can pass Windows Store Certification
+ add_bom: function () {
+ var www = this.www_dir();
+ var files = shell.ls('-R', www);
+
+ files.forEach(function (file) {
+ if (!file.match(/\.(js|html|css|json)/)) {
+ return;
+ }
+
+ var filePath = path.join(www, file);
+ var content = fs.readFileSync(filePath);
+
+ if (content[0] !== 0xEF && content[1] !== 0xBE && content[2] !== 0xBB) {
+ fs.writeFileSync(filePath, '\ufeff' + content);
+ }
+ });
+ }
+
};
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4e7def91/src/metadata/wp7_parser.js
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/4e7def91/src/metadata/wp8_parser.js
----------------------------------------------------------------------
[09/10] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/cordova-cli
Posted by pu...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-cli
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/9c11350e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/9c11350e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/9c11350e
Branch: refs/heads/master
Commit: 9c11350e6f34af24f3d3eb2d2d8f5c4708741d1c
Parents: 4700a64 700c9d6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Nov 27 11:53:26 2013 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Nov 27 11:53:26 2013 -0800
----------------------------------------------------------------------
e2e/create.spec.js | 115 ++
e2e/fixtures/base/.cordova/config.json | 22 +
e2e/fixtures/base/merges/.svn | 0
e2e/fixtures/base/platforms/.svn | 0
e2e/fixtures/base/plugins/.svn | 0
e2e/fixtures/base/www/config.xml | 14 +
e2e/fixtures/base/www/css/index.css | 115 ++
e2e/fixtures/base/www/img/logo.png | Bin 0 -> 21814 bytes
e2e/fixtures/base/www/index.html | 43 +
e2e/fixtures/base/www/js/index.js | 49 +
e2e/fixtures/base/www/spec.html | 68 +
.../android-lib/framework/assets/www/cordova.js | 1 +
.../platforms/android/AndroidManifest.xml | 14 +
.../platforms/android/assets/www/config.xml | 14 +
.../platforms/android/assets/www/cordova.js | 1712 ++++++++++++++++++
.../android/assets/www/cordova_plugins.js | 3 +
.../platforms/android/assets/www/css/index.css | 115 ++
.../platforms/android/assets/www/img/logo.png | Bin 0 -> 21814 bytes
.../platforms/android/assets/www/index.html | 43 +
.../platforms/android/assets/www/js/index.js | 49 +
.../platforms/android/assets/www/spec.html | 68 +
e2e/fixtures/platforms/android/build.xml | 92 +
e2e/fixtures/platforms/android/cordova/build | 35 +
.../platforms/android/cordova/check_reqs | 27 +
e2e/fixtures/platforms/android/cordova/clean | 34 +
.../platforms/android/cordova/defaults.xml | 50 +
.../platforms/android/cordova/lib/appinfo.js | 41 +
.../platforms/android/cordova/lib/build.js | 89 +
.../platforms/android/cordova/lib/check_reqs.js | 78 +
.../platforms/android/cordova/lib/clean.js | 43 +
.../platforms/android/cordova/lib/device.js | 95 +
.../platforms/android/cordova/lib/emulator.js | 337 ++++
.../android/cordova/lib/install-device | 38 +
.../android/cordova/lib/install-emulator | 38 +
.../platforms/android/cordova/lib/list-devices | 28 +
.../android/cordova/lib/list-emulator-images | 29 +
.../android/cordova/lib/list-started-emulators | 29 +
.../platforms/android/cordova/lib/log.js | 43 +
.../platforms/android/cordova/lib/run.js | 123 ++
.../android/cordova/lib/start-emulator | 38 +
e2e/fixtures/platforms/android/cordova/log | 33 +
e2e/fixtures/platforms/android/cordova/run | 35 +
e2e/fixtures/platforms/android/cordova/version | 25 +
e2e/fixtures/platforms/android/local.properties | 10 +
.../platforms/android/proguard-project.txt | 20 +
.../platforms/android/project.properties | 14 +
.../android/res/drawable-hdpi/icon.png | Bin 0 -> 6080 bytes
.../android/res/drawable-ldpi/icon.png | Bin 0 -> 3096 bytes
.../android/res/drawable-mdpi/icon.png | Bin 0 -> 4090 bytes
.../android/res/drawable-xhdpi/icon.png | Bin 0 -> 7685 bytes
.../platforms/android/res/drawable/icon.png | Bin 0 -> 7685 bytes
.../platforms/android/res/values/strings.xml | 4 +
.../platforms/android/res/xml/config.xml | 18 +
.../android/src/org/testing/TestBase.java | 37 +
e2e/fixtures/plugins/fake1/plugin.xml | 10 +
e2e/helpers.js | 43 +
e2e/platform.spec.js | 117 ++
e2e/plugin.spec.js | 67 +
package.json | 2 +-
59 files changed, 4166 insertions(+), 1 deletion(-)
----------------------------------------------------------------------