cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/3] git commit: CB-7001: Create a --browserify option for run action
Date Mon, 04 Aug 2014 22:53:16 GMT
CB-7001: Create a --browserify option for run action


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/34f53d2e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/34f53d2e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/34f53d2e

Branch: refs/heads/master
Commit: 34f53d2e68ac77c3ab81c5a586cbf09735eba142
Parents: 44adcf9
Author: Suraj Pindoria <suraj.pindoria@yahoo.com>
Authored: Tue Jul 29 17:18:05 2014 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Mon Aug 4 15:52:13 2014 -0700

----------------------------------------------------------------------
 cordova-lib/spec-cordova/run.spec.js | 4 ++--
 cordova-lib/src/cordova/run.js       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/34f53d2e/cordova-lib/spec-cordova/run.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/run.spec.js b/cordova-lib/spec-cordova/run.spec.js
index 82e6a69..ec33f0f 100644
--- a/cordova-lib/spec-cordova/run.spec.js
+++ b/cordova-lib/spec-cordova/run.spec.js
@@ -64,7 +64,7 @@ describe('run command', function() {
     describe('success', function() {
         it('should run inside a Cordova-based project with at least one added platform and
call prepare and shell out to the run script', function(done) {
             cordova.raw.run(['android','ios']).then(function() {
-                expect(prepare_spy).toHaveBeenCalledWith(['android', 'ios']);
+                expect(prepare_spy).toHaveBeenCalledWith({ platforms: [ 'android', 'ios'
], verbose: false, options: [] });
                 expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms',
'android', 'cordova', 'run'), [], jasmine.any(Object));
                 expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms',
'ios', 'cordova', 'run'), [], jasmine.any(Object));
             }, function(err) {
@@ -73,7 +73,7 @@ describe('run command', function() {
         });
         it('should pass down parameters', function(done) {
             cordova.raw.run({platforms: ['blackberry10'], options:['--password', '1q1q']}).then(function()
{
-                expect(prepare_spy).toHaveBeenCalledWith(['blackberry10']);
+                expect(prepare_spy).toHaveBeenCalledWith({ platforms: [ 'blackberry10' ],
options: [ '--password', '1q1q' ], verbose: false });
                 expect(superspawn.spawn).toHaveBeenCalledWith(path.join(project_dir, 'platforms',
'blackberry10', 'cordova', 'run'), ['--password', '1q1q'], jasmine.any(Object));
             }, function(err) {
                 expect(err).toBeUndefined();

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/34f53d2e/cordova-lib/src/cordova/run.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/run.js b/cordova-lib/src/cordova/run.js
index f1debb6..8ccdb38 100644
--- a/cordova-lib/src/cordova/run.js
+++ b/cordova-lib/src/cordova/run.js
@@ -36,7 +36,7 @@ module.exports = function run(options) {
     return hooks.fire('before_run', options)
     .then(function() {
         // Run a prepare first, then shell out to run
-        return require('./cordova').raw.prepare(options.platforms);
+        return require('./cordova').raw.prepare(options);
     }).then(function() {
         // Deploy in parallel (output gets intermixed though...)
         return Q.all(options.platforms.map(function(platform) {


Mime
View raw message