require url for redis init

This commit is contained in:
Kyle Drake 2016-12-09 21:52:08 -08:00
parent 817012042d
commit 57b430c895
3 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
development:
database: 'postgres://localhost/neocities'
database_pool: 1
redis_url: "redis://localhost"
session_secret: "SECRET GOES HERE"
recaptcha_public_key: "6LdSMScTAAAAAADhP4IDb5s_EN1qMmvNmrUXReE-"
recaptcha_private_key: "6LdSMScTAAAAAIZAvP_W9d8fMsVT3iBX5wCwGvqV"

View file

@ -1,5 +1,6 @@
database: 'postgres://postgres@localhost/travis_ci_test'
database_pool: 1
redis_url: redis://localhost
session_secret: 's3cr3t'
recaptcha_public_key: '1234'
recaptcha_private_key: '5678'

View file

@ -65,7 +65,7 @@ end
if ENV['RACK_ENV'] == 'test'
$redis = MockRedis.new
else
$redis = Redis.new
$redis = Redis.new url: $config['redis_url']
end
$redis_cache = Redis::Namespace.new :cache, redis: $redis