You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/06/19 03:45:06 UTC

[1/4] git commit: Delete notification bubble

Repository: cordova-app-harness
Updated Branches:
  refs/heads/master c8fdd7ca1 -> 48ac896cc


Delete notification bubble


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/48ac896c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/48ac896c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/48ac896c

Branch: refs/heads/master
Commit: 48ac896cc37c9a4055a24f2288b04ab7e5012251
Parents: 56f2bb7
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Jun 18 21:40:22 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Jun 18 21:44:56 2014 -0400

----------------------------------------------------------------------
 www/cdvah/css/style.css       | 27 -----------------
 www/cdvah/harnessmenu.html    |  4 ---
 www/cdvah/js/AppsService.js   |  2 +-
 www/cdvah/js/HarnessServer.js |  4 +--
 www/cdvah/js/ListCtrl.js      |  8 ++---
 www/cdvah/js/Notify.js        | 60 --------------------------------------
 6 files changed, 7 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/css/style.css
----------------------------------------------------------------------
diff --git a/www/cdvah/css/style.css b/www/cdvah/css/style.css
index a52ee24..71a954a 100644
--- a/www/cdvah/css/style.css
+++ b/www/cdvah/css/style.css
@@ -29,33 +29,6 @@
     margin: 15px;
 }
 
-.notification-container {
-    margin: 0;
-    padding: 0;
-
-    position: fixed;
-    bottom: 20px;
-    left: 0px;
-    right: 0px;
-    z-index: 3;
-}
-
-.notification {
-    border: 1px solid black;
-    border-radius: 10px;
-
-    margin: 0 20px;
-    padding: 10px 20px;
-}
-
-.notification-success {
-    background-color: #dff0d8;
-}
-
-.notification-error {
-    background-color: #f2dede;
-}
-
 .in-app-menu-container button {
     margin: 20px;
     text-align: center;

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/harnessmenu.html
----------------------------------------------------------------------
diff --git a/www/cdvah/harnessmenu.html b/www/cdvah/harnessmenu.html
index d449a38..21e0505 100644
--- a/www/cdvah/harnessmenu.html
+++ b/www/cdvah/harnessmenu.html
@@ -37,7 +37,6 @@
         <script type="text/javascript" src="js/ListCtrl.js"></script>
         <script type="text/javascript" src="js/DetailsCtrl.js"></script>
         <script type="text/javascript" src="js/InAppMenuCtrl.js"></script>
-        <script type="text/javascript" src="js/Notify.js"></script>
         <script type="text/javascript" src="js/HttpServer.js"></script>
         <script type="text/javascript" src="js/HarnessServer.js"></script>
         <link rel="stylesheet" type="text/css" href="css/topcoat-mobile-light.min.css" />
@@ -49,9 +48,6 @@
                 <h1 class="topcoat-navigation-bar__title">{{ appTitle }} v{{ appVersion }}</h1>
             </div>
         </div>
-
-        <cdvah-notify></cdvah-notify>
-
         <div ng-view></div>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/js/AppsService.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/AppsService.js b/www/cdvah/js/AppsService.js
index d6bd8c3..27218b4 100644
--- a/www/cdvah/js/AppsService.js
+++ b/www/cdvah/js/AppsService.js
@@ -19,7 +19,7 @@
 (function() {
     'use strict';
     /* global myApp */
-    myApp.factory('AppsService', ['$q', '$location', 'ResourcesLoader', 'INSTALL_DIRECTORY', 'APPS_JSON', 'notifier', 'AppHarnessUI', function($q, $location, ResourcesLoader, INSTALL_DIRECTORY, APPS_JSON, notifier, AppHarnessUI) {
+    myApp.factory('AppsService', ['$q', '$location', 'ResourcesLoader', 'INSTALL_DIRECTORY', 'APPS_JSON', 'AppHarnessUI', function($q, $location, ResourcesLoader, INSTALL_DIRECTORY, APPS_JSON, AppHarnessUI) {
         // Map of type -> installer.
         var _installerFactories = Object.create(null);
         // Array of installer objects.

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/js/HarnessServer.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/HarnessServer.js b/www/cdvah/js/HarnessServer.js
index bfe7240..1c41e16 100644
--- a/www/cdvah/js/HarnessServer.js
+++ b/www/cdvah/js/HarnessServer.js
@@ -63,7 +63,7 @@
 //   - Removed support for custom dstPath within zipassetmanifest.json
 //   - Sped up zippush by doing a directory move rather than per-file moves.
 //   - Added ?movetype=file to zippush command for old per-file behaviour.
-    myApp.factory('HarnessServer', ['$q', 'HttpServer', 'ResourcesLoader', 'AppHarnessUI', 'AppsService', 'notifier', 'APP_VERSION', function($q, HttpServer, ResourcesLoader, AppHarnessUI, AppsService, notifier, APP_VERSION) {
+    myApp.factory('HarnessServer', ['$q', 'HttpServer', 'ResourcesLoader', 'AppHarnessUI', 'AppsService', 'APP_VERSION', function($q, HttpServer, ResourcesLoader, AppHarnessUI, AppsService, APP_VERSION) {
 
         var PROTOCOL_VER = 3;
         var server = null;
@@ -242,7 +242,7 @@
                     app.updatingStatus = null;
                     app.lastUpdated = new Date();
                     AppsService.triggerAppListChange();
-                    notifier.success('Update complete.');
+                    console.log('Update complete.');
                 }
             }
             return resp.sendJsonResponse(200, {

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/js/ListCtrl.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/ListCtrl.js b/www/cdvah/js/ListCtrl.js
index 14f616d..b831a69 100644
--- a/www/cdvah/js/ListCtrl.js
+++ b/www/cdvah/js/ListCtrl.js
@@ -19,7 +19,7 @@
 (function(){
     'use strict';
     /* global myApp */
-    myApp.controller('ListCtrl', ['$location', 'notifier', '$scope', '$routeParams', '$q', 'AppsService', 'HarnessServer', function ($location, notifier, $scope, $routeParams, $q, AppsService, HarnessServer) {
+    myApp.controller('ListCtrl', ['$location', '$scope', '$routeParams', '$q', 'AppsService', 'HarnessServer', function ($location, $scope, $routeParams, $q, AppsService, HarnessServer) {
         $scope.appList = [];
 
         function initialise() {
@@ -59,7 +59,7 @@
                 });
                 $scope.appList = newAppsList;
             }, function(error){
-                notifier.error(error);
+                console.error(error);
             });
         }
 
@@ -67,7 +67,7 @@
             event.stopPropagation();
             return AppsService.launchApp(app)
             .then(null, function(error){
-                notifier.error(error);
+                console.error(error);
             });
         };
 
@@ -77,7 +77,7 @@
             if(shouldUninstall) {
                 return AppsService.uninstallApp(app)
                 .then(null, function(error) {
-                    notifier.error(error);
+                    console.error(error);
                 });
             }
         };

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/48ac896c/www/cdvah/js/Notify.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/Notify.js b/www/cdvah/js/Notify.js
deleted file mode 100644
index 5751dba..0000000
--- a/www/cdvah/js/Notify.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-(function() {
-    'use strict';
-    /* global myApp */
-    myApp.directive('cdvahNotify', [ '$rootScope', function($rootScope) {
-        return {
-            scope: {},
-            restrict: 'E',
-            template: '<div class="notification-container" ng-click="showNotify=false" ng-show="showNotify"><div class="notification" ng-class="notification.css">{{ notification.message }}</div></div>',
-            replace: true,
-            link: function(scope) {
-                $rootScope.$watch('notification', function(newValue) {
-                    scope.showNotify = !!newValue;
-                    if (newValue) {
-                        scope.notification = {};
-                        scope.notification.message = newValue.message;
-                        scope.notification.css = 'notification-' + newValue.type;
-                    }
-                });
-            }
-        };
-    }]);
-
-    myApp.factory('notifier', ['$rootScope', function($rootScope) {
-        return {
-            success: function(msg) {
-                console.log(msg);
-                $rootScope.notification = { message: msg, type: 'success' };
-            },
-            error: function(msg) {
-                if (typeof(msg) == 'object') {
-                    msg = msg.message || msg;
-                }
-                if (msg && typeof msg != 'string') {
-                    msg = JSON.stringify(msg);
-                }
-                console.error(msg);
-                $rootScope.notification = { message: msg, type: 'error' };
-            }
-        };
-    }]);
-})();
-


[4/4] git commit: Fix zippush causing files to be base64 encoded (typo in prev commit)

Posted by ag...@apache.org.
Fix zippush causing files to be base64 encoded (typo in prev commit)


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/5047e0ea
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/5047e0ea
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/5047e0ea

Branch: refs/heads/master
Commit: 5047e0ead2fb048953c203e87f35981108b9e99d
Parents: c8fdd7c
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Jun 18 21:44:36 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Jun 18 21:44:56 2014 -0400

----------------------------------------------------------------------
 harness-push/node_modules/cordova-harness-client/pushsession.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/5047e0ea/harness-push/node_modules/cordova-harness-client/pushsession.js
----------------------------------------------------------------------
diff --git a/harness-push/node_modules/cordova-harness-client/pushsession.js b/harness-push/node_modules/cordova-harness-client/pushsession.js
index 1b0e9c0..d878198 100644
--- a/harness-push/node_modules/cordova-harness-client/pushsession.js
+++ b/harness-push/node_modules/cordova-harness-client/pushsession.js
@@ -174,7 +174,9 @@ function zipDir(dir, zip) {
                 var inner = zip.folder(f);
                 zipDir(path.join(dir, f), inner);
             } else {
-                zip.file(f, fs.readFileSync(fullPath, 'base64'), { binary: true, optimizedBinaryString: true });
+                // 'binary' actually means binary string.
+                // Using optimizedBinaryString speeds things up *a lot*.
+                zip.file(f, fs.readFileSync(fullPath, 'binary'), { binary: true, optimizedBinaryString: true });
             }
         }
     });


[2/4] git commit: Fix error on start-up from missing network-information plugin

Posted by ag...@apache.org.
Fix error on start-up from missing network-information plugin


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/7a1b5ed5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/7a1b5ed5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/7a1b5ed5

Branch: refs/heads/master
Commit: 7a1b5ed549a2a10e99780307757be69c3458ab52
Parents: 5047e0e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Jun 18 21:41:55 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Jun 18 21:44:56 2014 -0400

----------------------------------------------------------------------
 createproject.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/7a1b5ed5/createproject.sh
----------------------------------------------------------------------
diff --git a/createproject.sh b/createproject.sh
index d957997..9eabd5c 100755
--- a/createproject.sh
+++ b/createproject.sh
@@ -98,6 +98,7 @@ echo Installing plugins.
     org.apache.cordova.file \
     org.apache.cordova.file-transfer \
     org.apache.cordova.device \
+    org.apache.cordova.network-information \
     org.chromium.socket \
     org.chromium.zip \
     --searchpath="$PLUGIN_SEARCH_PATH"
@@ -118,7 +119,6 @@ if [[ "$2" = "--allplugins" ]]; then
     org.apache.cordova.inappbrowser \
     org.apache.cordova.media \
     org.apache.cordova.media-capture \
-    org.apache.cordova.network-information \
     org.apache.cordova.splashscreen \
     org.apache.cordova.statusbar \
     org.apache.cordova.vibration \


[3/4] git commit: Make .gitignore use root-relative paths

Posted by ag...@apache.org.
Make .gitignore use root-relative paths


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/56f2bb71
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/56f2bb71
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/56f2bb71

Branch: refs/heads/master
Commit: 56f2bb71c90468bac61cf92febe417f799b7db1e
Parents: 7a1b5ed
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Jun 18 21:43:34 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Jun 18 21:44:56 2014 -0400

----------------------------------------------------------------------
 .gitignore | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/56f2bb71/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 8516c5e..25a7781 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
 .DS_Store
-harness-push/node_modules/*
-!harness-push/node_modules/cordova-harness-client
-harness-push/node_modules/cordova-harness-client/node_modules
+/harness-push/node_modules/*
+!/harness-push/node_modules/cordova-harness-client
+/harness-push/node_modules/cordova-harness-client/node_modules