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 2015/10/20 10:54:38 UTC
cordova-lib git commit: CB-9815 Engine name="cordova" should check
tools version, not platforms. This closes #324
Repository: cordova-lib
Updated Branches:
refs/heads/master 9d75a4257 -> acff72319
CB-9815 Engine name="cordova" should check tools version, not platforms. This closes #324
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/acff7231
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/acff7231
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/acff7231
Branch: refs/heads/master
Commit: acff7231934374f251333388f82467950fd577f4
Parents: 9d75a42
Author: sgrebnov <v-...@microsoft.com>
Authored: Fri Oct 16 17:51:07 2015 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Oct 20 11:53:38 2015 +0300
----------------------------------------------------------------------
cordova-lib/spec-plugman/install.spec.js | 10 ++++++----
cordova-lib/src/plugman/util/default-engines.js | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/acff7231/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 572ffde..50a81ad 100644
--- a/cordova-lib/spec-plugman/install.spec.js
+++ b/cordova-lib/spec-plugman/install.spec.js
@@ -255,7 +255,7 @@ describe('install', function() {
install('android', project, plugins['com.cordova.engine'])
.fail(fail)
.fin(function () {
- expect(satisfies).toHaveBeenCalledWith('2.5.0','>=2.3.0');
+ expect(satisfies).toHaveBeenCalledWith('2.5.0','>=1.0.0');
done();
});
});
@@ -264,7 +264,7 @@ describe('install', function() {
install('android', project, plugins['com.cordova.engine'])
.fail(fail)
.fin(function () {
- expect(satisfies).toHaveBeenCalledWith('3.0.0-rc1','>=2.3.0');
+ expect(satisfies).toHaveBeenCalledWith('3.0.0-rc1','>=1.0.0');
done();
});
});
@@ -278,13 +278,14 @@ describe('install', function() {
});
});
it('should check platform sdk version if specified', function(done) {
+ var cordovaVersion = require('../package.json').version.replace('-dev', '');
exec.andCallFake(function(cmd, cb) { cb(null, '18\n'); });
install('android', project, plugins['com.cordova.engine-android'])
.fail(fail)
.fin(function() {
expect(satisfies.calls.length).toBe(3);
// <engine name="cordova" VERSION=">=3.0.0"/>
- expect(satisfies.calls[0].args).toEqual([ '18.0.0', '>=3.0.0' ]);
+ expect(satisfies.calls[0].args).toEqual([ cordovaVersion, '>=3.0.0' ]);
// <engine name="cordova-android" VERSION=">=3.1.0"/>
expect(satisfies.calls[1].args).toEqual([ '18.0.0', '>=3.1.0' ]);
// <engine name="android-sdk" VERSION=">=18"/>
@@ -297,9 +298,10 @@ describe('install', function() {
.fail(fail)
.fin(function() {
var plugmanVersion = require('../package.json').version.replace('-dev', '');
+ var cordovaVersion = require('../package.json').version.replace('-dev', '');
expect(satisfies.calls.length).toBe(4);
// <engine name="cordova" version=">=2.3.0"/>
- expect(satisfies.calls[0].args).toEqual([ null, '>=2.3.0' ]);
+ expect(satisfies.calls[0].args).toEqual([ cordovaVersion, '>=2.3.0' ]);
// <engine name="cordova-plugman" version=">=0.10.0" />
expect(satisfies.calls[1].args).toEqual([ plugmanVersion, '>=0.10.0' ]);
// <engine name="mega-fun-plugin" version=">=1.0.0" scriptSrc="megaFunVersion" platform="*" />
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/acff7231/cordova-lib/src/plugman/util/default-engines.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/util/default-engines.js b/cordova-lib/src/plugman/util/default-engines.js
index 0382b6e..bd62b12 100644
--- a/cordova-lib/src/plugman/util/default-engines.js
+++ b/cordova-lib/src/plugman/util/default-engines.js
@@ -22,7 +22,7 @@ var path = require('path');
module.exports = function(project_dir){
return {
'cordova':
- { 'platform':'*', 'scriptSrc': path.join(project_dir,'cordova','version') },
+ { 'platform':'*', 'currentVersion': require('../../../package.json').version },
'cordova-plugman':
{ 'platform':'*', 'currentVersion': require('../../../package.json').version },
'cordova-android':
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org