You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/09/23 00:15:56 UTC

[04/50] [abbrv] git commit: CB-7416 handleInstall tests for null platformTag. removed uncalled 'hasPlatformSection' from PluginInfo.js

CB-7416 handleInstall tests for null platformTag. removed uncalled 'hasPlatformSection' from PluginInfo.js


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

Branch: refs/heads/cb-7219
Commit: 241a786123e96e357869fb3d881554427308fe25
Parents: d406be5
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Aug 27 13:53:05 2014 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Fri Sep 5 11:12:19 2014 -0700

----------------------------------------------------------------------
 cordova-lib/src/PluginInfo.js      | 7 -------
 cordova-lib/src/plugman/install.js | 4 ++--
 2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/241a7861/cordova-lib/src/PluginInfo.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/PluginInfo.js b/cordova-lib/src/PluginInfo.js
index dcc1da5..1d2b24a 100644
--- a/cordova-lib/src/PluginInfo.js
+++ b/cordova-lib/src/PluginInfo.js
@@ -200,13 +200,6 @@ function PluginInfo(dirname) {
         var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, cloneAttribs);
         return libFiles;
     }
-
-    // Tell whether there is a <platform> section for the given platform.
-    self.hasPlatformSection = hasPlatformSection;
-    function hasPlatformSection(platform) {
-        var platformTag = pelem.find('./platform[@name="' + platform + '"]');
-        return !!platformTag;
-    }
     ///// End of PluginInfo methods /////
 
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/241a7861/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index 83834b4..045afb7 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -512,19 +512,19 @@ function handleInstall(actions, pluginInfo, platform, project_dir, plugins_dir,
     var handler = platform_modules[platform];
 
     var platformTag = pluginInfo._et.find('./platform[@name="'+platform+'"]');
+
     // CB-6976 Windows Universal Apps. For smooth transition and to prevent mass api failures
     // we allow using windows8 tag for new windows platform
     if (platform == 'windows' && !platformTag) {
         platformTag = pluginInfo._et.find('platform[@name="' + 'windows8' + '"]');
     }
-    if ( pluginInfo.hasPlatformSection(platform) ) {
+    if (platformTag) {
         var sourceFiles = platformTag.findall('./source-file'),
             headerFiles = platformTag.findall('./header-file'),
             resourceFiles = platformTag.findall('./resource-file'),
             frameworkFiles = platformTag.findall('./framework'),
             libFiles = platformTag.findall('./lib-file');
 
-
         // queue up native stuff
         sourceFiles && sourceFiles.forEach(function(item) {
             actions.push(actions.createAction(handler['source-file'].install,