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 6CC4C116E3 for ; Fri, 2 May 2014 18:33:39 +0000 (UTC) Received: (qmail 70842 invoked by uid 500); 2 May 2014 18:33:27 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 70552 invoked by uid 500); 2 May 2014 18:33:23 -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 70473 invoked by uid 99); 2 May 2014 18:33:21 -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, 02 May 2014 18:33:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AAE2545F9D; Fri, 2 May 2014 18:33:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: kamrik@apache.org To: commits@cordova.apache.org Date: Fri, 02 May 2014 18:33:24 -0000 Message-Id: In-Reply-To: <82b6509eb8a649cbb948e2fcdbf01fbf@git.apache.org> References: <82b6509eb8a649cbb948e2fcdbf01fbf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/24] Split out cordova-lib: move cordova-cli files http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/check_reqs.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/check_reqs.js b/spec/fixtures/platforms/android/cordova/lib/check_reqs.js deleted file mode 100755 index c064499..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/check_reqs.js +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var shell = require('shelljs'), - path = require('path'), - fs = require('fs'), - ROOT = path.join(__dirname, '..', '..'); - -// Get valid target from framework/project.properties -module.exports.get_target = function() { - if(fs.existsSync(path.join(ROOT, 'framework', 'project.properties'))) { - var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'framework', 'project.properties')); - return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', ''); - } else if (fs.existsSync(path.join(ROOT, 'project.properties'))) { - // if no target found, we're probably in a project and project.properties is in ROOT. - var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')); - return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', ''); - } -} - -module.exports.check_ant = function() { - var test = shell.exec('ant -version', {silent:true, async:false}); - if(test.code > 0) { - console.error('ERROR : executing command \'ant\', make sure you have ant installed and added to your path.'); - return false; - } - return true; -} - -module.exports.check_java = function() { - if(process.env.JAVA_HOME) { - var test = shell.exec('java', {silent:true, async:false}); - if(test.code > 0) { - console.error('ERROR : executing command \'java\', make sure you java environment is set up. Including your JDK and JRE.'); - return false; - } - return true; - } else { - console.error('ERROR : Make sure JAVA_HOME is set, as well as paths to your JDK and JRE for java.'); - return false; - } -} - -module.exports.check_android = function() { - var valid_target = this.get_target(); - var targets = shell.exec('android list targets', {silent:true, async:false}); - - if(targets.code > 0 && targets.output.match(/command\snot\sfound/)) { - console.error('The command \"android\" failed. Make sure you have the latest Android SDK installed, and the \"android\" command (inside the tools/ folder) is added to your path.'); - return false; - } else if(!targets.output.match(valid_target)) { - console.error('Please install Android target ' + valid_target.split('-')[1] + ' (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run \"android\" from your command-line to install/update any missing SDKs or tools.'); - return false; - } - return true; -} - -module.exports.run = function() { - return this.check_ant() && this.check_java && this.check_android(); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/clean.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/clean.js b/spec/fixtures/platforms/android/cordova/lib/clean.js deleted file mode 100755 index 8f14015..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/clean.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var shell = require('shelljs'), - path = require('path'), - ROOT = path.join(__dirname, '..', '..'); - -/* - * Cleans the project using ant - */ -module.exports.run = function() { - var cmd = 'ant clean -f ' + path.join(ROOT, 'build.xml'); - var result = shell.exec(cmd, {silent:false, async:false}); - if (result.code > 0) { - console.error('ERROR: Failed to clean android project.'); - console.error(result.output); - process.exit(2); - } -} - -module.exports.help = function() { - console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'clean'))); - console.log('Cleans the project directory.'); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/device.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/device.js b/spec/fixtures/platforms/android/cordova/lib/device.js deleted file mode 100755 index 363dc2b..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/device.js +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var shell = require('shelljs'), - path = require('path'), - build = require('./build'), - appinfo = require('./appinfo'), - exec = require('child_process').exec, - ROOT = path.join(__dirname, '..', '..'); - -/** - * Returns a list of the device ID's found - */ -module.exports.list = function() { - var cmd = 'adb devices'; - var result = shell.exec(cmd, {silent:true, async:false}); - if (result.code > 0) { - console.error('Failed to execute android command \'' + cmd + '\'.'); - process.exit(2); - } else { - var response = result.output.split('\n'); - var device_list = []; - for (var i = 1; i < response.length; i++) { - if (response[i].match(/\w+\tdevice/) && !response[i].match(/emulator/)) { - device_list.push(response[i].replace(/\tdevice/, '').replace('\r', '')); - } - } - return device_list; - } -} - -/* - * Installs a previously built application on the device - * and launches it. - */ -module.exports.install = function(target) { - var device_list = this.list(); - if (device_list.length > 0) { - // default device - target = typeof target !== 'undefined' ? target : device_list[0]; - if (device_list.indexOf(target) > -1) { - var apk_path = build.get_apk(); - var launchName = appinfo.getActivityName(); - console.log('Installing app on device...'); - cmd = 'adb -s ' + target + ' install -r ' + apk_path; - var install = shell.exec(cmd, {silent:false, async:false}); - if (install.error || install.output.match(/Failure/)) { - console.error('ERROR : Failed to install apk to device : '); - console.error(install.output); - process.exit(2); - } - - //unlock screen - cmd = 'adb -s ' + target + ' shell input keyevent 82'; - shell.exec(cmd, {silent:true, async:false}); - - // launch the application - console.log('Launching application...'); - cmd = 'adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launchName; - var launch = shell.exec(cmd, {silent:true, async:false}); - if(launch.code > 0) { - console.error('ERROR : Failed to launch application on emulator : ' + launch.error); - console.error(launch.output); - process.exit(2); - } else { - console.log('LAUNCH SUCCESS'); - } - } else { - console.error('ERROR : Unable to find target \'' + target + '\'.'); - console.error('Failed to deploy to device.'); - process.exit(2); - } - } else { - console.error('ERROR : Failed to deploy to device, no devices found.'); - process.exit(2); - } -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/emulator.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/emulator.js b/spec/fixtures/platforms/android/cordova/lib/emulator.js deleted file mode 100755 index cc658a9..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/emulator.js +++ /dev/null @@ -1,337 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var shell = require('shelljs'), - path = require('path'), - appinfo = require('./appinfo'), - build = require('./build'), - ROOT = path.join(__dirname, '..', '..'), - new_emulator = 'cordova_emulator'; - -/** - * Returns a list of emulator images in the form of objects - * { - name : , - path : , - target : , - abi : , - skin : - } - */ -module.exports.list_images = function() { - var cmd = 'android list avds'; - var result = shell.exec(cmd, {silent:true, async:false}); - if (result.code > 0) { - console.error('Failed to execute android command \'' + cmd + '\'.'); - process.exit(2); - } else { - var response = result.output.split('\n'); - var emulator_list = []; - for (var i = 1; i < response.length; i++) { - // To return more detailed information use img_obj - var img_obj = {}; - if (response[i].match(/Name:\s/)) { - img_obj['name'] = response[i].split('Name: ')[1].replace('\r', ''); - if (response[i + 1].match(/Path:\s/)) { - i++; - img_obj['path'] = response[i].split('Path: ')[1].replace('\r', ''); - } - if (response[i + 1].match(/\(API\slevel\s/)) { - i++; - img_obj['target'] = response[i].replace('\r', ''); - } - if (response[i + 1].match(/ABI:\s/)) { - i++; - img_obj['abi'] = response[i].split('ABI: ')[1].replace('\r', ''); - } - if (response[i + 1].match(/Skin:\s/)) { - i++; - img_obj['skin'] = response[i].split('Skin: ')[1].replace('\r', ''); - } - - emulator_list.push(img_obj); - } - /* To just return a list of names use this - if (response[i].match(/Name:\s/)) { - emulator_list.push(response[i].split('Name: ')[1].replace('\r', ''); - }*/ - - } - return emulator_list; - } -} - -/** - * Will return the closest avd to the projects target - * or undefined if no avds exist. - */ -module.exports.best_image = function() { - var project_target = this.get_target().replace('android-', ''); - var images = this.list_images(); - var closest = 9999; - var best = images[0]; - for (i in images) { - var target = images[i].target; - if(target) { - var num = target.split('(API level ')[1].replace(')', ''); - if (num == project_target) { - return images[i]; - } else if (project_target - num < closest && project_target > num) { - var closest = project_target - num; - best = images[i]; - } - } - } - return best; -} - -module.exports.list_started = function() { - var cmd = 'adb devices'; - var result = shell.exec(cmd, {silent:true, async:false}); - if (result.code > 0) { - console.error('Failed to execute android command \'' + cmd + '\'.'); - process.exit(2); - } else { - var response = result.output.split('\n'); - var started_emulator_list = []; - for (var i = 1; i < response.length; i++) { - if (response[i].match(/device/) && response[i].match(/emulator/)) { - started_emulator_list.push(response[i].replace(/\tdevice/, '').replace('\r', '')); - } - } - return started_emulator_list; - } -} - -module.exports.get_target = function() { - var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')); - return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', ''); -} - -module.exports.list_targets = function() { - var target_out = shell.exec('android list targets', {silent:true, async:false}).output.split('\n'); - var targets = []; - for (var i = target_out.length; i >= 0; i--) { - if(target_out[i].match(/id:/)) { - targets.push(targets[i].split(' ')[1]); - } - } - return targets; -} - -/* - * Starts an emulator with the given ID, - * and returns the started ID of that emulator. - * If no ID is given it will used the first image availible, - * if no image is availible it will error out (maybe create one?). - */ -module.exports.start = function(emulator_ID) { - var started_emulators = this.list_started(); - var num_started = started_emulators.length; - if (typeof emulator_ID === 'undefined') { - var emulator_list = this.list_images(); - if (emulator_list.length > 0) { - emulator_ID = this.best_image().name; - console.log('WARNING : no emulator specified, defaulting to ' + emulator_ID); - } else { - console.error('ERROR : No emulator images (avds) found, if you would like to create an'); - console.error(' avd follow the instructions provided here : '); - console.error(' http://developer.android.com/tools/devices/index.html') - console.error(' Or run \'android create avd --name --target \' '); - console.error(' in on the command line.'); - process.exit(2); - /*console.log('WARNING : no emulators availible, creating \'' + new_emulator + '\'.'); - this.create_image(new_emulator, this.get_target()); - emulator_ID = new_emulator;*/ - } - } - - var pipe_null = (process.platform == 'win32' || process.platform == 'win64'? '> NUL' : '> /dev/null'); - var cmd = 'emulator -avd ' + emulator_ID + ' ' + pipe_null + ' &'; - if(process.platform == 'win32' || process.platform == 'win64') { - cmd = '%comspec% /c start cmd /c ' + cmd; - } - var result = shell.exec(cmd, {silent:true, async:false}, function(code, output) { - if (code > 0) { - console.error('Failed to execute android command \'' + cmd + '\'.'); - console.error(output); - process.exit(2); - } - }); - - // wait for emulator to start - console.log('Waiting for emulator...'); - var new_started = this.wait_for_emulator(num_started); - var emulator_id; - if (new_started.length > 1) { - for (i in new_started) { - console.log(new_started[i]); - console.log(started_emulators.indexOf(new_started[i])); - if (started_emulators.indexOf(new_started[i]) < 0) { - emulator_id = new_started[i]; - } - } - } else { - emulator_id = new_started[0]; - } - if (!emulator_id) { - console.error('ERROR : Failed to start emulator, could not find new emulator'); - process.exit(2); - } - - //wait for emulator to boot up - process.stdout.write('Booting up emulator (this may take a while)...'); - this.wait_for_boot(emulator_id); - console.log('BOOT COMPLETE'); - - //unlock screen - cmd = 'adb -s ' + emulator_id + ' shell input keyevent 82'; - shell.exec(cmd, {silent:false, async:false}); - - //return the new emulator id for the started emulators - return emulator_id; -} - -/* - * Waits for the new emulator to apear on the started-emulator list. - */ -module.exports.wait_for_emulator = function(num_running) { - var new_started = this.list_started(); - if (new_started.length > num_running) { - return new_started; - } else { - this.sleep(1); - return this.wait_for_emulator(num_running); - } -} - -/* - * Waits for the boot animation property of the emulator to switch to 'stopped' - */ -module.exports.wait_for_boot = function(emulator_id) { - var cmd; - // ShellJS opens a lot of file handles, and the default on OS X is too small. - // TODO : This is not working, need to find a better way to increese the ulimit. - if(process.platform == 'win32' || process.platform == 'win64') { - cmd = 'adb -s ' + emulator_id + ' shell getprop init.svc.bootanim'; - } else { - cmd = 'ulimit -S -n 4096; adb -s ' + emulator_id + ' shell getprop init.svc.bootanim'; - } - var boot_anim = shell.exec(cmd, {silent:true, async:false}); - if (boot_anim.output.match(/stopped/)) { - return; - } else { - process.stdout.write('.'); - this.sleep(3); - return this.wait_for_boot(emulator_id); - } -} - -/* - * TODO : find a better way to wait for the emulator (maybe using async methods?) - */ -module.exports.sleep = function(time_sec) { - if (process.platform == 'win32' || process.platform == 'win64') { - shell.exec('ping 127.0.0.1 -n ' + time_sec, {silent:true, async:false}); - } else { - shell.exec('sleep ' + time_sec, {silent:true, async:false}); - } -} - -/* - * Create avd - * TODO : Enter the stdin input required to complete the creation of an avd. - */ -module.exports.create_image = function(name, target) { - console.log('Creating avd named ' + name); - if (target) { - var cmd = 'android create avd --name ' + name + ' --target ' + target; - var create = shell.exec(cmd, {sient:false, async:false}); - if (create.error) { - console.error('ERROR : Failed to create emulator image : '); - console.error(' Do you have the latest android targets including ' + target + '?'); - console.error(create.output); - process.exit(2); - } - } else { - console.log('WARNING : Project target not found, creating avd with a different target but the project may fail to install.'); - var cmd = 'android create avd --name ' + name + ' --target ' + this.list_targets()[0]; - var create = shell.exec(cmd, {sient:false, async:false}); - if (create.error) { - console.error('ERROR : Failed to create emulator image : '); - console.error(create.output); - process.exit(2); - } - console.error('ERROR : Unable to create an avd emulator, no targets found.'); - console.error('Please insure you have targets availible by runing the "android" command'). - process.exit(2); - } -} - -/* - * Installs a previously built application on the emulator and launches it. - * If no target is specified, then it picks one. - * If no started emulators are found, error out. - */ -module.exports.install = function(target) { - var emulator_list = this.list_started(); - if (emulator_list.length < 1) { - console.error('ERROR : No started emulators found, please start an emultor before deploying your project.'); - process.exit(2); - /*console.log('WARNING : No started emulators found, attemting to start an avd...'); - this.start(this.best_image().name);*/ - } - // default emulator - target = typeof target !== 'undefined' ? target : emulator_list[0]; - if (emulator_list.indexOf(target) > -1) { - console.log('Installing app on emulator...'); - var apk_path = build.get_apk(); - var cmd = 'adb -s ' + target + ' install -r ' + apk_path; - var install = shell.exec(cmd, {sient:false, async:false}); - if (install.error || install.output.match(/Failure/)) { - console.error('ERROR : Failed to install apk to emulator : '); - console.error(install.output); - process.exit(2); - } - - //unlock screen - cmd = 'adb -s ' + target + ' shell input keyevent 82'; - shell.exec(cmd, {silent:true, async:false}); - - // launch the application - console.log('Launching application...'); - var launchName = appinfo.getActivityName(); - cmd = 'adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launchName; - console.log(cmd); - var launch = shell.exec(cmd, {silent:false, async:false}); - if(launch.code > 0) { - console.error('ERROR : Failed to launch application on emulator : ' + launch.error); - console.error(launch.output); - process.exit(2); - } else { - console.log('LAUNCH SUCCESS'); - } - } else { - console.error('ERROR : Unable to find target \'' + target + '\'.'); - console.error('Failed to deploy to emulator.'); - process.exit(2); - } -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/install-device ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/install-device b/spec/fixtures/platforms/android/cordova/lib/install-device deleted file mode 100755 index 679efbf..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/install-device +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var device = require('./device'), - args = process.argv; - -if(args.length > 2) { - var install_target; - if (args[2].substring(0, 9) == '--target=') { - install_target = args[2].substring(9, args[2].length); - device.install(install_target); - process.exit(0); - } else { - console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); - process.exit(2); - } -} else { - device.install(); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/install-emulator ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/install-emulator b/spec/fixtures/platforms/android/cordova/lib/install-emulator deleted file mode 100755 index c006eb2..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/install-emulator +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var emulator = require('./emulator'), - args = process.argv; - -if(args.length > 2) { - var install_target; - if (args[2].substring(0, 9) == '--target=') { - install_target = args[2].substring(9, args[2].length); - emulator.install(install_target); - process.exit(0); - } else { - console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); - process.exit(2); - } -} else { - emulator.install(); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/list-devices ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/list-devices b/spec/fixtures/platforms/android/cordova/lib/list-devices deleted file mode 100755 index 3ef4efa..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/list-devices +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var devices = require('./device'); - -// Usage support for when args are given -var device_list = devices.list(); -for(device in device_list) { - console.log(device_list[device]); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/list-emulator-images ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/list-emulator-images b/spec/fixtures/platforms/android/cordova/lib/list-emulator-images deleted file mode 100755 index 3230537..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/list-emulator-images +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var emulators = require('./emulator'); - -// Usage support for when args are given -var emulator_list = emulators.list_images(); -for(emulator in emulator_list) { - console.log(emulator_list[emulator].name); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/list-started-emulators ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/list-started-emulators b/spec/fixtures/platforms/android/cordova/lib/list-started-emulators deleted file mode 100755 index 525a64c..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/list-started-emulators +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var emulators = require('./emulator'); - -// Usage support for when args are given -var emulator_list = emulators.list_started(); -for(emulator in emulator_list) { - console.log(emulator_list[emulator]); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/log.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/log.js b/spec/fixtures/platforms/android/cordova/lib/log.js deleted file mode 100755 index b85cf60..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/log.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var shell = require('shelljs'), - path = require('path'), - ROOT = path.join(__dirname, '..', '..'); - -/* - * Starts running logcat in the shell. - */ -module.exports.run = function() { - var cmd = 'adb logcat | grep -v nativeGetEnabledTags'; - var result = shell.exec(cmd, {silent:false, async:false}); - if (result.code > 0) { - console.error('ERROR: Failed to run logcat command.'); - console.error(result.output); - process.exit(2); - } -} - -module.exports.help = function() { - console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'log'))); - console.log('Gives the logcat output on the command line.'); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/run.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/run.js b/spec/fixtures/platforms/android/cordova/lib/run.js deleted file mode 100755 index 787d123..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/run.js +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var path = require('path'), - build = require('./build'), - emulator = require('./emulator'), - device = require('./device'), - ROOT = path.join(__dirname, '..', '..'); - -/* - * Runs the application on a device if availible. - * If not device is found, it will use a started emulator. - * If no started emulators are found it will attempt to start an avd. - * If no avds are found it will error out. - */ - module.exports.run = function(args) { - var build_type; - var install_target; - - for (var i=2; i -1) { - device.install(install_target); - } else if (started_emulators.indexOf(install_target) > -1) { - emulator.install(install_target); - } else { - // if target emulator isn't started, then start it. - var emulator_ID; - for(avd in avds) { - if(avds[avd].name == install_target) { - emulator_ID = emulator.start(install_target); - emulator.install(emulator_ID); - break; - } - } - if(!emulator_ID) { - console.error('ERROR : Target \'' + install_target + '\' not found, unalbe to run project'); - process.exit(2); - } - } - } else { - // no target given, deploy to device if availible, otherwise use the emulator. - var device_list = device.list(); - if (device_list.length > 0) { - console.log('WARNING : No target specified, deploying to device \'' + device_list[0] + '\'.'); - device.install(device_list[0]) - } else { - var emulator_list = emulator.list_started(); - if (emulator_list.length > 0) { - console.log('WARNING : No target specified, deploying to emulator \'' + emulator_list[0] + '\'.'); - emulator.install(emulator_list[0]); - } else { - console.log('WARNING : No started emulators found, starting an emulator.'); - var best_avd = emulator.best_image(); - if(best_avd) { - var emulator_ID = emulator.start(best_avd.name); - console.log('WARNING : No target specified, deploying to emulator \'' + emulator_ID + '\'.'); - emulator.install(emulator_ID); - } else { - emulator.start(); - } - } - } - } -} - -module.exports.help = function() { - console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'run')) + ' [options]'); - console.log('Build options :'); - console.log(' --debug : Builds project in debug mode'); - console.log(' --release : Builds project in release mode'); - console.log(' --nobuild : Runs the currently built project without recompiling'); - console.log('Deploy options :'); - console.log(' --device : Will deploy the built project to a device'); - console.log(' --emulator : Will deploy the built project to an emulator if one exists'); - console.log(' --target= : Installs to the target with the specified id.'); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/lib/start-emulator ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/lib/start-emulator b/spec/fixtures/platforms/android/cordova/lib/start-emulator deleted file mode 100755 index 5d6c4dd..0000000 --- a/spec/fixtures/platforms/android/cordova/lib/start-emulator +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var emulator = require('./emulator'), - args = process.argv; - -if(args.length > 2) { - var install_target; - if (args[2].substring(0, 9) == '--target=') { - install_target = args[2].substring(9, args[2].length); - emulator.start(install_target); - process.exit(0); - } else { - console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); - process.exit(2); - } -} else { - emulator.start(); - process.exit(0); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/log ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/log b/spec/fixtures/platforms/android/cordova/log deleted file mode 100755 index 087325f..0000000 --- a/spec/fixtures/platforms/android/cordova/log +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var log = require('./lib/log'), - reqs = require('./lib/check_reqs'), - args = process.argv; - -// Usage support for when args are given -if(args.length > 2) { - log.help(); -} else if(reqs.run()) { - log.run(); -} else { - process.exit(2); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/run ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/run b/spec/fixtures/platforms/android/cordova/run deleted file mode 100755 index 57d7345..0000000 --- a/spec/fixtures/platforms/android/cordova/run +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var run = require('./lib/run'), - reqs = require('./lib/check_reqs'), - args = process.argv; - -// Support basic help commands -if (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || - args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { - run.help(); -} else if(reqs.run()) { - run.run(args); - process.exit(0); -} else { - process.exit(2); -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/cordova/version ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/cordova/version b/spec/fixtures/platforms/android/cordova/version deleted file mode 100755 index de1a76d..0000000 --- a/spec/fixtures/platforms/android/cordova/version +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -// Coho updates this line: -var VERSION = "3.1.0"; - -console.log(VERSION); http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/local.properties ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/local.properties b/spec/fixtures/platforms/android/local.properties deleted file mode 100644 index d3f5072..0000000 --- a/spec/fixtures/platforms/android/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. - -# location of the SDK. This is only used by Ant -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/Users/braden/cordova/android/android-sdk-macosx http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/proguard-project.txt ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/proguard-project.txt b/spec/fixtures/platforms/android/proguard-project.txt deleted file mode 100644 index f2fe155..0000000 --- a/spec/fixtures/platforms/android/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/project.properties ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/project.properties b/spec/fixtures/platforms/android/project.properties deleted file mode 100644 index a3ee5ab..0000000 --- a/spec/fixtures/platforms/android/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-17 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/drawable-hdpi/icon.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/drawable-hdpi/icon.png b/spec/fixtures/platforms/android/res/drawable-hdpi/icon.png deleted file mode 100644 index 4d27634..0000000 Binary files a/spec/fixtures/platforms/android/res/drawable-hdpi/icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/drawable-ldpi/icon.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/drawable-ldpi/icon.png b/spec/fixtures/platforms/android/res/drawable-ldpi/icon.png deleted file mode 100644 index cd5032a..0000000 Binary files a/spec/fixtures/platforms/android/res/drawable-ldpi/icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/drawable-mdpi/icon.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/drawable-mdpi/icon.png b/spec/fixtures/platforms/android/res/drawable-mdpi/icon.png deleted file mode 100644 index e79c606..0000000 Binary files a/spec/fixtures/platforms/android/res/drawable-mdpi/icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/drawable-xhdpi/icon.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/drawable-xhdpi/icon.png b/spec/fixtures/platforms/android/res/drawable-xhdpi/icon.png deleted file mode 100644 index ec7ffbf..0000000 Binary files a/spec/fixtures/platforms/android/res/drawable-xhdpi/icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/drawable/icon.png ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/drawable/icon.png b/spec/fixtures/platforms/android/res/drawable/icon.png deleted file mode 100644 index ec7ffbf..0000000 Binary files a/spec/fixtures/platforms/android/res/drawable/icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/values/strings.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/values/strings.xml b/spec/fixtures/platforms/android/res/values/strings.xml deleted file mode 100644 index 1e706b3..0000000 --- a/spec/fixtures/platforms/android/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - TestBase - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/res/xml/config.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/res/xml/config.xml b/spec/fixtures/platforms/android/res/xml/config.xml deleted file mode 100644 index 17ca237..0000000 --- a/spec/fixtures/platforms/android/res/xml/config.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Hello Cordova - - A sample Apache Cordova application that responds to the deviceready event. - - - - - - - - Apache Cordova Team - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/src/org/testing/TestBase.java ---------------------------------------------------------------------- diff --git a/spec/fixtures/platforms/android/src/org/testing/TestBase.java b/spec/fixtures/platforms/android/src/org/testing/TestBase.java deleted file mode 100644 index 928e074..0000000 --- a/spec/fixtures/platforms/android/src/org/testing/TestBase.java +++ /dev/null @@ -1,37 +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. - */ - -package org.testing; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class TestBase extends CordovaActivity -{ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - super.init(); - // Set by in config.xml - super.loadUrl(Config.getStartUrl()); - //super.loadUrl("file:///android_asset/www/index.html") - } -} - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/ChildBrowser/plugin.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/ChildBrowser/plugin.xml b/spec/fixtures/plugins/ChildBrowser/plugin.xml deleted file mode 100644 index 512c02f..0000000 --- a/spec/fixtures/plugins/ChildBrowser/plugin.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - Child Browser - - - - - - - - - - - - - - No matter what platform you are installing to, this notice is very important. - - - - - - - - - - - - - - - - - - - - - - Please make sure you read this because it is very important to complete the installation of your plugin. - - - - - - - - - - - - - - - $APP_ID - - - - - - PackageName - $PACKAGE_NAME - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/ChildBrowser/src/android/ChildBrowser.java ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/ChildBrowser/src/android/ChildBrowser.java b/spec/fixtures/plugins/ChildBrowser/src/android/ChildBrowser.java deleted file mode 100644 index 5263b0c..0000000 --- a/spec/fixtures/plugins/ChildBrowser/src/android/ChildBrowser.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2013 Anis Kadri - * - * Licensed 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. - * -*/ - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/ChildBrowser/www/childbrowser.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/ChildBrowser/www/childbrowser.js b/spec/fixtures/plugins/ChildBrowser/www/childbrowser.js deleted file mode 100644 index 5263b0c..0000000 --- a/spec/fixtures/plugins/ChildBrowser/www/childbrowser.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * Copyright 2013 Anis Kadri - * - * Licensed 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. - * -*/ - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/ChildBrowser/www/childbrowser/image.jpg ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/ChildBrowser/www/childbrowser/image.jpg b/spec/fixtures/plugins/ChildBrowser/www/childbrowser/image.jpg deleted file mode 100644 index 257cc56..0000000 --- a/spec/fixtures/plugins/ChildBrowser/www/childbrowser/image.jpg +++ /dev/null @@ -1 +0,0 @@ -foo http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/ChildBrowser/www/childbrowser_file.html ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/ChildBrowser/www/childbrowser_file.html b/spec/fixtures/plugins/ChildBrowser/www/childbrowser_file.html deleted file mode 100644 index 6de7b8c..0000000 --- a/spec/fixtures/plugins/ChildBrowser/www/childbrowser_file.html +++ /dev/null @@ -1 +0,0 @@ -This is a test file. http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/android/plugin.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/android/plugin.xml b/spec/fixtures/plugins/android/plugin.xml deleted file mode 100644 index d8f5619..0000000 --- a/spec/fixtures/plugins/android/plugin.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Android Plugin - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/android/src/android/Android.java ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/android/src/android/Android.java b/spec/fixtures/plugins/android/src/android/Android.java deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/android/src/android/SomethingWithR.java ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/android/src/android/SomethingWithR.java b/spec/fixtures/plugins/android/src/android/SomethingWithR.java deleted file mode 100644 index c3af060..0000000 --- a/spec/fixtures/plugins/android/src/android/SomethingWithR.java +++ /dev/null @@ -1,6 +0,0 @@ -import com.yourapp.R; - -import android.app.*; - -public class SomethingWithR { -} http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/android/www/android.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/android/www/android.js b/spec/fixtures/plugins/android/www/android.js deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/fake1/plugin.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/fake1/plugin.xml b/spec/fixtures/plugins/fake1/plugin.xml deleted file mode 100644 index ffdc650..0000000 --- a/spec/fixtures/plugins/fake1/plugin.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Fake1 - Cordova fake plugin for tests - Apache 2.0 - cordova,cli,test - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/test/plugin.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/test/plugin.xml b/spec/fixtures/plugins/test/plugin.xml deleted file mode 100644 index 774eda1..0000000 --- a/spec/fixtures/plugins/test/plugin.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Test Plugin - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/plugins/test/www/test.js ---------------------------------------------------------------------- diff --git a/spec/fixtures/plugins/test/www/test.js b/spec/fixtures/plugins/test/www/test.js deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/projects/android/AndroidManifest.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/android/AndroidManifest.xml b/spec/fixtures/projects/android/AndroidManifest.xml deleted file mode 100644 index 0c52803..0000000 --- a/spec/fixtures/projects/android/AndroidManifest.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/projects/android/assets/www/.gitkeep ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/android/assets/www/.gitkeep b/spec/fixtures/projects/android/assets/www/.gitkeep deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/projects/android/res/xml/config.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/android/res/xml/config.xml b/spec/fixtures/projects/android/res/xml/config.xml deleted file mode 100644 index d37aba5..0000000 --- a/spec/fixtures/projects/android/res/xml/config.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/projects/android/src/.gitkeep ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/android/src/.gitkeep b/spec/fixtures/projects/android/src/.gitkeep deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/projects/windows/bom_test.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/projects/windows/bom_test.xml b/spec/fixtures/projects/windows/bom_test.xml deleted file mode 100644 index 57cadf6..0000000 --- a/spec/fixtures/projects/windows/bom_test.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/templates/no_content_config.xml ---------------------------------------------------------------------- diff --git a/spec/fixtures/templates/no_content_config.xml b/spec/fixtures/templates/no_content_config.xml deleted file mode 100644 index 7c4ef3d..0000000 --- a/spec/fixtures/templates/no_content_config.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - Hello Cordova - - - A sample Apache Cordova application that responds to the deviceready event. - - - - Apache Cordova Team - - - - - - http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/helper.js ---------------------------------------------------------------------- diff --git a/spec/helper.js b/spec/helper.js deleted file mode 100644 index 351e6e4..0000000 --- a/spec/helper.js +++ /dev/null @@ -1,19 +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. -*/ -jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/helpers.js ---------------------------------------------------------------------- diff --git a/spec/helpers.js b/spec/helpers.js deleted file mode 100644 index 3236516..0000000 --- a/spec/helpers.js +++ /dev/null @@ -1,46 +0,0 @@ - -var path = require('path'), - fs = require('fs'), - shell = require('shelljs'), - os = require('os'); - -module.exports.tmpDir = function(subdir) { - var dir = path.join(os.tmpdir(), 'e2e-test'); - if (subdir) { - dir = path.join(dir, subdir); - } - shell.mkdir('-p', dir); - return dir; -}; - -// Returns the platform that should be used for testing on this host platform. -/* -var host = os.platform(); -if (host.match(/win/)) { - module.exports.testPlatform = 'wp8'; -} else if (host.match(/darwin/)) { - module.exports.testPlatform = 'ios'; -} else { - module.exports.testPlatform = 'android'; -} -*/ - -// Just use Android everywhere; we're mocking out any calls to the `android` binary. -module.exports.testPlatform = 'android'; - -// Add the toExist matcher. -beforeEach(function() { - this.addMatchers({ - 'toExist': function() { - var notText = this.isNot ? ' not' : ''; - var self = this; - - this.message = function() { - return 'Expected file ' + self.actual + notText + ' to exist.'; - }; - - return fs.existsSync(this.actual); - } - }); -}); -