Nightly build #427 for cordova has succeeded!
Nightly build #427 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/427/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-lib pull request #573: CB-12361 : updated addHelper tests
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127110528 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-plugin-screen-orientation issue #15: fix(plugin): add es6-promise-pl...
Github user fishgrind commented on the issue: https://github.com/apache/cordova-plugin-screen-orientation/pull/15 @alsorokin tried and works! Thanks! --- 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 #573: CB-12361 : updated addHelper tests
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127066391 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-lib pull request #573: CB-12361 : updated addHelper tests
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127055093 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-lib pull request #573: CB-12361 : updated addHelper tests
Github user purplecabbage commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127039183 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock();
[GitHub] cordova-lib pull request #573: CB-12361 : updated addHelper tests
Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127032404 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-android issue #389: CB-11244: Studio Project Compatibility: Now with...
Github user filmaj commented on the issue: https://github.com/apache/cordova-android/pull/389 Yes, seriously, because the code interpolates activity name / package name / etc. into hard-coded paths! --- 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-android issue #389: CB-11244: Studio Project Compatibility: Now with...
Github user infil00p commented on the issue: https://github.com/apache/cordova-android/pull/389 @filmaj Hard copied paths? SRSLY? --- 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 #573: CB-12361 : updated addHelper tests
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127008421 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-lib pull request #573: CB-12361 : updated addHelper tests
Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/573#discussion_r127007878 --- Diff: spec/cordova/platform/addHelper.spec.js --- @@ -16,34 +16,439 @@ */ /* eslint-env jasmine */ +var path = require('path'); +var fs = require('fs'); +var Q = require('q'); +var shell = require('shelljs'); +var events = require('cordova-common').events; +var rewire = require('rewire'); +var platform_addHelper = rewire('../../../src/cordova/platform/addHelper'); +var platform_module = require('../../../src/cordova/platform'); +var platform_metadata = require('../../../src/cordova/platform_metadata'); +var cordova_util = require('../../../src/cordova/util'); +var cordova_config = require('../../../src/cordova/config'); +var plugman = require('../../../src/plugman/plugman'); +var fetch_metadata = require('../../../src/plugman/util/metadata'); +var lazy_load = require('../../../src/cordova/lazy_load'); +var prepare = require('../../../src/cordova/prepare'); +var gitclone = require('../../../src/gitclone'); +var fail; + describe('cordova/platform/addHelper', function () { +var projectRoot = '/some/path'; +// These _mock and _revert_mock objects use rewire as the modules these mocks replace +// during testing all return functions, which we cannot spy on using jasmine. +// Thus, we replace these modules inside the scope of addHelper.js using rewire, and shim +// in these _mock test dummies. The test dummies themselves are constructed using +// jasmine.createSpy inside the first beforeEach. +var cfg_parser_mock = function () {}; +var cfg_parser_revert_mock; +var hooks_mock; +var platform_api_mock; +var fetch_mock; +var fetch_revert_mock; +var prepare_mock; +var prepare_revert_mock; +var fake_platform = { +'platform': 'atari' +}; +var package_json_mock; +package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 'dependencies']); +package_json_mock.dependencies = {}; +package_json_mock.cordova = {}; + +beforeEach(function () { +hooks_mock = jasmine.createSpyObj('hooksRunner mock', ['fire']); +hooks_mock.fire.and.returnValue(Q()); +cfg_parser_mock.prototype = jasmine.createSpyObj('config parser mock', ['write', 'removeEngine', 'addEngine', 'getHookScripts']); +cfg_parser_revert_mock = platform_addHelper.__set__('ConfigParser', cfg_parser_mock); +fetch_mock = jasmine.createSpy('fetch mock').and.returnValue(Q()); +fetch_revert_mock = platform_addHelper.__set__('fetch', fetch_mock); +prepare_mock = jasmine.createSpy('prepare mock').and.returnValue(Q()); +prepare_mock.preparePlatforms = jasmine.createSpy('preparePlatforms mock').and.returnValue(Q()); +prepare_revert_mock = platform_addHelper.__set__('prepare', prepare_mock); +spyOn(shell, 'mkdir'); +spyOn(fs, 'existsSync').and.returnValue(false); +spyOn(fs, 'writeFileSync'); +spyOn(cordova_util, 'projectConfig').and.returnValue(path.join(projectRoot, 'config.xml')); +spyOn(cordova_util, 'isDirectory').and.returnValue(false); +spyOn(cordova_util, 'fixRelativePath').and.callFake(function (input) { return input; }); +spyOn(cordova_util, 'isUrl').and.returnValue(false); +spyOn(cordova_util, 'hostSupports').and.returnValue(true); +spyOn(cordova_util, 'removePlatformPluginsJson'); +spyOn(cordova_config, 'read').and.returnValue({}); +spyOn(events, 'emit'); +// Fake platform details we will use for our mocks, returned by either +// getPlatfromDetailsFromDir (in the local-directory case), or +// downloadPlatform (in every other case) +spyOn(platform_module, 'getPlatformDetailsFromDir').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'downloadPlatform').and.returnValue(Q(fake_platform)); +spyOn(platform_addHelper, 'getVersionFromConfigFile').and.returnValue(false); +spyOn(platform_addHelper, 'installPluginsForNewPlatform').and.returnValue(Q()); +platform_api_mock = jasmine.createSpyObj('platform api mock', ['createPlatform', 'updatePlatform']); +platform_api_mock.createPlatform.and.returnValue(Q()); +platform_api_mock.updatePlatform.and.returnValue(Q()); +spyOn(cordova_util, 'getPlatformApiFunction').and.returnValue(platform_api_mock); +spyOn(platform_metadata, 'save'); +spyOn(cordova_util, 'requireNoCache').and.returnValue({}); +}); +afterEach(function () { +cfg_parser_revert_mock(); +
[GitHub] cordova-plugin-file-transfer pull request #184: CB-13017 (android) Added pro...
GitHub user dracorlll opened a pull request: https://github.com/apache/cordova-plugin-file-transfer/pull/184 CB-13017 (android) Added proxy option in download method ### Platforms affected Android ### What does this PR do? Download files with proxies ### What testing has been done on this change? on Emulator and Sony Xperia phone it works ### 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/dracorlll/cordova-plugin-file-transfer master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-file-transfer/pull/184.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 #184 commit 2fabde3352ec21cda99d2295c598516f9dee8dbc Author: Engin YükselDate: 2017-07-12T15:35:53Z CB-13017 (android) Added proxy option in download method --- 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-android pull request #394: CB-13006: replace create end-to-end tests...
Github user filmaj closed the pull request at: https://github.com/apache/cordova-android/pull/394 --- 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-ios pull request #326: CB-12940: [IOS] Use deployment-target from co...
GitHub user igormartsekha opened a pull request: https://github.com/apache/cordova-ios/pull/326 CB-12940: [IOS] Use deployment-target from config.xml for platform ve⦠â¦rsion in Podfile ### Platforms affected IOS ### What does this PR do? It's generate Podfile using `deployment-target` option from config.xml ### What testing has been done on this change? I runed test but it failed, because API.js need valid path to config.xml file. So I changed test, and set up valid path. ### Checklist - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [x] 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. - [x] 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/igormartsekha/cordova-ios master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-ios/pull/326.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 #326 commit 2997480a21f82198232dfa061f9a42c186996ed2 Author: Igor MartsekhaDate: 2017-07-12T10:11:57Z CB-12940: [IOS] Use deployment-target from config.xml for platform version in Podfile --- 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 #177: fix Chinese words error in filename
Github user feidianbo commented on the issue: https://github.com/apache/cordova-plugin-file-transfer/pull/177 @purplecabbage You can download the fowling image to check the bug: http://git.oschina.net/fdb/demo1/raw/master/é£æ¯å¾ç.jpg The above url contains the Chinese words. --- 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