cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kam...@apache.org
Subject cordova-lib git commit: CB-8499 Remove project_dir from (un)installers signature
Date Wed, 18 Mar 2015 20:41:57 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 3a788c1bd -> 0c941529c


CB-8499 Remove project_dir from (un)installers signature

Since they are now methods of the PlatformProject, project dir is already kept
there - no need to pass it in each time.

In preparation to merging the iOS platform specific code from
plugman/platforms and cordova/metadata.


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

Branch: refs/heads/master
Commit: 0c941529c332dbc59e5ce2ef2dd2a4f72062dd84
Parents: 3a788c1
Author: Mark Koudritsky <kamrik@gmail.com>
Authored: Wed Mar 18 16:37:44 2015 -0400
Committer: Mark Koudritsky <kamrik@gmail.com>
Committed: Wed Mar 18 16:37:44 2015 -0400

----------------------------------------------------------------------
 cordova-lib/spec-plugman/install-browserify.spec.js |  2 +-
 cordova-lib/spec-plugman/install.spec.js            |  2 +-
 cordova-lib/src/platforms/platforms.js              | 10 ++++++++--
 cordova-lib/src/plugman/install.js                  |  4 ++--
 cordova-lib/src/plugman/uninstall.js                |  4 ++--
 5 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0c941529/cordova-lib/spec-plugman/install-browserify.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/install-browserify.spec.js b/cordova-lib/spec-plugman/install-browserify.spec.js
index 616e357..0210cca 100644
--- a/cordova-lib/spec-plugman/install-browserify.spec.js
+++ b/cordova-lib/spec-plugman/install-browserify.spec.js
@@ -212,7 +212,7 @@ describe('install', function() {
         it('should queue up actions as appropriate for that plugin and call process on the
action stack',
            function() {
                 expect(results['actions_callCount']).toEqual(6);
-                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object),
path.join(plugins_install_dir, dummy_id), project, dummy_id, jasmine.any(Object)], jasmine.any(Function),
[jasmine.any(Object), project, dummy_id, jasmine.any(Object)]]);
+                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object),
path.join(plugins_install_dir, dummy_id), dummy_id, jasmine.any(Object)], jasmine.any(Function),
[jasmine.any(Object), dummy_id, jasmine.any(Object)]]);
         });
 
         it('should check version if plugin has engine tag', function(){

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0c941529/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 1a7cfa0..1266449 100644
--- a/cordova-lib/spec-plugman/install.spec.js
+++ b/cordova-lib/spec-plugman/install.spec.js
@@ -210,7 +210,7 @@ describe('install', function() {
         it('should queue up actions as appropriate for that plugin and call process on the
action stack',
            function() {
                 expect(results['actions_callCount']).toEqual(6);
-                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object),
path.join(plugins_install_dir, dummy_id), project, dummy_id, jasmine.any(Object)], jasmine.any(Function),
[jasmine.any(Object), project, dummy_id, jasmine.any(Object)]]);
+                expect(results['actions_create']).toEqual([jasmine.any(Function), [jasmine.any(Object),
path.join(plugins_install_dir, dummy_id), dummy_id, jasmine.any(Object)], jasmine.any(Function),
[jasmine.any(Object), dummy_id, jasmine.any(Object)]]);
         });
 
         it('should check version if plugin has engine tag', function(){

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0c941529/cordova-lib/src/platforms/platforms.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/platforms/platforms.js b/cordova-lib/src/platforms/platforms.js
index a384b17..95ed705 100644
--- a/cordova-lib/src/platforms/platforms.js
+++ b/cordova-lib/src/platforms/platforms.js
@@ -72,11 +72,17 @@ function PlatformProjectAdapter(platform, platformRootDir) {
     });
 
     self.getInstaller = function(type) {
-        return self.handler[type].install;
+        function installWrapper(item, plugin_dir, plugin_id, options, project) {
+            self.handler[type].install(item, plugin_dir, self.root, plugin_id, options, project);
+        }
+        return installWrapper;
     };
 
     self.getUninstaller = function(type) {
-        return self.handler[type].uninstall;
+        function uninstallWrapper(item, plugin_id, options, project) {
+            self.handler[type].uninstall(item, self.root, plugin_id, options, project);
+        }
+        return uninstallWrapper;
     };
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0c941529/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index 3e8ab60..8f66e64 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -534,9 +534,9 @@ function handleInstall(actions, pluginInfo, platform, project_dir, plugins_dir,
     // queue up native stuff
     pluginItems.forEach(function(item) {
         actions.push(actions.createAction(handler.getInstaller(item.itemType),
-                                          [item, plugin_dir, project_dir, pluginInfo.id,
options],
+                                          [item, plugin_dir, pluginInfo.id, options],
                                           handler.getUninstaller(item.itemType),
-                                          [item, project_dir, pluginInfo.id, options]));
+                                          [item, pluginInfo.id, options]));
     });
 
     // run through the action stack

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/0c941529/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
index 2a58ced..341a97b 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -306,9 +306,9 @@ function handleUninstall(actions, platform, pluginInfo, project_dir, www_dir,
pl
         // CB-5238 Don't uninstall non custom frameworks.
         if (item.itemType == 'framework' && !item.custom) return;
         actions.push(actions.createAction(handler.getUninstaller(item.itemType),
-                                          [item, project_dir, plugin_id, options],
+                                          [item, plugin_id, options],
                                           handler.getInstaller(item.itemType),
-                                          [item, plugin_dir, project_dir, plugin_id, options]));
+                                          [item, plugin_dir, plugin_id, options]));
     });
 
     // queue up asset uninstallation


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message