flipper-redis 0.11.0.beta3 → 0.11.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/redis/basic.rb +2 -2
- data/examples/redis/internals.rb +2 -2
- data/examples/redis/namespaced.rb +2 -2
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/adapters/redis_cache_spec.rb +2 -2
- data/spec/flipper/adapters/redis_spec.rb +1 -1
- data/test/adapters/redis_cache_test.rb +1 -1
- data/test/adapters/redis_test.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68fbf0f17d846d2e6be23b12b3f1c98df5d1e5bd
|
4
|
+
data.tar.gz: 35ad93decd9b7ce605d48212332cddc46ebcda49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c424ba2a04bc6c3f73eb17416948e14c9f5850ce9fcb298ccd0d6cfddf3989884bfbac4535dc1c28845987d48433db9b207502d45e5420a013921b9079237a33
|
7
|
+
data.tar.gz: a6e50d08e44fba2f68c557c6f5b61faaae80acf8e3a89888071a6874008e3b085749c384747f02f97260d1c602bb62c68ca698427e8d363441b835904d928d42
|
data/examples/redis/basic.rb
CHANGED
@@ -7,8 +7,8 @@ $:.unshift(lib_path)
|
|
7
7
|
|
8
8
|
require 'flipper/adapters/redis'
|
9
9
|
options = {}
|
10
|
-
if ENV['
|
11
|
-
options[:url] = ENV['
|
10
|
+
if ENV['REDIS_URL']
|
11
|
+
options[:url] = ENV['REDIS_URL']
|
12
12
|
end
|
13
13
|
client = Redis.new(options)
|
14
14
|
adapter = Flipper::Adapters::Redis.new(client)
|
data/examples/redis/internals.rb
CHANGED
@@ -9,8 +9,8 @@ $:.unshift(lib_path)
|
|
9
9
|
require 'flipper/adapters/redis'
|
10
10
|
|
11
11
|
options = {}
|
12
|
-
if ENV['
|
13
|
-
options[:url] = ENV['
|
12
|
+
if ENV['REDIS_URL']
|
13
|
+
options[:url] = ENV['REDIS_URL']
|
14
14
|
end
|
15
15
|
client = Redis.new(options)
|
16
16
|
adapter = Flipper::Adapters::Redis.new(client)
|
@@ -14,8 +14,8 @@ $:.unshift(lib_path)
|
|
14
14
|
|
15
15
|
require 'flipper/adapters/redis'
|
16
16
|
options = {url: 'redis://127.0.0.1:6379'}
|
17
|
-
if ENV['
|
18
|
-
options[:url] = ENV['
|
17
|
+
if ENV['REDIS_URL']
|
18
|
+
options[:url] = ENV['REDIS_URL']
|
19
19
|
end
|
20
20
|
client = Redis.new(options)
|
21
21
|
namespaced_client = Redis::Namespace.new(:flipper_namespace, redis: client)
|
data/lib/flipper/version.rb
CHANGED
@@ -7,13 +7,13 @@ RSpec.describe Flipper::Adapters::RedisCache do
|
|
7
7
|
let(:client) do
|
8
8
|
options = {}
|
9
9
|
|
10
|
-
options[:url] = ENV['
|
10
|
+
options[:url] = ENV['REDIS_URL'] if ENV['REDIS_URL']
|
11
11
|
|
12
12
|
Redis.new(options)
|
13
13
|
end
|
14
14
|
|
15
15
|
let(:memory_adapter) { Flipper::Adapters::Memory.new }
|
16
|
-
let(:cache) { Redis.new(url: ENV.fetch('
|
16
|
+
let(:cache) { Redis.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379')) }
|
17
17
|
let(:adapter) { described_class.new(memory_adapter, cache) }
|
18
18
|
let(:flipper) { Flipper.new(adapter) }
|
19
19
|
|
@@ -6,7 +6,7 @@ class DalliTest < MiniTest::Test
|
|
6
6
|
prepend Flipper::Test::SharedAdapterTests
|
7
7
|
|
8
8
|
def setup
|
9
|
-
url = ENV.fetch('
|
9
|
+
url = ENV.fetch('REDIS_URL', 'redis://localhost:6379')
|
10
10
|
@cache = Redis.new(url: url).tap(&:flushdb)
|
11
11
|
memory_adapter = Flipper::Adapters::Memory.new
|
12
12
|
@adapter = Flipper::Adapters::RedisCache.new(memory_adapter, @cache)
|
data/test/adapters/redis_test.rb
CHANGED
@@ -5,7 +5,7 @@ class RedisTest < MiniTest::Test
|
|
5
5
|
prepend Flipper::Test::SharedAdapterTests
|
6
6
|
|
7
7
|
def setup
|
8
|
-
url = ENV.fetch('
|
8
|
+
url = ENV.fetch('REDIS_URL', 'redis://localhost:6379')
|
9
9
|
client = Redis.new(url: url).tap(&:flushdb)
|
10
10
|
@adapter = Flipper::Adapters::Redis.new(client)
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.0.
|
4
|
+
version: 0.11.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flipper
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.11.0.
|
19
|
+
version: 0.11.0.beta4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.11.0.
|
26
|
+
version: 0.11.0.beta4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|