chain-smoker
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,7 +5,12 @@ var Promise = require('bluebird'); | ||
var redisClient = redis.createClient(); | ||
function init(suite, options, readyCb) { | ||
options = setOptions(options); | ||
function init(suite, options, readyCb) { | ||
redisClient.onAsync('connect').then(function() { | ||
redis.client = redisClient; | ||
Promise.resolve().bind({}).then(function() { | ||
this.redisClient = redis.createClient(options.redis_port, options.redis_host); | ||
return this.redisClient; | ||
}).then(function(redisClient) { | ||
return this.redisClient.onAsync('connect'); | ||
}).then(function(redisClient) { | ||
redis.client = this.redisClient; | ||
return require('./api')(suite, options); | ||
@@ -30,4 +35,12 @@ }).then(function() { | ||
function setOptions(options) { | ||
options = options || {}; | ||
options.redis_port = 6379; | ||
options.redis_host = '127.0.0.1'; | ||
return options; | ||
} | ||
module.exports = init; |
{ | ||
"name": "chain-smoker", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Smokes a suite of tests a day (at least)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
19474
516