cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: Delete stale .cdvh code
Date Tue, 06 May 2014 18:46:17 GMT
Repository: cordova-app-harness
Updated Branches:
  refs/heads/master 161eb779f -> 886f865d5


Delete stale .cdvh code


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

Branch: refs/heads/master
Commit: 886f865d57d1d0a3c4454fcee3732a996e2a7589
Parents: 161eb77
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue May 6 14:45:50 2014 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue May 6 14:45:50 2014 -0400

----------------------------------------------------------------------
 packapp                            | 84 ---------------------------------
 www/cdvah/js/CdvhPackageHandler.js | 37 ---------------
 2 files changed, 121 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/886f865d/packapp
----------------------------------------------------------------------
diff --git a/packapp b/packapp
deleted file mode 100755
index 74dd08f..0000000
--- a/packapp
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-#       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.
-#
-# package a cordova project into a cdvh for app harness (zip file with a specific file and
folder layout)
-#
-# USAGE
-#   ./packapp project_directory [packageName.cdvh]
-
-USAGE_STRING="Usage: packapp [-p] project_directory [packageName.cdvh]\n\t-p Runs cordova
prepare before packaging the app"
-
-if [ $# -lt 1 ]
-then
-  echo -e $USAGE_STRING
-  exit -1
-fi
-
-RUN_PREPARE=
-
-while getopts ":hp" option; do
-  case $option in
-    h) echo -e $USAGE_STRING; exit ;;
-    p) RUN_PREPARE=1 ;;
-    ?) echo "error: option -$OPTARG is not implemented"; exit ;;
-  esac
-done
-
-# remove the options from the positional parameters
-shift $(( OPTIND - 1 ))
-
-ORIG_DIR=$(pwd)
-
-# switch to project directory
-cd $1
-
-if [ ! -z "$RUN_PREPARE" ]
-then
-    echo "Running Prepare"
-    cordova prepare
-fi
-
-FILE_NAME=$(basename "`pwd`" ).cdvh
-
-if [ $# -ge 2 ]
-then
-    FILE_NAME=$2
-fi
-
-mkdir packtempDir
-
-if [ -d "./platforms/android" ]
-then
-    echo "Platform: android found"
-    mkdir packtempDir/android
-    cp -f ./platforms/android/res/xml/config.xml ./packtempDir/android/config.xml
-    cp -rf ./platforms/android/assets/www ./packtempDir/android/www
-fi
-if [ -d "./platforms/ios" ]
-then
-    echo "Platform: ios found"
-    mkdir packtempDir/ios
-    IOS_PROJ_DIR=$(find ./platforms/ios -name config.xml -exec dirname {} \;)
-    cp -f $IOS_PROJ_DIR/config.xml ./packtempDir/ios/config.xml
-    cp -rf ./platforms/ios/www ./packtempDir/ios/www
-fi
-
-cd packtempDir
-zip -r $ORIG_DIR/$FILE_NAME android ios >/dev/null
-cd ..
-rm -rf packtempDir
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/886f865d/www/cdvah/js/CdvhPackageHandler.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/CdvhPackageHandler.js b/www/cdvah/js/CdvhPackageHandler.js
deleted file mode 100644
index 43f58dd..0000000
--- a/www/cdvah/js/CdvhPackageHandler.js
+++ /dev/null
@@ -1,37 +0,0 @@
-(function(){
-    'use strict';
-    /* global myApp */
-    myApp.run(['$q', 'AppsService', 'ResourcesLoader', 'ContextMenuInjectScript', function($q,
AppsService, ResourcesLoader, ContextMenuInjectScript){
-
-        var platformId = cordova.require('cordova/platform').id;
-
-        AppsService.registerPackageHandler('cdvh', {
-            extractPackageToDirectory : function (appName, fileName, outputDirectory){
-                var dataToAppend = ContextMenuInjectScript.getInjectString(appName);
-                var platformDirectory = outputDirectory + '/' + platformId + '/www/';
-                var cordovaFile = platformDirectory + 'cordova.js';
-                var pluginsFile = platformDirectory + 'cordova_plugins.js';
-
-                // We need to
-                // 1) Modify the cordova.js file
-                // 2) Copy the cordova_plugins.json we have, as the app that is being installed
may have other plugins included which aren't in the harness.
-                // If we allow unavailable plugins to be included in this file, the plugin
initialiser breaks
-                return ResourcesLoader.extractZipFile(fileName, outputDirectory)
-                .then(function(){
-                    return ResourcesLoader.doesFileExist(cordovaFile);
-                })
-                .then(function(fileExists){
-                    if(fileExists){
-                        return $q.all([
-                            ResourcesLoader.appendFileContents(cordovaFile, dataToAppend),
-                            ResourcesLoader.downloadFromUrl('app-bundle:///cdvh_files/www/cordova_plugins.js',
pluginsFile)
-                        ]);
-                    } else {
-                        throw new Error('The package does not seem to have the files required
for the platform: ' + platformId);
-                    }
-                });
-            }
-        });
-
-    }]);
-})();


Mime
View raw message