[CB-4268] [BlackBerry10] Remove custom BB run logic (moving to cordova-blackberry)
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/f2d699d7 Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/f2d699d7 Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/f2d699d7 Branch: refs/heads/plugman-registry Commit: f2d699d748dbe9d2f9581014ce29f753efca7748 Parents: 9156cfc Author: Bryan Higgins <[email protected]> Authored: Tue Jul 16 09:45:29 2013 -0400 Committer: Fil Maj <[email protected]> Committed: Tue Jul 16 14:49:07 2013 -0700 ---------------------------------------------------------------------- spec/run.spec.js | 21 --------------------- src/run.js | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f2d699d7/spec/run.spec.js ---------------------------------------------------------------------- diff --git a/spec/run.spec.js b/spec/run.spec.js index 02cf21d..5d16dfd 100644 --- a/spec/run.spec.js +++ b/spec/run.spec.js @@ -54,15 +54,6 @@ describe('run command', function() { cordova.run(); }).toThrow('Current working directory is not a Cordova-based project.'); }); - it('should throw if no BlackBerry simulator targets exist and blackberry is to be rund', function() { - var bb_project = path.join(project_dir, 'platforms', 'blackberry'); - spyOn(platforms.blackberry, 'parser').andReturn({ - has_device_target:function() { return false; } - }); - expect(function() { - cordova.run('blackberry'); - }).toThrow('No BlackBerry device targets defined. If you want to run `run` with BB10, please add a device target. For more information run "' + path.join(bb_project, 'cordova', 'target') + '" -h'); - }); }); describe('success', function() { @@ -74,18 +65,6 @@ describe('run command', function() { done(); }); }); - it('should execute a different BlackBerry-specific command to run blackberry', function() { - var bb_project = path.join(project_dir, 'platforms', 'blackberry'); - spyOn(platforms.blackberry, 'parser').andReturn({ - has_device_target:function() { return true; }, - get_device_targets:function() { return [{name:'fifi'}]; }, - get_cordova_config:function() { return {signing_password:'secret'}; } - }); - expect(function() { - cordova.run('blackberry'); - expect(exec.mostRecentCall.args[0]).toMatch(/blackberry.cordova.run" --target=fifi -k secret/gi); - }).not.toThrow(); - }); }); describe('hooks', function() { http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f2d699d7/src/run.js ---------------------------------------------------------------------- diff --git a/src/run.js b/src/run.js index 4110e1b..4bca403 100644 --- a/src/run.js +++ b/src/run.js @@ -28,7 +28,7 @@ var cordova_util = require('./util'), function shell_out_to_run(projectRoot, platform, error_callback, done) { var cmd = '"' + path.join(projectRoot, 'platforms', platform, 'cordova', 'run') + '" --device'; // TODO: inconsistent API for BB10 run command - if (platform == 'blackberry') { +/* if (platform == 'blackberry') { var bb_project = path.join(projectRoot, 'platforms', 'blackberry') var project = new platforms.blackberry.parser(bb_project); if (project.has_device_target()) { @@ -41,7 +41,7 @@ function shell_out_to_run(projectRoot, platform, error_callback, done) { else throw err; } } - +*/ events.emit('log', 'Running app on platform "' + platform + '" with command "' + cmd + '" (output to follow)...'); shell.exec(cmd, {silent:true, async:true}, function(code, output) { events.emit('log', output);
