cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [1/6] git commit: Making Serve and CRX downloading work more robustly.
Date Mon, 27 Jan 2014 16:04:16 GMT
Updated Branches:
  refs/heads/master aeff680d1 -> 5156ee43a


Making Serve and CRX downloading work more robustly.


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/9f0189a5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/9f0189a5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/9f0189a5

Branch: refs/heads/master
Commit: 9f0189a5141a102824ad80c74e160bd4f7952229
Parents: aeff680
Author: Braden Shepherdson <braden.shepherdson@gmail.com>
Authored: Tue Jan 21 09:59:45 2014 -0500
Committer: Braden Shepherdson <braden.shepherdson@gmail.com>
Committed: Tue Jan 21 09:59:45 2014 -0500

----------------------------------------------------------------------
 www/cdvah/js/AppsService.js    | 5 +++--
 www/cdvah/js/CrxInstaller.js   | 2 +-
 www/cdvah/js/ServeInstaller.js | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/9f0189a5/www/cdvah/js/AppsService.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/AppsService.js b/www/cdvah/js/AppsService.js
index 2fc5de8..c54164e 100644
--- a/www/cdvah/js/AppsService.js
+++ b/www/cdvah/js/AppsService.js
@@ -84,8 +84,9 @@
 
             addApp : function(installerType, appUrl) {
                 var installerFactory = _installerFactories[installerType];
-                return installerFactory.createFromUrl(appUrl)
-                .then(function(installer) {
+                return initHandlers().then(function() {
+                  return installerFactory.createFromUrl(appUrl);
+                }).then(function(installer) {
                     _installers.push(installer);
                     return writeAppsJson()
                     .then(function() {

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/9f0189a5/www/cdvah/js/CrxInstaller.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/CrxInstaller.js b/www/cdvah/js/CrxInstaller.js
index 6637b1e..f83a3cb 100644
--- a/www/cdvah/js/CrxInstaller.js
+++ b/www/cdvah/js/CrxInstaller.js
@@ -13,7 +13,7 @@
 
         CrxInstaller.prototype.type = 'crx';
 
-        CrxInstaller.prototype._doUpdateApp = function(installPath) {
+        CrxInstaller.prototype.doUpdateApp = function(installPath) {
             var platformConfig = location.pathname.replace(/\/[^\/]*$/, '/crx_files/config.'
+ platformId + '.xml');
             var targetConfig = installPath + '/config.xml';
             var xhr;

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/9f0189a5/www/cdvah/js/ServeInstaller.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/ServeInstaller.js b/www/cdvah/js/ServeInstaller.js
index 09c6e17..aafdb7b 100644
--- a/www/cdvah/js/ServeInstaller.js
+++ b/www/cdvah/js/ServeInstaller.js
@@ -105,7 +105,8 @@
                 var files = self._cachedProjectJson.wwwFileList;
                 files = files.filter(function(f) {
                     // Don't download cordova.js or plugins. We want to use the version bundled
with the harness.
-                    var isPlugin = /\/cordova(?:_plugins)?.js$|^\/plugins\//.exec(f.path);
+                    // Do download cordova_plugins.js, since we need that to compare plugins
with the harness.
+                    var isPlugin = /\/cordova\.js$|^\/plugins\//.exec(f.path);
                     var haveAlready = self._assetManifest[f.path] == f.etag;
                     return (!isPlugin && !haveAlready);
                 });


Mime
View raw message