Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A38F1137A for ; Fri, 16 May 2014 22:39:27 +0000 (UTC) Received: (qmail 80659 invoked by uid 500); 16 May 2014 19:24:51 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 65135 invoked by uid 500); 16 May 2014 19:03:33 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 73341 invoked by uid 99); 16 May 2014 18:51:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 18:51:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B041592DFDF; Fri, 16 May 2014 18:45:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kamrik@apache.org To: commits@cordova.apache.org Message-Id: <7c9bc2b8e3d74676b57b3c03dfdd2c28@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Remove unused code from plugman/install.js Date: Fri, 16 May 2014 18:45:00 +0000 (UTC) Repository: cordova-lib Updated Branches: refs/heads/master f9e3ed1e5 -> 9daafe8c8 Remove unused code from plugman/install.js isPluginInstalled() function was defined twice with exactly the same body. "usused:vars" directive for jshint means it will warn about unused variables but not about unused function parameters. Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/9daafe8c Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/9daafe8c Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/9daafe8c Branch: refs/heads/master Commit: 9daafe8c8d5f6fde046be6916019e58b8ed60765 Parents: f9e3ed1 Author: Mark Koudritsky Authored: Fri May 16 14:41:05 2014 -0400 Committer: Mark Koudritsky Committed: Fri May 16 14:44:03 2014 -0400 ---------------------------------------------------------------------- cordova-lib/src/plugman/install.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/9daafe8c/cordova-lib/src/plugman/install.js ---------------------------------------------------------------------- diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js index 7d2d664..7020a5f 100644 --- a/cordova-lib/src/plugman/install.js +++ b/cordova-lib/src/plugman/install.js @@ -1,4 +1,4 @@ -/* jshint node:true, asi:true, laxcomma:true, sub:true, expr:true */ +/* jshint node:true, asi:true, laxcomma:true, sub:true, expr:true, unused:vars */ var path = require('path'), fs = require('fs'), @@ -137,7 +137,6 @@ function cleanVersionOutput(version, name){ // exec engine scripts in order to get the current engine version // Returns a promise for the array of engines. function callEngineScripts(engines) { - var engineScriptVersion; return Q.all( engines.map(function(engine){ @@ -241,7 +240,6 @@ var runInstall = module.exports.runInstall = function runInstall(actions, platfo var xml_path = path.join(plugin_dir, 'plugin.xml') , plugin_et = xml_helpers.parseElementtreeSync(xml_path) , filtered_variables = {}; - var name = plugin_et.findall('name').text; var plugin_id = plugin_et.getroot().attrib['id']; options = options || {}; @@ -622,19 +620,3 @@ function copyPlugin(plugin_src_dir, plugins_dir, link) { return dest; } - -function isPluginInstalled(plugins_dir, platform, plugin_id) { - var installed_plugin_id; - var platform_config = config_changes.get_platform_json(plugins_dir, platform); - for (installed_plugin_id in platform_config.installed_plugins) { - if (installed_plugin_id == plugin_id) { - return true; - } - } - for (installed_plugin_id in platform_config.dependent_plugins) { - if (installed_plugin_id == plugin_id) { - return true; - } - } - return false; -}