grunt-selenium-server
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -9,3 +9,6 @@ /* | ||
module.exports = function (grunt) { | ||
var seleniumVersion = grunt.option('seleniumVersion') || '2.46.0'; | ||
var seleniumMinorVersion = seleniumVersion.split('.').slice(0, 2).join('.'); | ||
@@ -24,3 +27,7 @@ grunt.initConfig({ | ||
'start-selenium-server': { | ||
test: {} | ||
test: { | ||
options: { | ||
downloadUrl: 'https://selenium-release.storage.googleapis.com/' + seleniumMinorVersion + '/selenium-server-standalone-' + seleniumVersion + '.jar' | ||
} | ||
} | ||
}, | ||
@@ -27,0 +34,0 @@ |
{ | ||
"name": "grunt-selenium-server", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Grunt task to start/stop a local Selenium standalon server.", | ||
@@ -8,2 +8,3 @@ "main": "Gruntfile.js", | ||
"license": "MIT", | ||
"repository": "git@github.com:pifantastic/grunt-selenium-server.git", | ||
"devDependencies": { | ||
@@ -10,0 +11,0 @@ "grunt": "~0.4.1", |
@@ -39,4 +39,9 @@ | ||
request(options.downloadUrl).on('response', function (res) { | ||
if(res.statusCode > 200 && res.statusCode < 300) { | ||
grunt.fail.fatal(options.downloadUrl + " returns " + res.statusCode); | ||
if(res.statusCode >= 400) { | ||
fs.unlink(destination, function (err) { | ||
if (err) | ||
grunt.log.error(err); | ||
cb(null, new Error(options.downloadUrl + " returns " + res.statusCode)); | ||
}) | ||
return; | ||
} | ||
@@ -112,3 +117,3 @@ // Full length of file. | ||
var str = data.toString(); | ||
if (str.match(/Selenium is already running/)) { | ||
if (str.match(/^Error: /) || str.match(/Selenium is already running/)) { | ||
cb(new Error(str)); | ||
@@ -123,3 +128,3 @@ } | ||
// Wait a tiny bit more time just because it's java and I'm worried. | ||
setTimeout(function(){ | ||
setTimeout(function() { | ||
complete = true; | ||
@@ -136,2 +141,4 @@ cb(null); | ||
childProcesses[target].on('error', cb); | ||
// Timeout case | ||
@@ -138,0 +145,0 @@ setTimeout(function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
9593
205