You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/07/12 05:58:33 UTC

[1/5] git commit: [CB-4077] Fix tests for cordova-cli

Updated Branches:
  refs/heads/master 8cc97ef38 -> f204db813


[CB-4077] Fix tests for 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/cd18d4c5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/cd18d4c5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/cd18d4c5

Branch: refs/heads/master
Commit: cd18d4c56c7f92b7bd08174f0c94bc6a71cda9d7
Parents: 15fb308
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 8 14:08:58 2013 -0400
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 11 20:45:26 2013 -0700

----------------------------------------------------------------------
 spec/plugin.spec.js | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/cd18d4c5/spec/plugin.spec.js
----------------------------------------------------------------------
diff --git a/spec/plugin.spec.js b/spec/plugin.spec.js
index f340151..ddd9b59 100644
--- a/spec/plugin.spec.js
+++ b/spec/plugin.spec.js
@@ -33,7 +33,7 @@ var project_dir = path.join('some','path');
 var plugins_dir = path.join(project_dir, 'plugins');
 
 describe('plugin command', function() {
-    var is_cordova, list_platforms, fire, find_plugins, rm, mkdir, existsSync, exec, prep_spy, plugman_install, plugman_fetch, parsers = {}, uninstall;
+    var is_cordova, list_platforms, fire, find_plugins, rm, mkdir, existsSync, exec, prep_spy, plugman_install, plugman_fetch, parsers = {}, uninstallPlatform, uninstallPlugin;
     beforeEach(function() {
         is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
         fire = spyOn(hooker.prototype, 'fire').andCallFake(function(e, opts, cb) {
@@ -61,7 +61,10 @@ describe('plugin command', function() {
         });
         plugman_install = spyOn(plugman, 'install');
         plugman_fetch = spyOn(plugman, 'fetch').andCallFake(function(target, plugins_dir, opts, cb) { cb(false, path.join(plugins_dir, target)); });
-        uninstall = spyOn(plugman, 'uninstall');
+        uninstallPlatform = spyOn(plugman.uninstall, 'uninstallPlatform');
+        uninstallPlugin = spyOn(plugman.uninstall, 'uninstallPlugin').andCallFake(function(target, plugins_dir, cb) {
+            cb && cb();
+        });
     });
 
     describe('failure', function() {
@@ -141,14 +144,19 @@ describe('plugin command', function() {
                 }).toThrow('Plugin "somethingrandom" not added to project.');
             });
 
-            it('should call plugman.uninstall for every matching installedplugin-supportedplatform pair', function() {
+            it('should call plugman.uninstall.uninstallPlatform for every matching installedplugin-supportedplatform pair', function() {
                 cordova.plugin('rm', sample_plugins);
                 sample_plugins.forEach(function(plug) {
                     subset.forEach(function(plat) {
-                        expect(uninstall).toHaveBeenCalledWith(plat, path.join(project_dir, 'platforms', plat), plug, plugins_dir, jasmine.any(Object));
+                        expect(uninstallPlatform).toHaveBeenCalledWith(plat, path.join(project_dir, 'platforms', plat), plug, plugins_dir, jasmine.any(Object));
                     });
                 });
             });
+            it('should call plugman.uninstall.uninstallPlugin once for every removed plugin', function() {
+                uninstallPlugin.reset();
+                cordova.plugin('rm', sample_plugins);
+                expect(uninstallPlugin.callCount).toBe(2);
+            });
         });
     });
     describe('hooks', function() {


[3/5] git commit: [CB-4077] updating plugman version to 0.9.0.

Posted by fi...@apache.org.
[CB-4077] updating plugman version to 0.9.0.


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/6413daa0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/6413daa0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/6413daa0

Branch: refs/heads/master
Commit: 6413daa0ffe68cdc495b246847a0cb283614c0ec
Parents: cd18d4c
Author: Fil Maj <ma...@gmail.com>
Authored: Wed Jul 10 11:09:38 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 11 20:45:27 2013 -0700

----------------------------------------------------------------------
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6413daa0/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index d983196..c5cac32 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
   "dependencies": {
     "colors":">=0.6.0",
     "elementtree":"0.1.3",
-    "plugman":"0.8.2",
+    "plugman":"0.9.0",
     "plist":"0.4.x",
     "xcode":"0.5.1",
     "express":"3.0.0",


[2/5] git commit: [CB-4077] Separate the actions of removing a plugin from a platform and removing the plugin entirely

Posted by fi...@apache.org.
[CB-4077] Separate the actions of removing a plugin from a platform and removing the plugin entirely


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/15fb3085
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/15fb3085
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/15fb3085

Branch: refs/heads/master
Commit: 15fb30854bc21b5ca8e7d74c3266aac103ea010e
Parents: 8cc97ef
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Jul 5 10:49:51 2013 -0400
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 11 20:45:26 2013 -0700

----------------------------------------------------------------------
 src/plugin.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/15fb3085/src/plugin.js
----------------------------------------------------------------------
diff --git a/src/plugin.js b/src/plugin.js
index ca43e35..a280277 100644
--- a/src/plugin.js
+++ b/src/plugin.js
@@ -138,17 +138,17 @@ module.exports = function plugin(command, targets, callback) {
                                 else return true;
                             });
 
-                            // Iterate over all the common platforms between the plugin
-                            // and the app, and uninstall.
-                            // If this is a web-only plugin with no platform tags, this step
-                            // is not needed and we just --remove the plugin below.
-                            intersection.forEach(function(platform) {
+                            // Iterate over all installed platforms and uninstall.
+                            // If this is a web-only or dependency-only plugin, then
+                            // there may be nothing to do here except remove the
+                            // reference from the platform's plugin config JSON.
+                            platformList.forEach(function(platform) {
                                 var platformRoot = path.join(projectRoot, 'platforms', platform);
                                 var parser = new platforms[platform].parser(platformRoot);
                                 events.emit('log', 'Calling plugman.uninstall on plugin "' + target + '" for platform "' + platform + '"');
-                                plugman.uninstall((platform=='blackberry'?'blackberry10':platform), platformRoot, target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() });
+                                plugman.uninstall.uninstallPlatform((platform=='blackberry'?'blackberry10':platform), platformRoot, target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() });
                             });
-                            end();
+                            plugman.uninstall.uninstallPlugin(target, path.join(projectRoot, 'plugins'), end);
                         } else {
                             var err = new Error('Plugin "' + target + '" not added to project.');
                             if (callback) callback(err);


[4/5] git commit: updated plugman dep to 0.9.3

Posted by fi...@apache.org.
updated plugman dep to 0.9.3


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/069295ad
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/069295ad
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/069295ad

Branch: refs/heads/master
Commit: 069295adc22426a5a1a9067290cffdae4c3d722b
Parents: 6413daa
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jul 11 15:23:30 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 11 20:45:27 2013 -0700

----------------------------------------------------------------------
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/069295ad/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index c5cac32..5e19270 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
   "dependencies": {
     "colors":">=0.6.0",
     "elementtree":"0.1.3",
-    "plugman":"0.9.0",
+    "plugman":"0.9.3",
     "plist":"0.4.x",
     "xcode":"0.5.1",
     "express":"3.0.0",


[5/5] git commit: 2.9.4. Bumped request dep version from 2.12.x to 2.22.0.

Posted by fi...@apache.org.
2.9.4. Bumped request dep version from 2.12.x to 2.22.0.


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/f204db81
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/f204db81
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/f204db81

Branch: refs/heads/master
Commit: f204db813b36b16c53139273a200a7e1a8c9e7c7
Parents: 069295a
Author: Fil Maj <ma...@gmail.com>
Authored: Thu Jul 11 20:58:17 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu Jul 11 20:58:17 2013 -0700

----------------------------------------------------------------------
 package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f204db81/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 5e19270..f734c69 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "2.9.3",
+  "version": "2.9.4",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",
@@ -36,7 +36,7 @@
     "express":"3.0.0",
     "shelljs":"0.1.2",
     "ncallbacks":"1.0.0",
-    "request":"2.12.x",
+    "request":"2.22.0",
     "semver":"1.1.0",
     "glob":"3.2.x",
     "follow-redirects":"0.0.x",