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 9147910BC6 for ; Mon, 15 Apr 2013 18:51:52 +0000 (UTC) Received: (qmail 85099 invoked by uid 500); 15 Apr 2013 18:51:50 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 85042 invoked by uid 500); 15 Apr 2013 18:51:50 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 84260 invoked by uid 99); 15 Apr 2013 18:51:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Apr 2013 18:51:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D87231B5F2; Mon, 15 Apr 2013 18:51:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: timkim@apache.org To: commits@cordova.apache.org Date: Mon, 15 Apr 2013 18:52:26 -0000 Message-Id: In-Reply-To: <9ce8167dc0c84a57a01fbbfad64cc72d@git.apache.org> References: <9ce8167dc0c84a57a01fbbfad64cc72d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [39/54] [abbrv] git commit: Deleted sql plugin and got some more tests passing Deleted sql plugin and got some more tests passing Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/90db4b1d Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/90db4b1d Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/90db4b1d Branch: refs/heads/future Commit: 90db4b1d11fbbe482408732ddb6d751227416be5 Parents: b256b9f Author: Tim Kim Authored: Fri Apr 5 11:40:38 2013 -0700 Committer: Tim Kim Committed: Tue Apr 9 14:03:13 2013 -0700 ---------------------------------------------------------------------- platforms/android.js | 2 ++ test/android-one-install.js | 22 ++++++++++++++++++---- test/plugins/PGSQLitePlugin | 1 - util/plugin_loader.js | 1 - 4 files changed, 20 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/platforms/android.js ---------------------------------------------------------------------- diff --git a/platforms/android.js b/platforms/android.js index f099284..303c5b6 100644 --- a/platforms/android.js +++ b/platforms/android.js @@ -93,8 +93,10 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var path.basename(sourceFile.attrib['src'])); if (action == 'install') { + shell.mkdir('-p', srcDir); var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']); + console.log('src file ' + srcFile); shell.cp(srcFile, destFile); } else { fs.unlinkSync(destFile); http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/test/android-one-install.js ---------------------------------------------------------------------- diff --git a/test/android-one-install.js b/test/android-one-install.js index bb8b2a6..8ec4da6 100644 --- a/test/android-one-install.js +++ b/test/android-one-install.js @@ -27,7 +27,7 @@ var fs = require('fs') , shell = require('shelljs') , et = require('elementtree') , android = require(path.join(__dirname, '..', 'platforms', 'android')) - + , plugin_loader = require('../util/plugin_loader') , test_dir = path.join(osenv.tmpdir(), 'test_plugman') , test_project_dir = path.join(test_dir, 'projects', 'android_one') , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser') @@ -70,8 +70,13 @@ exports['should install webless plugin'] = function (test) { } exports['should move the js file'] = function (test) { + var pluginsPath = path.join(test_dir, 'plugins'); + var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www'); var jsPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www', 'childbrowser.js'); + android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 }); + plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android'); + fs.stat(jsPath, function(err, stats) { test.ok(!err); test.ok(stats.isFile()); @@ -80,10 +85,13 @@ exports['should move the js file'] = function (test) { } exports['should move the directory'] = function (test) { + var pluginsPath = path.join(test_dir, 'plugins'); + var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www'); + android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 }); - + plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android'); + var assetPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www', 'childbrowser'); - var assets = fs.statSync(assetPath); test.ok(assets.isDirectory()); @@ -92,9 +100,15 @@ exports['should move the directory'] = function (test) { } exports['should move the src file'] = function (test) { + var pluginsPath = path.join(test_dir, 'plugins'); + var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www'); + android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 }); - + plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android'); + + var bahPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser'); var javaPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser', 'ChildBrowser.java'); + test.ok(fs.statSync(javaPath)); test.done(); } http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/test/plugins/PGSQLitePlugin ---------------------------------------------------------------------- diff --git a/test/plugins/PGSQLitePlugin b/test/plugins/PGSQLitePlugin deleted file mode 160000 index ac84255..0000000 --- a/test/plugins/PGSQLitePlugin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ac84255d517b3a8ea86caea1c06d4f836ab6f96d http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/util/plugin_loader.js ---------------------------------------------------------------------- diff --git a/util/plugin_loader.js b/util/plugin_loader.js index 5ea6f93..e16b863 100644 --- a/util/plugin_loader.js +++ b/util/plugin_loader.js @@ -45,7 +45,6 @@ exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) { // This array holds all the metadata for each module and ends up in cordova_plugins.json var moduleObjects = []; - //console.log('plugins_dir ' + fs.readdirSync(plugins_dir)); plugins && plugins.forEach(function(plugin) { var pluginDir = path.join(plugins_dir, plugin); if(fs.statSync(pluginDir).isDirectory()){