Permalink
Browse files

Rename Redis engine 'auth' parameter to 'password' and document it.

  • Loading branch information...
1 parent 0d79a3b commit e929cbbb94e30d0e27bdbc088071a4e4f7266930 @jcoglan jcoglan committed Jun 13, 2011
@@ -10,7 +10,7 @@ Faye.Engine.Redis = Faye.Class(Faye.Engine.Base, {
var redis = require('redis'),
host = this._options.host || this.DEFAULT_HOST,
port = this._options.port || this.DEFAULT_PORT,
- auth = this._options.auth;
+ auth = this._options.password;
this._redis = redis.createClient(port, host, {no_ready_check: true});
this._subscriber = redis.createClient(port, host, {no_ready_check: true});
@@ -11,7 +11,7 @@ def init
host = @options[:host] || DEFAULT_HOST
port = @options[:port] || DEFAULT_PORT
- auth = @options[:auth]
+ auth = @options[:password]
@redis = EventMachine::Hiredis::Client.connect(host, port)
@subscriber = EventMachine::Hiredis::Client.connect(host, port)
View
@@ -62,9 +62,10 @@
mount: '/faye',
timeout: 45,
engine: {
- type: 'redis',
- host: 'REDIS_HOST',
- port: 'REDIS_PORT'
+ type: 'redis',
+ host: 'REDIS_HOST',
+ port: 'REDIS_PORT',
+ password: 'REDIS_AUTH' // if your server requires it
}
})</pre>
View
@@ -73,9 +73,10 @@
:mount => '/faye',
:timeout => 45,
:engine => {
- :type => 'redis',
- :host => 'REDIS_HOST',
- :port => 'REDIS_PORT'
+ :type => 'redis',
+ :host => 'REDIS_HOST',
+ :port => 'REDIS_PORT',
+ :password => 'REDIS_AUTH' # if your server requires it
})</pre>
h4. Server-side Ruby clients
@@ -84,7 +84,7 @@ JS.ENV.EngineSteps = JS.Test.asyncSteps({
clean_redis_db: function(resume) {
this.engine.disconnect()
var redis = require('redis').createClient(6379, 'localhost', {no_ready_check: true})
- redis.auth(this.engineOpts.auth)
+ redis.auth(this.engineOpts.password)
redis.flushall(function() {
redis.end()
resume()
@@ -321,7 +321,7 @@ JS.ENV.EngineSpec = JS.Test.describe("Pub/sub engines", function() { with(this)
describe("Faye.Engine.Redis", function() { with(this) {
before(function() {
this.engineKlass = Faye.Engine.Redis
- this.engineOpts = {auth: "foobared"}
+ this.engineOpts = {password: "foobared"}
})
after(function() { this.clean_redis_db() })
View
@@ -309,7 +309,7 @@ def create_engine
describe Faye::Engine::Redis do
let(:engine_klass) { Faye::Engine::Redis }
- let(:engine_opts) { {:auth => "foobared"} }
+ let(:engine_opts) { {:password => "foobared"} }
after { clean_redis_db }
it_should_behave_like "faye engine"
it_should_behave_like "distributed engine"

0 comments on commit e929cbb

Please sign in to comment.