Skip to content

Commit

Permalink
Remove redis_url impl. Deprecated on ~2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehjr committed Jun 22, 2020
1 parent eefce9a commit cc816b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
10 changes: 0 additions & 10 deletions lib/split/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 0 additions & 14 deletions spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cc816b3

Please sign in to comment.