lib/splash/backends/redis.rb in prometheus-splash-0.4.3 vs lib/splash/backends/redis.rb in prometheus-splash-0.4.4

- old
+ new

@@ -4,10 +4,12 @@ class Redis include Splash::Config def initialize(store) @hostname = Socket.gethostname @config = get_config[:backends][:stores][store] - @store = ::Redis.new :host => @config[:host], :port => @config[:port], :db => @config[:base].to_i + conf = { :host => @config[:host], :port => @config[:port], :db => @config[:base].to_i} + conf[:password] = @config[:auth] if @config[:auth] + @store = ::Redis.new conf @redis_cli_cmd = `which redis-cli` @store.auth(@config[:auth]) if @config[:auth] end def list(pattern='*', hostname = @hostname)