From c896a182e13b0e5d12a5c2104119d7b873b22162 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 23 Apr 2012 03:18:13 -0700 Subject: [PATCH 1/3] increase length of waitfor timeout for phantom --- js/tests/phantom.js | 6 +++--- js/tests/pid.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 js/tests/pid.txt diff --git a/js/tests/phantom.js b/js/tests/phantom.js index 5173ba9a19..4105bf529d 100644 --- a/js/tests/phantom.js +++ b/js/tests/phantom.js @@ -2,15 +2,15 @@ // Adapted from Modernizr function waitFor(testFx, onReady, timeOutMillis) { - var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001 //< Default Max Timout is 3s + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s , start = new Date().getTime() , condition = false - , interval = setInterval(function() { + , interval = setInterval(function () { if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) { // If not time-out yet and condition not yet fulfilled condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code } else { - if(!condition) { + if (!condition) { // If condition still not fulfilled (timeout but condition is 'false') console.log("'waitFor()' timeout") phantom.exit(1) diff --git a/js/tests/pid.txt b/js/tests/pid.txt new file mode 100644 index 0000000000..129f3d6210 --- /dev/null +++ b/js/tests/pid.txt @@ -0,0 +1 @@ +1520 \ No newline at end of file From c408d8961b96f12c40aaf1d7647578cd3535bd64 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 23 Apr 2012 03:44:32 -0700 Subject: [PATCH 2/3] rewrite server.js, fix travis --- js/tests/pid.txt | 1 - js/tests/server.js | 16 ++++++---------- package.json | 8 ++++---- 3 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 js/tests/pid.txt diff --git a/js/tests/pid.txt b/js/tests/pid.txt deleted file mode 100644 index 129f3d6210..0000000000 --- a/js/tests/pid.txt +++ /dev/null @@ -1 +0,0 @@ -1520 \ No newline at end of file diff --git a/js/tests/server.js b/js/tests/server.js index 27d1bf24b3..7c8445feb8 100644 --- a/js/tests/server.js +++ b/js/tests/server.js @@ -4,15 +4,11 @@ */ var connect = require('connect') - , args = process.argv.slice(2) - , fs = require('fs') - , folder = '/../../' - , port = '3000' + , http = require('http') + , fs = require('fs') + , app = connect() + .use(connect.static(__dirname + '/../../')); -var server = connect.createServer( - connect.static(__dirname + folder) -).listen(port) +http.createServer(app).listen(3000); -fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8') - -console.log("Server started on port %s in %s", port, folder) \ No newline at end of file +fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8') \ No newline at end of file diff --git a/package.json b/package.json index 5f54d5c78a..4aab7ea753 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ } ] , "devDependencies": { - "uglify-js": "*" - , "jshint": "*" - , "recess": "*" - , "connect": "*" + "uglify-js": "1.2.6" + , "jshint": "0.6.1" + , "recess": "1.0.3" + , "connect": "2.1.3" } } \ No newline at end of file From b8b1ffde055b9e04f658201f81cf7974d56ae0c2 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 23 Apr 2012 04:16:27 -0700 Subject: [PATCH 3/3] hr to var in makefil --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9a4ffa4536..ea9d3a3f99 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less DATE=$(shell date +%I:%M%p) CHECK=\033[32m✔\033[39m +HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# # @@ -11,9 +12,9 @@ CHECK=\033[32m✔\033[39m # build: - @echo "\n##################################################" + @echo "\n${HR}" @echo "Building Bootstrap..." - @echo "##################################################\n" + @echo "${HR}\n" @jshint js/*.js --config js/.jshintrc @jshint js/tests/unit/*.js --config js/.jshintrc @echo "Running JSHint on javascript... ${CHECK} Done" @@ -31,9 +32,9 @@ build: @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js @echo "Compiling and minifying javascript... ${CHECK} Done" - @echo "\n##################################################" + @echo "\n${HR}" @echo "Bootstrap successfully built at ${DATE}." - @echo "##################################################\n" + @echo "${HR}\n" @echo "Thanks for using Bootstrap," @echo "<3 @mdo and @fat\n"