From 57b430c89524c4fecbba17d98939f82ba9b11d44 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Fri, 9 Dec 2016 21:52:08 -0800 Subject: [PATCH] require url for redis init --- config.yml.template | 1 + config.yml.travis | 1 + environment.rb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.yml.template b/config.yml.template index 736cae23..75ce0b93 100644 --- a/config.yml.template +++ b/config.yml.template @@ -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" diff --git a/config.yml.travis b/config.yml.travis index 74ca8dcb..4eb05aa9 100644 --- a/config.yml.travis +++ b/config.yml.travis @@ -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' diff --git a/environment.rb b/environment.rb index 03046ec7..43e2c36f 100644 --- a/environment.rb +++ b/environment.rb @@ -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