cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [11/16] git commit: config-changes.js: Rename add/remove_plugin_changes.
Date Wed, 19 Feb 2014 20:32:57 GMT
config-changes.js: Rename add/remove_plugin_changes.

Renamed back to add_plugin_changes / remove_plugin_changes
kept them with different names during refactoring to avoid collision
with the old funcs.


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

Branch: refs/heads/master
Commit: 5fbf5584dff7d524628363b4e4f6c62b950bb000
Parents: 04b0e07
Author: Mark Koudritsky <kamrik@chromium.org>
Authored: Thu Feb 13 16:09:18 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Feb 19 15:32:26 2014 -0500

----------------------------------------------------------------------
 src/util/config-changes.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/5fbf5584/src/util/config-changes.js
----------------------------------------------------------------------
diff --git a/src/util/config-changes.js b/src/util/config-changes.js
index 36687ca..cc96b57 100644
--- a/src/util/config-changes.js
+++ b/src/util/config-changes.js
@@ -65,14 +65,14 @@ Adapters to keep the current refactoring effort to within this file
 ******************************************************************************/
 package.add_plugin_changes = function(platform, project_dir, plugins_dir, plugin_id, plugin_vars,
is_top_level, should_increment, cache) {
     var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.apply_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment, cache);
+    munger.add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment, cache);
     munger.config_keeper.save_all();
 };
 
 package.remove_plugin_changes = function(platform, project_dir, plugins_dir, plugin_name,
plugin_id, is_top_level, should_decrement) {
     // TODO: should_decrement paramenter is never used, remove it here and wherever called
     var munger = new PlatformMunger(platform, project_dir, plugins_dir);
-    munger.unmerge_plugin_changes(plugin_name, plugin_id, is_top_level);
+    munger.remove_plugin_changes(plugin_name, plugin_id, is_top_level);
     munger.config_keeper.save_all();
 };
 
@@ -159,8 +159,8 @@ function PlatformMunger_apply_file_munge(file, munge, remove) {
 }
 
 
-PlatformMunger.prototype.unmerge_plugin_changes = unmerge_plugin_changes;
-function unmerge_plugin_changes(plugin_name, plugin_id, is_top_level) {
+PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes;
+function remove_plugin_changes(plugin_name, plugin_id, is_top_level) {
     var self = this;
     var platform_config = module.exports.get_platform_json(self.plugins_dir, self.platform);
     var plugin_dir = path.join(self.plugins_dir, plugin_name);
@@ -197,8 +197,8 @@ function unmerge_plugin_changes(plugin_name, plugin_id, is_top_level)
{
 }
 
 
-PlatformMunger.prototype.apply_plugin_changes = apply_plugin_changes;
-function apply_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment) {
+PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
+function add_plugin_changes(plugin_id, plugin_vars, is_top_level, should_increment) {
     var self = this;
     var platform_config = module.exports.get_platform_json(self.plugins_dir, self.platform);
     var plugin_dir = path.join(self.plugins_dir, plugin_id);
@@ -330,12 +330,12 @@ function PlatformMunger_process() {
 
     // Uninstallation first
     platform_config.prepare_queue.uninstalled.forEach(function(u) {
-        self.unmerge_plugin_changes(u.plugin, u.id, u.topLevel);
+        self.remove_plugin_changes(u.plugin, u.id, u.topLevel);
     });
 
     // Now handle installation
     platform_config.prepare_queue.installed.forEach(function(u) {
-        self.apply_plugin_changes(u.plugin, u.vars, u.topLevel, true);
+        self.add_plugin_changes(u.plugin, u.vars, u.topLevel, true);
     });
 
     platform_config = module.exports.get_platform_json(self.plugins_dir, self.platform);


Mime
View raw message