Commit 4c4fb34b 4c4fb34b149e8e72906c9bb44dc023699b2301ab by Nicolas Perriault

added checks for PhantomJS version; updated travis build config

1 parent de19c838
......@@ -10,17 +10,10 @@ before_install:
- sudo mv phantomjs-1.8.2-linux-x86_64/bin/phantomjs bin/phantomjs182
- ls -la bin/phantomjs182
- bin/phantomjs182 --version
- echo "installing PhantomJS 1.9.0"
- wget http://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2
- tar -xvf phantomjs-1.9.0-linux-x86_64.tar.bz2
- sudo mv phantomjs-1.9.0-linux-x86_64/bin/phantomjs bin/phantomjs190
- bin/phantomjs190 --version
- ls -la bin/phantomjs190
before_script:
- "npm install -g jshint@2.0.1"
- bin/phantomjs182 --version
- bin/phantomjs190 --version
script:
- make test
......@@ -28,7 +21,6 @@ script:
env:
matrix:
- PHANTOMJS_EXECUTABLE="bin/phantomjs182 --local-to-remote-url-access=yes --ignore-ssl-errors=yes"
- PHANTOMJS_EXECUTABLE="bin/phantomjs190 --local-to-remote-url-access=yes --ignore-ssl-errors=yes"
notifications:
irc:
......
......@@ -37,9 +37,12 @@ if ('process' in this && process.title === "node") {
process.exit(1);
}
// phantom check
// phantom checks
if (!('phantom' in this)) {
console.error('CasperJS needs to be executed in a PhantomJS environment http://phantomjs.org/');
} else if (phantom.version.major >= 1 && phantom.version.minor >= 9) {
console.error('CasperJS 1.0.x does not support PhantomJS version >= 1.9');
phantom.exit();
}
// Common polyfills
......