Skip to content

Commit

Permalink
Allow options keys to be strings as well as symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaronic committed Apr 25, 2016
1 parent f1a1150 commit 9c974be
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/faye/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ def initialize(server, options)
def init
return if @redis

uri = @options[:uri] || nil
host = @options[:host] || DEFAULT_HOST
port = @options[:port] || DEFAULT_PORT
db = @options[:database] || DEFAULT_DATABASE
auth = @options[:password] || nil
gc = @options[:gc] || DEFAULT_GC
@ns = @options[:namespace] || ''
socket = @options[:socket] || nil
uri = @options[:uri] || @options['uri'] || nil
host = @options[:host] || @options['host'] || DEFAULT_HOST
port = @options[:port] || @options['port'] || DEFAULT_PORT
db = @options[:database] || @options['database'] || DEFAULT_DATABASE
auth = @options[:password] || @options['password'] || nil
gc = @options[:gc] || @options['gc'] || DEFAULT_GC
@ns = @options[:namespace] || @options['namespace'] || ''
socket = @options[:socket] || @options['socket'] || nil

if uri
@redis = EventMachine::Hiredis.connect(uri)
Expand Down

0 comments on commit 9c974be

Please sign in to comment.