You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/05/02 20:33:26 UTC
[07/24] Split out cordova-lib: move cordova-cli files
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/cordova-lib/templates/hooks-README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/templates/hooks-README.md b/cordova-lib/templates/hooks-README.md
new file mode 100644
index 0000000..d2563ea
--- /dev/null
+++ b/cordova-lib/templates/hooks-README.md
@@ -0,0 +1,83 @@
+<!--
+#
+# 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.
+#
+-->
+# Cordova Hooks
+
+This directory may contain scripts used to customize cordova commands. This
+directory used to exist at `.cordova/hooks`, but has now been moved to the
+project root. Any scripts you add to these directories will be executed before
+and after the commands corresponding to the directory name. Useful for
+integrating your own build systems or integrating with version control systems.
+
+__Remember__: Make your scripts executable.
+
+## Hook Directories
+The following subdirectories will be used for hooks:
+
+ after_build/
+ after_compile/
+ after_docs/
+ after_emulate/
+ after_platform_add/
+ after_platform_rm/
+ after_platform_ls/
+ after_plugin_add/
+ after_plugin_ls/
+ after_plugin_rm/
+ after_plugin_search/
+ after_prepare/
+ after_run/
+ after_serve/
+ before_build/
+ before_compile/
+ before_docs/
+ before_emulate/
+ before_platform_add/
+ before_platform_rm/
+ before_platform_ls/
+ before_plugin_add/
+ before_plugin_ls/
+ before_plugin_rm/
+ before_plugin_search/
+ before_prepare/
+ before_run/
+ before_serve/
+ pre_package/ <-- Windows 8 and Windows Phone only.
+
+## Script Interface
+
+All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
+
+* CORDOVA_VERSION - The version of the Cordova-CLI.
+* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
+* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
+* CORDOVA_HOOK - Path to the hook that is being executed.
+* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
+
+If a script returns a non-zero exit code, then the parent cordova command will be aborted.
+
+
+## Writing hooks
+
+We highly recommend writting your hooks using Node.js so that they are
+cross-platform. Some good examples are shown here:
+
+[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/cordova.js
----------------------------------------------------------------------
diff --git a/cordova.js b/cordova.js
deleted file mode 100644
index 687392b..0000000
--- a/cordova.js
+++ /dev/null
@@ -1,68 +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.
-*/
-var cordova_events = require('./src/events');
-var cordova_util = require('./src/util');
-
-var off = function() {
- cordova_events.removeListener.apply(cordova_events, arguments);
-};
-
-var emit = function() {
- cordova_events.emit.apply(cordova_events, arguments);
-};
-
-exports = module.exports = {
- on: function() {
- cordova_events.on.apply(cordova_events, arguments);
- },
- off: off,
- removeListener:off,
- removeAllListeners:function() {
- cordova_events.removeAllListeners.apply(cordova_events, arguments);
- },
- emit: emit,
- trigger: emit,
- raw: {}
-};
-
-exports.findProjectRoot = function(opt_startDir) {
- return cordova_util.isCordova(opt_startDir);
-}
-
-// Each of these APIs takes a final parameter that is a callback function.
-// The callback is passed the error object upon failure, or undefined upon success.
-// To use a promise instead, call the APIs via cordova.raw.FOO(), which returns
-// a promise instead of using a final-parameter-callback.
-var addModuleProperty = cordova_util.addModuleProperty;
-addModuleProperty(module, 'prepare', './src/prepare', true);
-addModuleProperty(module, 'build', './src/build', true);
-addModuleProperty(module, 'help', './src/help');
-addModuleProperty(module, 'config', './src/config');
-addModuleProperty(module, 'create', './src/create', true);
-addModuleProperty(module, 'emulate', './src/emulate', true);
-addModuleProperty(module, 'plugin', './src/plugin', true);
-addModuleProperty(module, 'plugins', './src/plugin', true);
-addModuleProperty(module, 'serve', './src/serve');
-addModuleProperty(module, 'platform', './src/platform', true);
-addModuleProperty(module, 'platforms', './src/platform', true);
-addModuleProperty(module, 'compile', './src/compile', true);
-addModuleProperty(module, 'run', './src/run', true);
-addModuleProperty(module, 'info', './src/info', true);
-
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/platforms.js
----------------------------------------------------------------------
diff --git a/platforms.js b/platforms.js
deleted file mode 100644
index 5bb82f1..0000000
--- a/platforms.js
+++ /dev/null
@@ -1,88 +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.
-*/
-
-module.exports = {
- 'ios' : {
- hostos : ['darwin'],
- parser : './src/metadata/ios_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git',
- version: '3.4.1'
- },
- 'android' : {
- parser : './src/metadata/android_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git',
- version: '3.4.0'
- },
- 'ubuntu' : {
- hostos : ['linux'],
- parser : './src/metadata/ubuntu_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ubuntu.git',
- version: '3.4.0'
- },
- 'amazon-fireos' : {
- parser : './src/metadata/amazon_fireos_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-amazon-fireos.git',
- version: '3.4.0'
- },
- 'wp7' : {
- hostos : ['win32'],
- parser : './src/metadata/wp7_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.4.0',
- subdirectory: 'wp7'
- },
- 'wp8' : {
- hostos : ['win32'],
- parser : './src/metadata/wp8_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git',
- version: '3.4.0',
- subdirectory: 'wp8'
- },
- 'blackberry10' : {
- parser : './src/metadata/blackberry10_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-blackberry.git',
- version: '3.4.0',
- subdirectory: 'blackberry10'
- },
- 'www':{
- hostos : [],
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git',
- version: '3.4.0'
- },
- 'firefoxos':{
- parser: './src/metadata/firefoxos_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-firefoxos.git',
- version: '3.4.0'
- },
- 'windows8':{
- hostos : ['win32'],
- parser: './src/metadata/windows8_parser',
- url : 'https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git',
- version: '3.4.0',
- subdirectory: 'windows8'
- }
-};
-
-var addModuleProperty = require('./src/util').addModuleProperty;
-Object.keys(module.exports).forEach(function(key) {
- var obj = module.exports[key];
- if (obj.parser) {
- addModuleProperty(module, 'parser', obj.parser, false, obj);
- }
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/spec/ConfigParser.spec.js b/spec/ConfigParser.spec.js
deleted file mode 100644
index 1faec88..0000000
--- a/spec/ConfigParser.spec.js
+++ /dev/null
@@ -1,84 +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.
-*/
-var path = require('path'),
- fs = require('fs'),
- ConfigParser = require('../src/ConfigParser'),
- xml = path.join(__dirname, 'test-config.xml'),
- xml_contents = fs.readFileSync(xml, 'utf-8');
-
-describe('config.xml parser', function () {
- var readFile;
- beforeEach(function() {
- readFile = spyOn(fs, 'readFileSync').andReturn(xml_contents);
- });
-
- it('should create an instance based on an xml file', function() {
- var cfg;
- expect(function () {
- cfg = new ConfigParser(xml);
- }).not.toThrow();
- expect(cfg).toBeDefined();
- expect(cfg.doc).toBeDefined();
- });
-
- describe('methods', function() {
- var cfg;
- beforeEach(function() {
- cfg = new ConfigParser(xml);
- });
-
- describe('package name / id', function() {
- it('should get the (default) packagename', function() {
- expect(cfg.packageName()).toEqual('io.cordova.hellocordova');
- });
- it('should allow setting the packagename', function() {
- cfg.setPackageName('this.is.bat.country');
- expect(cfg.packageName()).toEqual('this.is.bat.country');
- });
- });
-
- describe('version', function() {
- it('should get the version', function() {
- expect(cfg.version()).toEqual('0.0.1');
- });
- it('should allow setting the version', function() {
- cfg.setVersion('2.0.1');
- expect(cfg.version()).toEqual('2.0.1');
- });
- });
-
- describe('app name', function() {
- it('should get the (default) app name', function() {
- expect(cfg.name()).toEqual('Hello Cordova');
- });
- it('should allow setting the app name', function() {
- cfg.setName('this.is.bat.country');
- expect(cfg.name()).toEqual('this.is.bat.country');
- });
- });
- describe('preference', function() {
- it('should get value of existing preference', function() {
- expect(cfg.getPreference('fullscreen')).toEqual('true');
- });
- it('should get undefined as non existing preference', function() {
- expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/build.spec.js
----------------------------------------------------------------------
diff --git a/spec/build.spec.js b/spec/build.spec.js
deleted file mode 100644
index 259c3d4..0000000
--- a/spec/build.spec.js
+++ /dev/null
@@ -1,129 +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.
-*/
-var cordova = require('../cordova'),
- platforms = require('../platforms'),
- shell = require('shelljs'),
- path = require('path'),
- fs = require('fs'),
- hooker = require('../src/hooker'),
- Q = require('q'),
- util = require('../src/util');
-
-var supported_platforms = Object.keys(platforms).filter(function(p) { return p != 'www'; });
-
-describe('build command', function() {
- var is_cordova, cd_project_root, list_platforms, fire;
- var project_dir = '/some/path';
- var prepare_spy, compile_spy;
- var result;
-
- function buildPromise(f) {
- f.then(function() { result = true; }, function(err) { result = err; });
- }
-
- function wrapper(f, post) {
- runs(function() {
- buildPromise(f);
- });
- waitsFor(function() { return result; }, 'promise never resolved', 500);
- runs(post);
- }
-
- beforeEach(function() {
- is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
- cd_project_root = spyOn(util, 'cdProjectRoot').andReturn(project_dir);
- list_platforms = spyOn(util, 'listPlatforms').andReturn(supported_platforms);
- fire = spyOn(hooker.prototype, 'fire').andReturn(Q());
- prepare_spy = spyOn(cordova.raw, 'prepare').andReturn(Q());
- compile_spy = spyOn(cordova.raw, 'compile').andReturn(Q());
- });
- describe('failure', function() {
- it('should not run inside a project with no platforms', function(done) {
- list_platforms.andReturn([]);
- Q().then(cordova.raw.build).then(function() {
- expect('this call').toBe('fail');
- }, function(err) {
- expect(err.message).toEqual(
- 'No platforms added to this project. Please use `cordova platform add <platform>`.'
- )
- }).fin(done);
- });
-
- it('should not run outside of a Cordova-based project', function(done) {
- is_cordova.andReturn(false);
-
- Q().then(cordova.raw.build).then(function() {
- expect('this call').toBe('fail');
- }, function(err) {
- expect(err.message).toEqual(
- 'Current working directory is not a Cordova-based project.'
- )
- }).fin(done);
- });
- });
-
- describe('success', function() {
- it('should run inside a Cordova-based project with at least one added platform and call both prepare and compile', function(done) {
- cordova.raw.build(['android','ios']).then(function() {
- var opts = {verbose: false, platforms: ['android', 'ios'], options: []};
- expect(prepare_spy).toHaveBeenCalledWith(opts);
- expect(compile_spy).toHaveBeenCalledWith(opts);
- done();
- });
- });
- it('should pass down options', function(done) {
- cordova.raw.build({platforms: ['android'], options: ['--release']}).then(function() {
- var opts = {platforms: ['android'], options: ["--release"], verbose: false};
- expect(prepare_spy).toHaveBeenCalledWith(opts);
- expect(compile_spy).toHaveBeenCalledWith(opts);
- done();
- });
- });
- });
-
- describe('hooks', function() {
- describe('when platforms are added', function() {
- it('should fire before hooks through the hooker module', function(done) {
- cordova.raw.build(['android', 'ios']).then(function() {
- expect(fire).toHaveBeenCalledWith('before_build', {verbose: false, platforms:['android', 'ios'], options: []});
- done();
- });
- });
- it('should fire after hooks through the hooker module', function(done) {
- cordova.raw.build('android').then(function() {
- expect(fire).toHaveBeenCalledWith('after_build', {verbose: false, platforms:['android'], options: []});
- done();
- });
- });
- });
-
- describe('with no platforms added', function() {
- it('should not fire the hooker', function(done) {
- list_platforms.andReturn([]);
- Q().then(cordova.raw.build).then(function() {
- expect('this call').toBe('fail');
- }, function(err) {
- expect(err.message).toEqual(
- 'No platforms added to this project. Please use `cordova platform add <platform>`.'
- )
- }).fin(done);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/compile.spec.js
----------------------------------------------------------------------
diff --git a/spec/compile.spec.js b/spec/compile.spec.js
deleted file mode 100644
index c1fc8b9..0000000
--- a/spec/compile.spec.js
+++ /dev/null
@@ -1,113 +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.
-*/
-var cordova = require('../cordova'),
- platforms = require('../platforms'),
- path = require('path'),
- fs = require('fs'),
- hooker = require('../src/hooker'),
- superspawn = require('../src/superspawn'),
- util = require('../src/util'),
- Q = require('q'),
- os = require('os');
-
-
-var supported_platforms = Object.keys(platforms).filter(function(p) { return p != 'www'; });
-
-
-describe('compile command', function() {
- var is_cordova, list_platforms, fire, result, cd_project_root;
- var project_dir = '/some/path';
-
- function wrapper(f, post) {
- runs(function() {
- Q().then(f).then(function() { result = true; }, function(err) { result = err; });
- });
- waitsFor(function() { return result; }, 'promise never resolved', 500);
- runs(post);
- }
- beforeEach(function() {
- is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
- cd_project_root = spyOn(util, 'cdProjectRoot').andReturn(project_dir);
- list_platforms = spyOn(util, 'listPlatforms').andReturn(supported_platforms);
- fire = spyOn(hooker.prototype, 'fire').andReturn(Q());
- spyOn(superspawn, 'spawn').andCallFake(function() { return Q() });
- });
- describe('failure', function() {
- it('should not run inside a Cordova-based project with no added platforms by calling util.listPlatforms', function() {
- list_platforms.andReturn([]);
- wrapper(cordova.raw.compile, function() {
- expect('' + result).toContain('No platforms added to this project. Please use `cordova platform add <platform>`.');
- });
- });
- it('should not run outside of a Cordova-based project', function() {
- is_cordova.andReturn(false);
- wrapper(cordova.raw.compile, function() {
- expect(result instanceof Error).toBe(true);
- });
- });
- });
-
- describe('success', function() {
- it('should run inside a Cordova-based project with at least one added platform and shell out to build', function(done) {
- cordova.raw.compile(['android','ios']).then(function() {
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'android', 'cordova', 'build'), [], jasmine.any(Object));
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'ios', 'cordova', 'build'), [], jasmine.any(Object));
- done();
- });
- });
-
- it('should pass down optional parameters', function (done) {
- cordova.raw.compile({platforms:["blackberry10"], options:["--release"]}).then(function () {
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'blackberry10', 'cordova', 'build'), ['--release'], jasmine.any(Object));
- done();
- });
- });
- });
-
- describe('hooks', function() {
- describe('when platforms are added', function() {
- it('should fire before hooks through the hooker module', function(done) {
- cordova.raw.compile(['android', 'ios']).then(function() {
- expect(fire).toHaveBeenCalledWith('before_compile', {verbose: false, platforms:['android', 'ios'], options: []});
- done();
- });
- });
- it('should fire after hooks through the hooker module', function(done) {
- cordova.raw.compile('android').then(function() {
- expect(fire).toHaveBeenCalledWith('after_compile', {verbose: false, platforms:['android'], options: []});
- done();
- });
- });
- });
-
- describe('with no platforms added', function() {
- it('should not fire the hooker', function(done) {
- list_platforms.andReturn([]);
- Q().then(cordova.raw.compile).then(function() {
- expect('this call').toBe('fail');
- }, function(err) {
- expect(fire).not.toHaveBeenCalled();
- expect(err.message).toContain(
- 'No platforms added to this project. Please use `cordova platform add <platform>`.'
- )
- }).fin(done);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/create.spec.js
----------------------------------------------------------------------
diff --git a/spec/create.spec.js b/spec/create.spec.js
deleted file mode 100644
index ebdfab5..0000000
--- a/spec/create.spec.js
+++ /dev/null
@@ -1,138 +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.
-*/
-
-var helpers = require('./helpers'),
- path = require('path'),
- fs = require('fs'),
- shell = require('shelljs'),
- Q = require('q'),
- config = require('../src/config'),
- events = require('../src/events'),
- util = require('../src/util'),
- ConfigParser = require('../src/ConfigParser'),
- cordova = require('../cordova');
-
-// A utility function to generate all combinations of elements from 2 arrays.
-// crossConcat(['x', 'y'], ['1', '2', '3'])
-// -> [ 'x1', 'x2', 'x3', 'y1', 'y2', 'y3']
-var crossConcat = function(a, b, delimiter){
- var result = [];
- delimiter = delimiter || '';
- for (var i = 0; i < a.length; i++) {
- for (var j = 0; j < b.length; j++) {
- result.push(a[i] + delimiter + b[j]);
- }
- }
- return result;
-};
-
-var tmpDir = helpers.tmpDir('create_test');
-var appName = 'TestBase';
-var appId = 'org.testing';
-var project = path.join(tmpDir, appName);
-var cordovaDir = path.join(project, '.cordova');
-var configNormal = {
- lib: {
- www: {
- uri: path.join(__dirname, 'fixtures', 'base', 'www'),
- version: "testCordovaCreate",
- id: appName
- }
- }
- };
-var configSymlink = {
- lib: {
- www: {
- uri: path.join(__dirname, 'fixtures', 'base'), // "create" should copy or link the www child of this dir and not the dir itself.
- link: true
- }
- }
- };
-
-
-describe('create end-to-end', function() {
-
- beforeEach(function() {
- shell.rm('-rf', project);
- });
- afterEach(function() {
- process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
- shell.rm('-rf', tmpDir);
- });
-
- function checkProject() {
- // Check if top level dirs exist.
- var dirs = ['hooks', 'platforms', 'merges', 'plugins', 'www'];
- dirs.forEach(function(d) {
- expect(path.join(project, d)).toExist();
- });
-
- expect(path.join(project, 'hooks', 'README.md')).toExist();
-
- // Check if config files exist.
- expect(path.join(project, 'www', 'index.html')).toExist();
-
- // Check that www/config.xml was updated.
- var configXml = new ConfigParser(path.join(project, 'www', 'config.xml'));
- expect(configXml.packageName()).toEqual(appId);
-
- // TODO (kamrik): check somehow that we got the right config.xml from the fixture and not some place else.
- // expect(configXml.name()).toEqual('TestBase');
- }
-
- var results;
- events.on('results', function(res) { results = res; });
-
- it('should successfully run with regular config', function(done) {
- // Call cordova create with no args, should return help.
- cordova.raw.create()
- .then(function() {
- expect(results).toMatch(/synopsis/gi);
- })
- .then(function() {
- // Create a real project
- return cordova.raw.create(project, appId, appName, configNormal);
- })
- .then(checkProject)
- .fail(function(err) {
- console.log(err);
- expect(err).toBeUndefined();
- })
- .fin(done);
- });
-
- it('should successfully run with symlinked www', function(done) {
- // Call cordova create with no args, should return help.
- cordova.raw.create(project, appId, appName, configSymlink)
- .then(checkProject)
- .then(function() {
- // Check that www is really a symlink
- expect(fs.lstatSync(path.join(project, 'www')).isSymbolicLink()).toBe(true);
- })
- .fail(function(err) {
- if(process.platform.slice(0, 3) == 'win') {
- // Allow symlink error if not in admin mode
- expect(err.message).toBe("Symlinks on Windows require Administrator privileges");
- } else {
- expect(err).toBeUndefined();
- }
- })
- .fin(done);
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/emulate.spec.js
----------------------------------------------------------------------
diff --git a/spec/emulate.spec.js b/spec/emulate.spec.js
deleted file mode 100644
index 8435535..0000000
--- a/spec/emulate.spec.js
+++ /dev/null
@@ -1,115 +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.
-*/
-var cordova = require('../cordova'),
- platforms = require('../platforms'),
- superspawn = require('../src/superspawn'),
- path = require('path'),
- fs = require('fs'),
- hooker = require('../src/hooker'),
- Q = require('q'),
- util = require('../src/util'),
- os = require('os');
-
-var supported_platforms = Object.keys(platforms).filter(function(p) { return p != 'www'; });
-
-describe('emulate command', function() {
- var is_cordova, cd_project_root, list_platforms, fire, result;
- var project_dir = '/some/path';
- var prepare_spy;
-
- function wrapper(f, post) {
- runs(function() {
- Q().then(f).then(function() { result = true; }, function(err) { result = err; });
- });
- waitsFor(function() { return result; }, 'promise never resolved', 500);
- runs(post);
- }
-
- beforeEach(function() {
- is_cordova = spyOn(util, 'isCordova').andReturn(project_dir);
- cd_project_root = spyOn(util, 'cdProjectRoot').andReturn(project_dir);
- list_platforms = spyOn(util, 'listPlatforms').andReturn(supported_platforms);
- fire = spyOn(hooker.prototype, 'fire').andReturn(Q());
- prepare_spy = spyOn(cordova.raw, 'prepare').andReturn(Q());
- spyOn(superspawn, 'spawn').andCallFake(Q);
- });
- describe('failure', function() {
- it('should not run inside a Cordova-based project with no added platforms by calling util.listPlatforms', function() {
- list_platforms.andReturn([]);
- wrapper(cordova.raw.emulate, function() {
- expect(''+ result).toContain('No platforms added to this project. Please use `cordova platform add <platform>`.');
- });
- });
- it('should not run outside of a Cordova-based project', function() {
- is_cordova.andReturn(false);
- wrapper(cordova.raw.emulate, function() {
- expect(result instanceof Error).toBe(true);
- });
- });
- });
-
- describe('success', function() {
- it('should run inside a Cordova-based project with at least one added platform and call prepare and shell out to the emulate script', function(done) {
- cordova.raw.emulate(['android','ios']).then(function(err) {
- expect(prepare_spy).toHaveBeenCalledWith(['android', 'ios']);
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'android', 'cordova', 'run'), ['--emulator'], jasmine.any(Object));
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'ios', 'cordova', 'run'), ['--emulator'], jasmine.any(Object));
-
- done();
- });
- });
- it('should pass down options', function(done) {
- cordova.raw.emulate({platforms: ['ios'], options:["--optionTastic"]}).then(function(err) {
- expect(prepare_spy).toHaveBeenCalledWith(['ios']);
- expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms', 'ios', 'cordova', 'run'), ['--emulator', '--optionTastic'], jasmine.any(Object));
-
- done();
- });
- });
- });
-
- describe('hooks', function() {
- describe('when platforms are added', function() {
- it('should fire before hooks through the hooker module', function(done) {
- cordova.raw.emulate(['android', 'ios']).then(function() {
- expect(fire).toHaveBeenCalledWith('before_emulate', {verbose: false, platforms:['android', 'ios'], options: []});
- done();
- });
- });
- it('should fire after hooks through the hooker module', function(done) {
- cordova.raw.emulate('android').then(function() {
- expect(fire).toHaveBeenCalledWith('after_emulate', {verbose: false, platforms:['android'], options: []});
- done();
- });
- });
- });
-
- describe('with no platforms added', function() {
- it('should not fire the hooker', function(done) {
- list_platforms.andReturn([]);
- Q().then(cordova.raw.emulate).then(function() {
- expect('this call').toBe('fail');
- }, function(err) {
- expect(fire).not.toHaveBeenCalled();
- expect(''+err).toContain('No platforms added to this project. Please use `cordova platform add <platform>`.')
- }).fin(done);
- });
- });
- });
-});
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/.cordova/config.json
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/.cordova/config.json b/spec/fixtures/base/.cordova/config.json
deleted file mode 100644
index 662fc9d..0000000
--- a/spec/fixtures/base/.cordova/config.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "id": "org.testing",
- "name":"TestBase",
- "lib": {
- "android": {
- "uri": "/some/junk/path",
- "version": "dev",
- "id": "cordova-android-dev"
- },
- "ios": {
- "uri": "/some/junk/path",
- "version": "dev",
- "id": "cordova-ios-dev"
- },
- "wp8": {
- "uri": "/some/junk/path",
- "version": "dev",
- "id": "cordova-wp8-dev"
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/merges/.svn
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/merges/.svn b/spec/fixtures/base/merges/.svn
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/plugins/.svn
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/plugins/.svn b/spec/fixtures/base/plugins/.svn
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/config.xml
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/config.xml b/spec/fixtures/base/www/config.xml
deleted file mode 100644
index 9e7b9e0..0000000
--- a/spec/fixtures/base/www/config.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<widget id="org.testing" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
- <name>TestBase</name>
- <description>
- A sample Apache Cordova application that responds to the deviceready event.
- </description>
- <author email="dev@cordova.apache.org" href="http://cordova.io">
- Apache Cordova Team
- </author>
- <content src="index.html" />
- <access origin="*" />
- <preference name="fullscreen" value="true" />
- <preference name="webviewbounce" value="true" />
-</widget>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/css/index.css
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/css/index.css b/spec/fixtures/base/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/spec/fixtures/base/www/css/index.css
+++ /dev/null
@@ -1,115 +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.
- */
-* {
- -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
- -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
- -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
- -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
- background-color:#E4E4E4;
- background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-webkit-gradient(
- linear,
- left top,
- left bottom,
- color-stop(0, #A7A7A7),
- color-stop(0.51, #E4E4E4)
- );
- background-attachment:fixed;
- font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
- font-size:12px;
- height:100%;
- margin:0px;
- padding:0px;
- text-transform:uppercase;
- width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
- background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
- position:absolute; /* position in the center of the screen */
- left:50%;
- top:50%;
- height:50px; /* text area height */
- width:225px; /* text area width */
- text-align:center;
- padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
- margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
- /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
- .app {
- background-position:left center;
- padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
- margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
- /* offset horizontal: half of image width and text area width */
- }
-}
-
-h1 {
- font-size:24px;
- font-weight:normal;
- margin:0px;
- overflow:visible;
- padding:0px;
- text-align:center;
-}
-
-.event {
- border-radius:4px;
- -webkit-border-radius:4px;
- color:#FFFFFF;
- font-size:12px;
- margin:0px 30px;
- padding:2px 0px;
-}
-
-.event.listening {
- background-color:#333333;
- display:block;
-}
-
-.event.received {
- background-color:#4B946A;
- display:none;
-}
-
-@keyframes fade {
- from { opacity: 1.0; }
- 50% { opacity: 0.4; }
- to { opacity: 1.0; }
-}
-
-@-webkit-keyframes fade {
- from { opacity: 1.0; }
- 50% { opacity: 0.4; }
- to { opacity: 1.0; }
-}
-
-.blink {
- animation:fade 3000ms infinite;
- -webkit-animation:fade 3000ms infinite;
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/img/logo.png
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/img/logo.png b/spec/fixtures/base/www/img/logo.png
deleted file mode 100644
index 9519e7d..0000000
Binary files a/spec/fixtures/base/www/img/logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/index.html
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/index.html b/spec/fixtures/base/www/index.html
deleted file mode 100644
index bde5741..0000000
--- a/spec/fixtures/base/www/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="format-detection" content="telephone=no" />
- <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
- <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
- <link rel="stylesheet" type="text/css" href="css/index.css" />
- <title>Hello World</title>
- </head>
- <body>
- <div class="app">
- <h1>Apache Cordova</h1>
- <div id="deviceready" class="blink">
- <p class="event listening">Connecting to Device</p>
- <p class="event received">Device is Ready</p>
- </div>
- </div>
- <script type="text/javascript" src="cordova.js"></script>
- <script type="text/javascript" src="js/index.js"></script>
- <script type="text/javascript">
- app.initialize();
- </script>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/js/index.js
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/js/index.js b/spec/fixtures/base/www/js/index.js
deleted file mode 100644
index 31d9064..0000000
--- a/spec/fixtures/base/www/js/index.js
+++ /dev/null
@@ -1,49 +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.
- */
-var app = {
- // Application Constructor
- initialize: function() {
- this.bindEvents();
- },
- // Bind Event Listeners
- //
- // Bind any events that are required on startup. Common events are:
- // 'load', 'deviceready', 'offline', and 'online'.
- bindEvents: function() {
- document.addEventListener('deviceready', this.onDeviceReady, false);
- },
- // deviceready Event Handler
- //
- // The scope of 'this' is the event. In order to call the 'receivedEvent'
- // function, we must explicity call 'app.receivedEvent(...);'
- onDeviceReady: function() {
- app.receivedEvent('deviceready');
- },
- // Update DOM on a Received Event
- receivedEvent: function(id) {
- var parentElement = document.getElementById(id);
- var listeningElement = parentElement.querySelector('.listening');
- var receivedElement = parentElement.querySelector('.received');
-
- listeningElement.setAttribute('style', 'display:none;');
- receivedElement.setAttribute('style', 'display:block;');
-
- console.log('Received Event: ' + id);
- }
-};
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/base/www/spec.html
----------------------------------------------------------------------
diff --git a/spec/fixtures/base/www/spec.html b/spec/fixtures/base/www/spec.html
deleted file mode 100644
index 71f00de..0000000
--- a/spec/fixtures/base/www/spec.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <title>Jasmine Spec Runner</title>
-
- <!-- jasmine source -->
- <link rel="shortcut icon" type="image/png" href="spec/lib/jasmine-1.2.0/jasmine_favicon.png">
- <link rel="stylesheet" type="text/css" href="spec/lib/jasmine-1.2.0/jasmine.css">
- <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine.js"></script>
- <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine-html.js"></script>
-
- <!-- include source files here... -->
- <script type="text/javascript" src="js/index.js"></script>
-
- <!-- include spec files here... -->
- <script type="text/javascript" src="spec/helper.js"></script>
- <script type="text/javascript" src="spec/index.js"></script>
-
- <script type="text/javascript">
- (function() {
- var jasmineEnv = jasmine.getEnv();
- jasmineEnv.updateInterval = 1000;
-
- var htmlReporter = new jasmine.HtmlReporter();
-
- jasmineEnv.addReporter(htmlReporter);
-
- jasmineEnv.specFilter = function(spec) {
- return htmlReporter.specFilter(spec);
- };
-
- var currentWindowOnload = window.onload;
-
- window.onload = function() {
- if (currentWindowOnload) {
- currentWindowOnload();
- }
- execJasmine();
- };
-
- function execJasmine() {
- jasmineEnv.execute();
- }
- })();
- </script>
- </head>
- <body>
- <div id="stage" style="display:none;"></div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_bat/fail/fail.bat
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_bat/fail/fail.bat b/spec/fixtures/hooks_bat/fail/fail.bat
deleted file mode 100644
index a89b4c8..0000000
--- a/spec/fixtures/hooks_bat/fail/fail.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-EXIT /B 1
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_bat/test/.dotted.bat
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_bat/test/.dotted.bat b/spec/fixtures/hooks_bat/test/.dotted.bat
deleted file mode 100644
index ada7136..0000000
--- a/spec/fixtures/hooks_bat/test/.dotted.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-ECHO "Dotted files in hook dirs should not be called" > dotted_hook_should_not_fire.txt
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_bat/test/07.bat
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_bat/test/07.bat b/spec/fixtures/hooks_bat/test/07.bat
deleted file mode 100644
index a88c8c5..0000000
--- a/spec/fixtures/hooks_bat/test/07.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-rem ECHO this is script 0 in %~dp0
-ECHO b >> hooks_order.txt
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_bat/test/1.bat
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_bat/test/1.bat b/spec/fixtures/hooks_bat/test/1.bat
deleted file mode 100644
index be004c5..0000000
--- a/spec/fixtures/hooks_bat/test/1.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@ECHO OFF
-rem ECHO this is script 1 in %~dp0
-ECHO a >> hooks_order.txt
-ECHO %1 > hooks_params.txt
-node -e "console.log(JSON.stringify(process.env, null, 2))" > hooks_env.json
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_sh/fail/fail.sh
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_sh/fail/fail.sh b/spec/fixtures/hooks_sh/fail/fail.sh
deleted file mode 100755
index 379a4c9..0000000
--- a/spec/fixtures/hooks_sh/fail/fail.sh
+++ /dev/null
@@ -1 +0,0 @@
-exit 1
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_sh/test/.dotted.sh
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_sh/test/.dotted.sh b/spec/fixtures/hooks_sh/test/.dotted.sh
deleted file mode 100755
index e5fa07f..0000000
--- a/spec/fixtures/hooks_sh/test/.dotted.sh
+++ /dev/null
@@ -1 +0,0 @@
-echo "Dotted files in hook dirs should not be called" > dotted_hook_should_not_fire.txt
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_sh/test/07.sh
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_sh/test/07.sh b/spec/fixtures/hooks_sh/test/07.sh
deleted file mode 100755
index f410ee2..0000000
--- a/spec/fixtures/hooks_sh/test/07.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#echo "this is script 0 in `pwd`";
-echo b >> hooks_order.txt
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/hooks_sh/test/1.sh
----------------------------------------------------------------------
diff --git a/spec/fixtures/hooks_sh/test/1.sh b/spec/fixtures/hooks_sh/test/1.sh
deleted file mode 100755
index 892869d..0000000
--- a/spec/fixtures/hooks_sh/test/1.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#echo "this is script 1 in `pwd`";
-echo a >> hooks_order.txt
-echo $1 > hooks_params.txt
-node -e "console.log(JSON.stringify(process.env, null, 2))" > hooks_env.json
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android-lib/VERSION
----------------------------------------------------------------------
diff --git a/spec/fixtures/platforms/android-lib/VERSION b/spec/fixtures/platforms/android-lib/VERSION
deleted file mode 100644
index 15a2799..0000000
--- a/spec/fixtures/platforms/android-lib/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-3.3.0
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android-lib/framework/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/spec/fixtures/platforms/android-lib/framework/assets/www/cordova.js b/spec/fixtures/platforms/android-lib/framework/assets/www/cordova.js
deleted file mode 100644
index 91c51fc..0000000
--- a/spec/fixtures/platforms/android-lib/framework/assets/www/cordova.js
+++ /dev/null
@@ -1 +0,0 @@
-This is a placeholder file.
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/spec/fixtures/platforms/android/AndroidManifest.xml b/spec/fixtures/platforms/android/AndroidManifest.xml
deleted file mode 100644
index be3f245..0000000
--- a/spec/fixtures/platforms/android/AndroidManifest.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="org.testing" xmlns:android="http://schemas.android.com/apk/res/android">
- <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
- <uses-permission android:name="android.permission.INTERNET" />
- <application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="TestBase" android:theme="@android:style/Theme.Black.NoTitleBar">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
- <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17" />
-</manifest>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b51e1c12/spec/fixtures/platforms/android/assets/www/config.xml
----------------------------------------------------------------------
diff --git a/spec/fixtures/platforms/android/assets/www/config.xml b/spec/fixtures/platforms/android/assets/www/config.xml
deleted file mode 100644
index 9e7b9e0..0000000
--- a/spec/fixtures/platforms/android/assets/www/config.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<widget id="org.testing" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
- <name>TestBase</name>
- <description>
- A sample Apache Cordova application that responds to the deviceready event.
- </description>
- <author email="dev@cordova.apache.org" href="http://cordova.io">
- Apache Cordova Team
- </author>
- <content src="index.html" />
- <access origin="*" />
- <preference name="fullscreen" value="true" />
- <preference name="webviewbounce" value="true" />
-</widget>