[GitHub] cordova-plugin-file-transfer issue #141: CB-10974 Cordova file transfer Cont...
Github user royipr commented on the issue: https://github.com/apache/cordova-plugin-file-transfer/pull/141 @daserge Acourding to the response it does attach Transfer-Encoding header. Is there a way to print the headers? I didn't saw them on `adb logcat`. Maybe the problem is here? : https://github.com/apache/cordova-plugin-file-transfer/commit/9347606dd33fe07ea36799b4dd28804019c68835#diff-2a8a5fef3397df87ab538f028a5c6b50R1506 Maybe we should expect that the header will be undefined? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
Nightly build #190 for cordova has succeeded!
Nightly build #190 for cordova has succeeded! The latest nightly has been published and you can try it out with 'npm i -g cordova@nightly' For details check build console at https://builds.apache.org/job/cordova-nightly/190/consoleFull - Jenkins for Apache Cordova - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera issue #239: CB-12005: (android) Fix picture orientatio...
Github user joshgarwood commented on the issue: https://github.com/apache/cordova-plugin-camera/pull/239 When do we expect this to be merged and available? It's a great change that will help the flow of taking pictures :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera issue #220: Fix Android bug in permission requests
Github user joshgarwood commented on the issue: https://github.com/apache/cordova-plugin-camera/pull/220 When do we expect this to be merged and available? It's a great change that will help the flow of taking pictures :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85018233 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84999160 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85015269 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85012246 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85014503 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85012170 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010504 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); --- End diff -- done! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85013772 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85018072 --- Diff: cordova-lib/spec-cordova/pkgJson.spec.js --- @@ -0,0 +1,348 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// This group of tests checks if plugins are added and removed as expected from package.json. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('plugin_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +it('Test#001 : should successfully add and remove a plugin with save', function(done) { +var pkgJsonPath = path.join(process.cwd(),'package.json'); +var pkgJson; + +expect(pkgJsonPath).toExist(); + +// Add the plugin with --save +return cordova.raw.plugin('add', pluginId, {'save':true}) +.then(function() { +// Check that the plugin add was successful. +delete require.cache[require.resolve(pkgJsonPath)]; +pkgJson = require(pkgJsonPath); +expect(pkgJson).not.toBeUndefined(); +expect(pkgJson.cordova.plugins).not.toBeUndefined(); +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85011439 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r8503 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85011190 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010911 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85015289 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85012879 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010828 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85012532 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85011010 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84999093 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85015369 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85011274 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010510 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. --- End diff -- done! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010529 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { --- End diff -- done! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85001497 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85010730 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); --- End diff -- Done.. not needed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85011104 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
Re: [Vote] Tools Release
The vote has now closed. The results are: Positive Binding Votes: 3 Steve Gill Shazron Abdullah Jesse MacFadyen The vote has passed. On Tue, Oct 25, 2016 at 10:22 AM, Jessewrote: > +1 > > - coho audit-license-headers > - coho verify-archive > - coho check-license > > > > > @purplecabbage > risingj.com > > On Mon, Oct 24, 2016 at 1:10 PM, Shazron wrote: > > > I vote +1: > > * Ran coho audit-license-headers over the relevant repos > > * Ran coho check-license to ensure all dependencies and > > subdependencies have Apache-compatible licenses > > * Ran through unit tests > > > > On Sat, Oct 22, 2016 at 7:34 PM, Steven Gill > > wrote: > > > > > Please review and vote on this Tools Release > > > by replying to this email (and keep discussion on the DISCUSS thread) > > > > > > Release issue: https://issues.apache.org/jira/browse/CB-12039 > > > > > > Both tools have been published to > > > dist/dev:https://dist.apache.org/repos/dist/dev/cordova/CB-12039/ > > > > > > The packages were published from their corresponding git tags: > > > > > > cordova-js: 4.2.0 (aba2abab35) > > > cordova-lib: 6.4.0 (cad6496048) > > > cordova-plugman: 1.4.0 (4bda8aea89) > > > cordova-cli: 6.4.0 (9828db2c6e) > > > > > > Upon a successful vote I will upload the archives to dist/, publish > > > them to npm, and post the corresponding blog post. > > > > > > Voting guidelines: > > > https://github.com/apache/cordova-coho/blob/master/docs/ > > release-voting.md > > > > > > Voting will go on for a minimum of 48 hours. > > > > > > I vote +1: > > > * Ran coho audit-license-headers over the relevant repos > > > * Ran coho check-license to ensure all dependencies and > > > subdependencies have Apache-compatible licenses > > > * Ran through testing procedures. > > > > > >
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84996266 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84996343 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. --- End diff -- reference package.json --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84994538 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); --- End diff -- rename this to `plugin_test_pkgjson` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84994925 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); --- End diff -- for plugin tests, this probably isn't needed --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85001631 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85000290 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84999753 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84995508 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85002184 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84999589 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { --- End diff -- Delete emptyPluginList and fullPluginList since you aren't using them --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85002357 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85001447 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84997203 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84999210 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84995973 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r85002140 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84995444 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84998011 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84997761 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84997132 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
[GitHub] cordova-lib pull request #499: Cb 11960
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/499#discussion_r84997032 --- Diff: cordova-lib/spec-cordova/package.json.spec.js --- @@ -0,0 +1,389 @@ +/** +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'), +superspawn = require('cordova-common').superspawn, +Q = require('q'), +events = require('cordova-common').events, +cordova = require('../src/cordova/cordova'), +rewire = require('rewire'), +prepare = require('../src/cordova/prepare'), +platforms = require('../src/platforms/platforms'), +platform = rewire('../src/cordova/platform.js'); + +var projectRoot = 'C:\\Projects\\cordova-projects\\move-tracker'; +var pluginsDir = path.join(__dirname, 'fixtures', 'plugins'); + +function addPlugin(target, id, options) { +// Checks that there are no plugins yet. +return cordova.raw.plugin('list').then(function() { +expect(results).toMatch(/No plugins added/gi); +}).then(function() { +// Adds a fake plugin from fixtures. +return cordova.raw.plugin('add', target, options); +}).then(function() { +expect(path.join(project, 'plugins', id, 'plugin.xml')).toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toContain(id); +}); +} +// Runs: remove, list. +function removePlugin(id, options) { +return cordova.raw.plugin('rm', id) +.then(function() { +// The whole dir should be gone. +expect(path.join(project, 'plugins', id)).not.toExist(); +}).then(function() { +return cordova.raw.plugin('ls'); +}).then(function() { +expect(results).toMatch(/No plugins added/gi); +}); +} +// Checks if plugin list is empty. +function emptyPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBe(-1); +}); +} +// Checks if plugin list exists. +function fullPluginList() { +return cordova.raw.plugin('list').then(function() { +var installed = results.match(/Installed plugins:\n (.*)/); +expect(installed).toBeDefined(); +expect(installed[1].indexOf('fake-plugin')).toBeGreaterThan(-1); +}); +} + +// This group of tests checks if plugins are added and removed as expected. +describe('plugin end-to-end', function() { +var pluginId = 'cordova-plugin-device'; +var tmpDir = helpers.tmpDir('platform_test_pkgjson'); +var project = path.join(tmpDir, 'project'); +var results; + +events.on('results', function(res) { results = res; }); + +beforeEach(function() { +shell.rm('-rf', project); + +// Copy then move because we need to copy everything, but that means it will copy the whole directory. +// Using /* doesn't work because of hidden files. +shell.cp('-R', path.join(__dirname, 'fixtures', 'basePkgJson'), tmpDir); +shell.mv(path.join(tmpDir, 'basePkgJson'), project); +// Copy some platform to avoid working on a project with no platforms. +shell.cp('-R', path.join(__dirname, 'fixtures', 'platforms', helpers.testPlatform), path.join(project, 'platforms')); +process.chdir(project); + +delete process.env.PWD; + +spyOn(prepare, 'preparePlatforms').andCallThrough(); +}); + +afterEach(function() { +process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows. +shell.rm('-rf', tmpDir); +}); + +
Re: Nightly build #189 for cordova has succeeded!
Thanks for the update! On Tue, Oct 25, 2016 at 1:27 AM, Vladimir Kotikov (Akvelon) < v-vlk...@microsoft.com> wrote: > Hey all, just wanted to let you know that I have removed all testing logic > from 'coho nightly'. > IMO it was non-reliable due to multiple problems witn node/npm environment > and linking. Also we already test all our packages on continuous basis, so > additional test runs don't have any real profit for us. > > - > Best regards, Vladimir > > -Original Message- > From: Apache Jenkins Server [mailto:jenk...@builds.apache.org] > Sent: Tuesday, October 25, 2016 11:12 AM > To: Vladimir Kotikov (Akvelon); > dev@cordova.apache.org > Subject: Nightly build #189 for cordova has succeeded! > > Nightly build #189 for cordova has succeeded! > The latest nightly has been published and you can try it out with 'npm i > -g cordova@nightly' > > For details check build console at https://na01.safelinks. > protection.outlook.com/?url=https%3A%2F%2Fbuilds.apache. > org%2Fjob%2Fcordova-nightly%2F189%2FconsoleFull=02% > 7C01%7Cv-vlkoti%40microsoft.com%7Ced10168bac8e4fbcd4e308d3fcae934d% > 7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636129799134488080=r% > 2FGtFNPNzUL6Rjn1CFmb4NEihQfB81DJKvCYULQJ%2Fys%3D=0 > > - > Jenkins for Apache Cordova > > - > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > For additional commands, e-mail: dev-h...@cordova.apache.org >
[GitHub] cordova-docs pull request #655: CB-12054 - Cordova iOS 4.3.0 release announc...
Github user asfgit closed the pull request at: https://github.com/apache/cordova-docs/pull/655 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-file-transfer issue #141: CB-10974 Cordova file transfer Cont...
Github user daserge commented on the issue: https://github.com/apache/cordova-plugin-file-transfer/pull/141 @royipr - does it attach `Transfer-Encoding` for `chunkedMode: false`? It should do the opposite according to [the code](https://github.com/apache/cordova-plugin-file-transfer/blob/2b6b6d9333848beb05a6128242701261467b5d69/src/android/FileTransfer.java#L440). Does switching to `chunkedMode: true` fix the issue? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-file-transfer issue #141: CB-10974 Cordova file transfer Cont...
Github user royipr commented on the issue: https://github.com/apache/cordova-plugin-file-transfer/pull/141 Hi. I think I found a bug regarding the issue.. When trying to upload a file with `chuckedMode: false` it seems to attach a `Transfer-Encoding` header by default. This causes to upload to aws s3 to fail: `Message>A header you provided implies functionality that is not implementedTransfer-Encoding` Take a look a this issue http://stackoverflow.com/questions/39780922/cordova-file-transfer-to-s3-aws-returns-501-error --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-docs issue #655: CB-12054 - Cordova iOS 4.3.0 release announcement
Github user kerrishotts commented on the issue: https://github.com/apache/cordova-docs/pull/655 LGTM :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
Re: [DISCUSS] Cordova-Windows Release
4.4.3 @purplecabbage risingj.com On Thu, Oct 20, 2016 at 6:02 PM, Steven Gillwrote: > What version? 4.5.0? > > On Wed, Oct 19, 2016 at 4:46 PM, Jesse wrote: > > > Ship it! > > > > > > @purplecabbage > > risingj.com > > > > On Wed, Oct 19, 2016 at 3:33 PM, Steven Gill > > wrote: > > > > > Do it! > > > > > > On Tue, Oct 18, 2016 at 7:19 AM, Sergey Shakhnazarov (Akvelon) < > > > v-ses...@microsoft.com> wrote: > > > > > > > Does anyone have any reason to delay a cordova-windows platform > > release? > > > > Any outstanding patches to land? > > > > > > > > If not, I will start the release tomorrow. > > > > > > > > Best regards, > > > > Sergey Shakhnazarov. > > > > > > > > > > > > > > > > > >
Re: [Vote] Tools Release
+1 - coho audit-license-headers - coho verify-archive - coho check-license @purplecabbage risingj.com On Mon, Oct 24, 2016 at 1:10 PM, Shazronwrote: > I vote +1: > * Ran coho audit-license-headers over the relevant repos > * Ran coho check-license to ensure all dependencies and > subdependencies have Apache-compatible licenses > * Ran through unit tests > > On Sat, Oct 22, 2016 at 7:34 PM, Steven Gill > wrote: > > > Please review and vote on this Tools Release > > by replying to this email (and keep discussion on the DISCUSS thread) > > > > Release issue: https://issues.apache.org/jira/browse/CB-12039 > > > > Both tools have been published to > > dist/dev:https://dist.apache.org/repos/dist/dev/cordova/CB-12039/ > > > > The packages were published from their corresponding git tags: > > > > cordova-js: 4.2.0 (aba2abab35) > > cordova-lib: 6.4.0 (cad6496048) > > cordova-plugman: 1.4.0 (4bda8aea89) > > cordova-cli: 6.4.0 (9828db2c6e) > > > > Upon a successful vote I will upload the archives to dist/, publish > > them to npm, and post the corresponding blog post. > > > > Voting guidelines: > > https://github.com/apache/cordova-coho/blob/master/docs/ > release-voting.md > > > > Voting will go on for a minimum of 48 hours. > > > > I vote +1: > > * Ran coho audit-license-headers over the relevant repos > > * Ran coho check-license to ensure all dependencies and > > subdependencies have Apache-compatible licenses > > * Ran through testing procedures. > > >
RE: [DISCUSS] Cordova-Windows Release
Hi guys, could you please review the blog post? https://github.com/apache/cordova-docs/pull/652/files Best regards, Sergey Shakhnazarov. -Original Message- From: Sergey Shakhnazarov (Akvelon) [mailto:v-ses...@microsoft.com] Sent: Friday, October 21, 2016 09:23 To: dev@cordova.apache.org Subject: RE: [DISCUSS] Cordova-Windows Release Этот отправитель не прошел проверки на мошенничество, и мы не можем подтвердить его личность. Сведения о спуфинге см. по ссылке http://aka.ms/LearnAboutSpoofing 4.4.3 I'll omit CB-11836 Allow setting of 'ForegroundText' property via config.xml (https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fcordova-windows%2Fcommit%2F10796b28a5bf4c0963b4f2eee1e63909ab215686=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376772574=F61mzj2kvnm22OFhfRYyQfJ5a%2FVH3CBSYBAFaPhflFk%3D=0) to avoid minor bump as we need some fixes to be taken by current tools version. Release notes would be the following: ### 4.4.3 (Oct 19, 2016) * [CB-12044](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-12044=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376772574=MQOhyHfXPeYm7xSJZUZhbetW1EUNugI%2BvfLJBsTlJkw%3D=0) Fix splashscreen image path for ms-appx on Windows * [CB-12042](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-12042=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376772574=FxRwcDJW3ZjQr8SYRrTacyFtasF8CI52zGxRUGFS8Jo%3D=0) Copy base.js to www directory at create * [CB-11933](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11933=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=qm9A4pZMcwUSBoPkhYu9yo6BADc0aB3MhMhTUjyfe0g%3D=0) Add uap prefixes for capabilities at plugin install * [CB-12003](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-12003=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=SXeXULN7fSM5rRcoQkyBe58fd5kzG8b8jc%2FDsWlEmfQ%3D=0) updated node_modules * [CB-11933](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11933=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=qm9A4pZMcwUSBoPkhYu9yo6BADc0aB3MhMhTUjyfe0g%3D=0) Remove capabilities from manifest * [CB-11993](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11993=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=IivTCkiHSoMWxTsxnDlAiXZdK395qLD5cPWXwlEen5M%3D=0) - windows platform doesn't test all node versions on appveyor and travis * [CB-11825](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11825=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=i38RdH2K2%2BwYjwTUSNf2VFPNQYgZvjsKPO930vBNr8w%3D=0) Windows dll file won't be copied as resource while adding custom plugin to a UWP project * output message, catch exception if require fails, change eventEmitter to events to be consistent with ios+android * [CB-11922](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11922=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=TgPxHgtZRcTbor4FnJEsFOJy3JzOrxmNd3hZ5X4gkRE%3D=0) - Add github pull request template * [CB-11522](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11522=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=%2FB8%2BsdY%2F8Z%2FFtIbmULUI2B2SzWMvc6P3K520ijKWe9w%3D=0) [windows] Make cordova-js handle 'unknown' type * [CB-11857](https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FCB-11857=02%7C01%7Cv-seshak%40microsoft.com%7C1191c1c613b94ea5eb7e08d3f97ad45e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636126278376782582=b7mxwHd0axKCu0KlDAqztWFnPRpEZeb1v8CyHtjCD%2Fg%3D=0) Fixed VS 2015 detection on Windows 10 Anniversary *
[GitHub] cordova-plugin-splashscreen issue #117: CB-12062: (ios) Fix crash when liste...
Github user cordova-qa commented on the issue: https://github.com/apache/cordova-plugin-splashscreen/pull/117 Cordova CI Build has one or more failures. **Commit** - [Link](https://github.com/apache/cordova-plugin-splashscreen/pull/117/commits/58044c7b16ab84652b0545e19b1cdc8636d83c51) **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30/) | Builder Name | Console Output | Test Report | Device Logs | | :---: | :---: | :---: | :---:| | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-store/artifact/) | | [Windows 10 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-10-store/artifact/) | | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=windows-8.1-phone/artifact/) | | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=ios/artifact/) | | [Android]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-splashscreen-pr/30//PLATFORM=android/artifact/) | --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-splashscreen pull request #117: CB-12062: (ios) Fix crash whe...
GitHub user PaulTaykalo opened a pull request: https://github.com/apache/cordova-plugin-splashscreen/pull/117 CB-12062: (ios) Fix crash when listening for KVO changes for deallocated object ### Platforms affected ios ### What does this PR do? Fix crash when listening for KVO changes for deallocated object ### What testing has been done on this change? Tests aded ### Checklist - â [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - â Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - â Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/PaulTaykalo/cordova-plugin-splashscreen fix/kvo-crashing-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-splashscreen/pull/117.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #117 commit 58044c7b16ab84652b0545e19b1cdc8636d83c51 Author: Paul TaykaloDate: 2016-10-25T14:49:05Z Fix crash when listening for KVO changes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
RE: [Vote] 4.4.3 Windows Release
I vote +1. * Verified archives via `coho verify-archive` * Verified tags manually * Verified that blank app creates correctly with platform * Verified that blank app can be successfully built and ran * Verified that platform can be updated from previous version * Verified compatibility with core plugins * Verified release notes * Verified version * Verified line breaks -- Alexander Sorokin -Original Message- From: Jesse [mailto:purplecabb...@gmail.com] Sent: Tuesday, October 25, 2016 3:17 AM To: dev@cordova.apache.org Subject: Re: [Vote] 4.4.3 Windows Release I vote +1 * Ran coho verify-archive * Ran coho audit-license-headers * Ran coho check-license * Ensured continuous build was green when repo was tagged * ran npm install && npm run cover * created a test app, added platform and ran it successfully @purplecabbage risingj.com On Mon, Oct 24, 2016 at 2:04 PM, Shazronwrote: > I vote +1: > * Ran coho audit-license-headers over the relevant repos > * Ran coho check-license to ensure all dependencies and > subdependencies have Apache-compatible licenses > * Ensured continuous build was green when repo was tagged > * ran npm install && npm run cover > > On Mon, Oct 24, 2016 at 8:49 AM, Sergey Shakhnazarov (Akvelon) < > v-ses...@microsoft.com> wrote: > > > Please review and vote on this 4.4.3 Windows Release by replying to > > this email (and keep discussion on the DISCUSS thread) > > > > Release issue: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fiss > > ues.apache.org%2Fjira%2Fbrowse%2FCB-12031=02%7C01%7Cv-alsoro%40 > > microsoft.com%7Cc7aca0301e4749d06b2b08d3fc6c3604%7C72f988bf86f141af9 > > 1ab2d7cd011db47%7C1%7C0%7C636129514127649863=K21Jf2KGioKKbMrBW > > LmBo3lhQEqROiMJ%2BCTNoV0ABP0%3D=0 > > > > The archive has been published to dist/dev: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdis > > t.apache.org%2Frepos%2Fdist%2Fdev%2Fcordova%2FCB-12031=02%7C01% > > 7Cv-alsoro%40microsoft.com%7Cc7aca0301e4749d06b2b08d3fc6c3604%7C72f9 > > 88bf86f141af91ab2d7cd011db47%7C1%7C0%7C636129514127649863=1yH3 > > caL6h%2Bc2tVqQLs5qZei7%2BgaeeNbPHU%2FRgwF70r4%3D=0 > > > > The package was published from its corresponding git tag: > > cordova-windows: 4.4.3 (1299ade53c) > > > > Note that you can test it out via: > > > > cordova platform add > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit > > hub.com%2Fapache%2Fcordova-windows%234.4.3=02%7C01%7Cv-alsoro%4 > > 0microsoft.com%7Cc7aca0301e4749d06b2b08d3fc6c3604%7C72f988bf86f141af > > 91ab2d7cd011db47%7C1%7C0%7C636129514127649863=o%2FBR48VDunnmQh > > %2BT%2FY4XVIoaU5JbayqZ7GjxI5pIe3Q%3D=0 > > > > Upon a successful vote I will upload the archive to dist/, publish > > it to npm, and post the blog post. > > > > Voting guidelines: > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit > > hub.com%2Fapache%2F=02%7C01%7Cv-alsoro%40microsoft.com%7Cc7aca0 > > 301e4749d06b2b08d3fc6c3604%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C > > 0%7C636129514127649863=jlChTnKPwJsiuj1Y%2FNsF6EbCWJCP9FRyYOdPB > > OakFL0%3D=0 cordova-coho/blob/master/docs/release-voting.md > > > > Voting will go on for a minimum of 48 hours. > > > > I vote +1: > > * Ran coho audit-license-headers over the relevant repos > > * Ran coho check-license to ensure all dependencies and > > subdependencies have Apache-compatible licenses > > * Ensured continuous build was green when repo was tagged > > > > * Ensured that all tests pass > > > > * Created, built and ran mobilespec app > > > > * Tested create and update scenarios via platform scripts and > > cordova-cli > > > > Please let me know if you have any questions or considerations. > > > > Best regards, > > Sergey Shakhnazarov. > > > > > > >
[GitHub] cordova-docs pull request #650: CB-11924 Share target: sharing to cordova ap...
Github user asfgit closed the pull request at: https://github.com/apache/cordova-docs/pull/650 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
RE: Nightly build #189 for cordova has succeeded!
Hey all, just wanted to let you know that I have removed all testing logic from 'coho nightly'. IMO it was non-reliable due to multiple problems witn node/npm environment and linking. Also we already test all our packages on continuous basis, so additional test runs don't have any real profit for us. - Best regards, Vladimir -Original Message- From: Apache Jenkins Server [mailto:jenk...@builds.apache.org] Sent: Tuesday, October 25, 2016 11:12 AM To: Vladimir Kotikov (Akvelon); dev@cordova.apache.org Subject: Nightly build #189 for cordova has succeeded! Nightly build #189 for cordova has succeeded! The latest nightly has been published and you can try it out with 'npm i -g cordova@nightly' For details check build console at https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbuilds.apache.org%2Fjob%2Fcordova-nightly%2F189%2FconsoleFull=02%7C01%7Cv-vlkoti%40microsoft.com%7Ced10168bac8e4fbcd4e308d3fcae934d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636129799134488080=r%2FGtFNPNzUL6Rjn1CFmb4NEihQfB81DJKvCYULQJ%2Fys%3D=0 - Jenkins for Apache Cordova - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
Nightly build #189 for cordova has succeeded!
Nightly build #189 for cordova has succeeded! The latest nightly has been published and you can try it out with 'npm i -g cordova@nightly' For details check build console at https://builds.apache.org/job/cordova-nightly/189/consoleFull - Jenkins for Apache Cordova - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org