Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -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) Loading config/defaults.yml +1 −2 Original line number Diff line number Diff line Loading @@ -193,8 +193,6 @@ defaults: scope: tags include_user_tags: false pod_tags: # List valid environment variables redistogo_url: development: environment: Loading Loading @@ -243,6 +241,7 @@ integration1: integration2: environment: url: 'http://localhost:34658/' redis: 'redis://localhost:6380' single_process_mode: true assets: serve: true Loading config/diaspora.yml.example +2 −2 Original line number Diff line number Diff line Loading @@ -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' lib/configuration_methods.rb +5 −16 Original line number Diff line number Diff line Loading @@ -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:///") 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 redis_options {url: redis_url} end def sidekiq_log Loading spec/lib/configuration_methods_spec.rb +0 −13 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -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) Loading
config/defaults.yml +1 −2 Original line number Diff line number Diff line Loading @@ -193,8 +193,6 @@ defaults: scope: tags include_user_tags: false pod_tags: # List valid environment variables redistogo_url: development: environment: Loading Loading @@ -243,6 +241,7 @@ integration1: integration2: environment: url: 'http://localhost:34658/' redis: 'redis://localhost:6380' single_process_mode: true assets: serve: true Loading
config/diaspora.yml.example +2 −2 Original line number Diff line number Diff line Loading @@ -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'
lib/configuration_methods.rb +5 −16 Original line number Diff line number Diff line Loading @@ -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:///") 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 redis_options {url: redis_url} end def sidekiq_log Loading
spec/lib/configuration_methods_spec.rb +0 −13 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading