You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by js...@apache.org on 2014/06/27 22:49:01 UTC
[1/2] git commit: CB-7045 plugman.install.spec: shell.which depends
on plugman.raw.fetch actually being called
Repository: cordova-lib
Updated Branches:
refs/heads/master 306d4e5d8 -> 56276ef3e
CB-7045 plugman.install.spec: shell.which depends on plugman.raw.fetch actually being called
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/864a2feb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/864a2feb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/864a2feb
Branch: refs/heads/master
Commit: 864a2feb2bf806eb4dd35c94dc956ac67fe57922
Parents: 306d4e5
Author: Josh Soref <js...@blackberry.com>
Authored: Fri Jun 27 16:39:36 2014 -0400
Committer: Josh Soref <js...@blackberry.com>
Committed: Fri Jun 27 16:47:28 2014 -0400
----------------------------------------------------------------------
cordova-lib/spec-plugman/install.spec.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/864a2feb/cordova-lib/spec-plugman/install.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/install.spec.js b/cordova-lib/spec-plugman/install.spec.js
index 8266d20..74e7e0d 100644
--- a/cordova-lib/spec-plugman/install.spec.js
+++ b/cordova-lib/spec-plugman/install.spec.js
@@ -428,7 +428,7 @@ describe('install', function() {
});
- xdescribe('failure', function() {
+ describe('failure', function() {
it('should throw if platform is unrecognized', function() {
runs(function() {
installPromise( install('atari', project, 'SomePlugin') );
@@ -449,6 +449,7 @@ describe('install', function() {
});
it('should throw if git is not found on the path and a remote url is requested', function() {
spyOn(fs, 'existsSync').andCallFake( fake['existsSync']['noPlugins'] );
+ fetchSpy.andCallThrough();
var which_spy = spyOn(shell, 'which').andReturn(null);
runs(function() {
installPromise( install('android', project, 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git') );
[2/2] git commit: CB-7045 plugman.install: engine.currentVersion
should be a semver or null
Posted by js...@apache.org.
CB-7045 plugman.install: engine.currentVersion should be a semver or null
not ""
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/56276ef3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/56276ef3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/56276ef3
Branch: refs/heads/master
Commit: 56276ef3e4d407bdd9c1212f5d75b267ede0530d
Parents: 864a2fe
Author: Josh Soref <js...@blackberry.com>
Authored: Fri Jun 27 16:39:55 2014 -0400
Committer: Josh Soref <js...@blackberry.com>
Committed: Fri Jun 27 16:47:30 2014 -0400
----------------------------------------------------------------------
cordova-lib/spec-plugman/install.spec.js | 6 +++---
cordova-lib/src/plugman/install.js | 4 ++++
2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/56276ef3/cordova-lib/spec-plugman/install.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/install.spec.js b/cordova-lib/spec-plugman/install.spec.js
index 74e7e0d..ed9b828 100644
--- a/cordova-lib/spec-plugman/install.spec.js
+++ b/cordova-lib/spec-plugman/install.spec.js
@@ -286,10 +286,10 @@ describe('install', function() {
var plugmanVersion = require('../package.json').version;
expect(spy.calls.length).toBe(4);
- expect(spy.calls[0].args).toEqual([ '', '>=2.3.0' ]);
+ expect(spy.calls[0].args).toEqual([ null, '>=2.3.0' ]);
expect(spy.calls[1].args).toEqual([ plugmanVersion, '>=0.10.0' ]);
- expect(spy.calls[2].args).toEqual([ '', '>=1.0.0' ]);
- expect(spy.calls[3].args).toEqual([ '', '>=3.0.0' ]);
+ expect(spy.calls[2].args).toEqual([ null, '>=1.0.0' ]);
+ expect(spy.calls[3].args).toEqual([ null, '>=3.0.0' ]);
});
});
it('should not check custom engine version that is not supported for platform', function() {
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/56276ef3/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index e17f941..ed86855 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -177,6 +177,10 @@ function callEngineScripts(engines) {
engine.currentVersion = null;
} else {
engine.currentVersion = cleanVersionOutput(stdout, engine.name);
+ if (engine.currentVersion === "") {
+ events.emit('warn', engine.name +' version check returned nothing ('+ scriptPath +'), continuing anyways.');
+ engine.currentVersion = null;
+ }
}
d.resolve(engine);