Unverified Commit 0db72526 authored by Dennis Schubert's avatar Dennis Schubert

Merge pull request #6863 from SuperTux88/remove-REDISTOGO_URL-deprecation

remove REDISTOGO_URL deprecation
parents 673740b9 d68c1ad9
......@@ -108,6 +108,7 @@ before.
* Adjusted Facebook integration for a successful review [#6778](https://github.com/diaspora/diaspora/pull/6778)
* Redirect to the sign-in page instead of the stream on account deletion [#6784](https://github.com/diaspora/diaspora/pull/6784)
* Removed own unicorn killer by a maintained third-party gem [#6792](https://github.com/diaspora/diaspora/pull/6792)
* Removed deprecated `REDISTOGO_URL` environment variable [#6863](https://github.com/diaspora/diaspora/pull/6863)
## Bug fixes
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)
......
......@@ -193,8 +193,6 @@ defaults:
scope: tags
include_user_tags: false
pod_tags:
# List valid environment variables
redistogo_url:
development:
environment:
......@@ -243,6 +241,7 @@ integration1:
integration2:
environment:
url: 'http://localhost:34658/'
redis: 'redis://localhost:6380'
single_process_mode: true
assets:
serve: true
......
......@@ -669,8 +669,8 @@ configuration: ## Section
## to have them different in different environments.
production: ## Section
environment: ## Section
#redis_url: 'redis://production.example.org:6379'
#redis: 'redis://production.example.org:6379'
development: ## Section
environment: ## Section
#redis_url: 'redis://production.example.org:6379'
#redis: 'redis://production.example.org:6379'
......@@ -102,25 +102,14 @@ module Configuration
end
def get_redis_options
if redistogo_url.present?
warn "WARNING: using the REDISTOGO_URL environment variable is deprecated, please use REDIS_URL now."
ENV['REDIS_URL'] = redistogo_url
end
redis_options = {}
redis_url = ENV["REDIS_URL"] || environment.redis.get
redis_url = ENV['REDIS_URL'] || environment.redis.get
return {} unless redis_url.present?
if ENV['RAILS_ENV']== 'integration2'
redis_options[:url] = "redis://localhost:6380"
elsif redis_url.present?
unless redis_url.start_with?("redis://") || redis_url.start_with?("unix:///")
warn "WARNING: Your redis url (#{redis_url}) doesn't start with redis:// or unix:///"
end
redis_options[:url] = redis_url
unless redis_url.start_with?("redis://", "unix:///")
warn "WARNING: Your redis url (#{redis_url}) doesn't start with redis:// or unix:///"
end
redis_options
{url: redis_url}
end
def sidekiq_log
......
......@@ -152,19 +152,8 @@ describe Configuration::Methods do
end
describe "#get_redis_options" do
context "with REDISTOGO_URL set" do
before do
ENV["REDISTOGO_URL"] = "redis://myserver"
end
it "uses that" do
expect(@settings.get_redis_options[:url]).to match "myserver"
end
end
context "with REDIS_URL set" do
before do
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = "redis://yourserver"
end
......@@ -175,7 +164,6 @@ describe Configuration::Methods do
context "with redis set" do
before do
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = nil
@settings.environment.redis = "redis://ourserver"
end
......@@ -187,7 +175,6 @@ describe Configuration::Methods do
context "with a unix socket set" do
before do
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = nil
@settings.environment.redis = "unix:///tmp/redis.sock"
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment