From cc816b3c9c0ca34fbcce2020246be3a5e60052ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Sun, 21 Jun 2020 22:07:08 -0300 Subject: [PATCH] Remove redis_url impl. Deprecated on ~2.2 --- lib/split/configuration.rb | 10 ---------- spec/configuration_spec.rb | 14 -------------- 2 files changed, 24 deletions(-) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index e36cbca3..c0879565 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -232,16 +232,6 @@ def initialize @dashboard_pagination_default_per_page = 10 end - def redis_url=(value) - warn '[DEPRECATED] `redis_url=` is deprecated in favor of `redis=`' - self.redis = value - end - - def redis_url - warn '[DEPRECATED] `redis_url` is deprecated in favor of `redis`' - self.redis - end - private def value_for(hash, key) diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index a1c353cc..4001f6e6 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -212,20 +212,6 @@ expect(@config.normalized_experiments).to eq({:my_experiment=>{:alternatives=>[{"control_opt"=>0.67}, [{"second_opt"=>0.1}, {"third_opt"=>0.23}]]}}) end - context 'redis_url configuration [DEPRECATED]' do - it 'should warn on set and assign to #redis' do - expect(@config).to receive(:warn).with(/\[DEPRECATED\]/) { nil } - @config.redis_url = 'example_url' - expect(@config.redis).to eq('example_url') - end - - it 'should warn on get and return #redis' do - expect(@config).to receive(:warn).with(/\[DEPRECATED\]/) { nil } - @config.redis = 'example_url' - expect(@config.redis_url).to eq('example_url') - end - end - context "redis configuration" do it "should default to local redis server" do expect(@config.redis).to eq("redis://localhost:6379")