cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brianler...@apache.org
Subject [11/15] js commit: build runs but tests borked
Date Wed, 11 Dec 2013 21:54:30 GMT
build runs but tests borked


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/4e0ca1c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/4e0ca1c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/4e0ca1c3

Branch: refs/heads/master
Commit: 4e0ca1c3ca27d8da2f9754d7abc9d0ee2de5232b
Parents: 31aa751
Author: brianleroux <b@brian.io>
Authored: Wed Dec 11 12:43:18 2013 +1000
Committer: brianleroux <b@brian.io>
Committed: Wed Dec 11 12:43:18 2013 +1000

----------------------------------------------------------------------
 Gruntfile.js               |  2 +-
 src/blackberry10/exec.js   |  2 +-
 src/browser/exec.js        |  2 +-
 src/browser/platform.js    |  4 ++--
 src/common/pluginloader.js |  2 +-
 tasks/lib/bundle.js        | 13 +++++++------
 tasks/lib/collect-files.js |  7 ++++---
 tasks/lib/get-module-id.js |  4 ++--
 tasks/lib/write-module.js  |  5 +++--
 tasks/lib/write-script.js  |  3 ++-
 tasks/whitespace.js        |  1 +
 test/runner.js             |  5 +++--
 12 files changed, 28 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index cced79f..e88fc9e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -38,7 +38,7 @@ module.exports = function(grunt) {
             options: {
                 jshintrc: '.jshintrc',
             },
-            src: [ 'lib/**/*.js' ]
+            src: [ 'src/**/*.js' ]
         },
     });
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/src/blackberry10/exec.js
----------------------------------------------------------------------
diff --git a/src/blackberry10/exec.js b/src/blackberry10/exec.js
index 6e896f4..e373b4a 100644
--- a/src/blackberry10/exec.js
+++ b/src/blackberry10/exec.js
@@ -80,7 +80,7 @@ module.exports = function (success, fail, service, action, args) {
                 request.addParam(name, args[name]);
             }
         }
-        
+
         response = request.makeSyncCall();
 
         if (response.code < 0) {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/src/browser/exec.js
----------------------------------------------------------------------
diff --git a/src/browser/exec.js b/src/browser/exec.js
index 130edb9..744282e 100644
--- a/src/browser/exec.js
+++ b/src/browser/exec.js
@@ -23,7 +23,7 @@ var cordova = require('cordova');
 var execProxy = require('cordova/exec/proxy');
 
 module.exports = function(success, fail, service, action, args) {
-    
+
     var proxy = execProxy.get(service, action);
 
     if (proxy) {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/src/browser/platform.js
----------------------------------------------------------------------
diff --git a/src/browser/platform.js b/src/browser/platform.js
index fb30eea..8015cef 100644
--- a/src/browser/platform.js
+++ b/src/browser/platform.js
@@ -24,12 +24,12 @@ module.exports = {
     cordovaVersion: '3.4.0',
 
     bootstrap: function() {
-        
+
         var moduleMapper = require('cordova/modulemapper');
         var channel = require('cordova/channel');
 
         moduleMapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');
-       
+
         channel.onPluginsReady.subscribe(function () {
             channel.onNativeReady.fire();
         });

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/src/common/pluginloader.js
----------------------------------------------------------------------
diff --git a/src/common/pluginloader.js b/src/common/pluginloader.js
index 9bf95f4..652d576 100644
--- a/src/common/pluginloader.js
+++ b/src/common/pluginloader.js
@@ -90,7 +90,7 @@ function handlePluginsObject(path, moduleList, finishPluginLoading) {
 
 function injectPluginScript(pathPrefix, finishPluginLoading) {
     var pluginPath = pathPrefix + 'cordova_plugins.js';
-    
+
     if (urlutil.exists(pluginPath)) {
         injectScript(pluginPath, function() {
             try {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/lib/bundle.js
----------------------------------------------------------------------
diff --git a/tasks/lib/bundle.js b/tasks/lib/bundle.js
index a8371e3..c3995a1 100644
--- a/tasks/lib/bundle.js
+++ b/tasks/lib/bundle.js
@@ -17,6 +17,7 @@
  * under the License.
  */
 var fs           = require('fs');
+var path         = require('path');
 var collectFiles = require('./collect-files');
 var copyProps    = require('./copy-props');
 var writeModule  = require('./write-module');
@@ -24,15 +25,15 @@ var writeScript  = require('./write-script');
 
 
 module.exports = function bundle(platform, debug, commitId) {
-    var modules = collectFiles('lib/common')
-    var scripts = collectFiles('lib/scripts')
+    var modules = collectFiles('src/common')
+    var scripts = collectFiles('src/scripts')
     
-    modules[''] = 'lib/cordova.js'
-    copyProps(modules, collectFiles(path.join('lib', platform)));
+    modules[''] = 'src/cordova.js'
+    copyProps(modules, collectFiles(path.join('src', platform)));
 
     if (platform === 'test') {
         // FIXME why does 'test' resolve a bunch of android stuff?! 
-        var testFilesPath = path.join('lib', 'android', 'android');
+        var testFilesPath = path.join('src', 'android', 'android');
         copyProps(modules, collectFiles(testFilesPath, 'android/'));
     }
 
@@ -42,7 +43,7 @@ module.exports = function bundle(platform, debug, commitId) {
     output.push("// "  + commitId);
 
     // write header
-    var licensePath = path.join(__dirname, 'tasks', 'lib', 'LICENSE-for-js-file.txt');
+    var licensePath = path.join(__dirname, 'LICENSE-for-js-file.txt');
     output.push('/*', fs.readFileSync(licensePath, 'utf8'), '*/');
     output.push(';(function() {');
     output.push("var CORDOVA_JS_BUILD_LABEL = '"  + commitId + "';");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/lib/collect-files.js
----------------------------------------------------------------------
diff --git a/tasks/lib/collect-files.js b/tasks/lib/collect-files.js
index f58a208..51d4575 100644
--- a/tasks/lib/collect-files.js
+++ b/tasks/lib/collect-files.js
@@ -16,9 +16,10 @@
  * specific language governing permissions and lim
  * under the License.
  */
-var fs        = require('fs');
-var path      = require('path');
-var copyProps = require('./copy-props');
+var fs          = require('fs');
+var path        = require('path');
+var copyProps   = require('./copy-props');
+var getModuleId = require('./get-module-id');
 
 
 function collectFiles(dir, id) {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/lib/get-module-id.js
----------------------------------------------------------------------
diff --git a/tasks/lib/get-module-id.js b/tasks/lib/get-module-id.js
index 7599f17..564df40 100644
--- a/tasks/lib/get-module-id.js
+++ b/tasks/lib/get-module-id.js
@@ -17,6 +17,6 @@
  * under the License.
  */
 
-module.exports = function getModuleId(fileName) {
-    return fileName.match(/(.*)\.js$/)[1]
+module.exports = function getModuleId(filename) {
+    return filename.match(/(.*)\.js$/)[1]
 }

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/lib/write-module.js
----------------------------------------------------------------------
diff --git a/tasks/lib/write-module.js b/tasks/lib/write-module.js
index 04a119f..5f68803 100644
--- a/tasks/lib/write-module.js
+++ b/tasks/lib/write-module.js
@@ -16,8 +16,9 @@
  * specific language governing permissions and lim
  * under the License.
  */
-var fs = require('fs');
-var stripHeader = require('./strip-header');
+var fs            = require('fs');
+var path          = require('path');
+var stripHeader   = require('./strip-header');
 var writeContents = require('./write-contents');
 
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/lib/write-script.js
----------------------------------------------------------------------
diff --git a/tasks/lib/write-script.js b/tasks/lib/write-script.js
index 81d50a6..54c8821 100644
--- a/tasks/lib/write-script.js
+++ b/tasks/lib/write-script.js
@@ -17,8 +17,9 @@
  * under the License.
  */
 
-var fs = require('fs');
+var fs            = require('fs');
 var writeContents = require('./write-contents');
+var stripHeader   = require('./strip-header');
 
 module.exports = function writeScript(oFile, fileName, debug) {
     var contents = fs.readFileSync(fileName, 'utf8');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/tasks/whitespace.js
----------------------------------------------------------------------
diff --git a/tasks/whitespace.js b/tasks/whitespace.js
index 79155dd..e5dfa89 100644
--- a/tasks/whitespace.js
+++ b/tasks/whitespace.js
@@ -17,6 +17,7 @@
  * under the License.
 */
 var processWhiteSpace = require('./lib/process-white-space');
+var fs = require('fs');
 
 module.exports = function(grunt) {
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/4e0ca1c3/test/runner.js
----------------------------------------------------------------------
diff --git a/test/runner.js b/test/runner.js
index 0005731..754d50c 100644
--- a/test/runner.js
+++ b/test/runner.js
@@ -23,9 +23,10 @@ var fs = require('fs'),
     util = require('util'),
     _path = require('path'),
     tests = [],
-    packager = require('../build/packager'),
+    packager = require('./../tasks/lib/packager'),
     exec = require('child_process').exec;
 
+// FIXME this seems to be a copy of module in tasks/lib =/
 function collect(path, files, matches) {
     matches = matches || function (path) {
         return path.match(/test\.(\w|-)+\.js$/);
@@ -43,7 +44,7 @@ function collect(path, files, matches) {
 module.exports = {
     node: function(callback) {
         console.log('starting node-based tests')
-        var jas = require("../thirdparty/jasmine/jasmine"),
+        var jas = require("./../tasks/vendor/jasmine/jasmine"),
             TerminalReporter = require('./reporter').TerminalReporter,
             jsdom, document, window;
 


Mime
View raw message