fflags 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489918f7eadf6dd9c52bc102e47857ea38602d546dc6261c70a703098515f8bd
4
- data.tar.gz: 30677e51f6d114a5ca8597b591ac762bb1c45c3cc984b0e99da9692f2660384b
3
+ metadata.gz: 63792014f50a2b4d0d0c03328054ef487a42dc350e94137edd54d59063943ee5
4
+ data.tar.gz: d30a3a98976a4bc971f0ae3516a54a32f254e0d6704aac596561d6df7c93f17a
5
5
  SHA512:
6
- metadata.gz: fb8a91ba3df7c42417aeed9fc9983bc69594d46fecdd3080d0f18fe9c0027806bbf30933e8260efe93d71c34bed56731da9a2dcf94c5f06c9fea45601cf18254
7
- data.tar.gz: 8933d2ca66c0d2b7391759aa49bc0bd1cfcfd31f4924576520059c4604316c7bada778b9f8855aa28d4572d9d7590f94c10fd2a18b72e4845b5d4be460a33ce2
6
+ metadata.gz: b564af9ccf9096236e6476422d353350a24d486efe707e775acf3111caa2cc76a8874aacce80f523ba83b726b6e09abdeb9513c95d65306bc96298a58ab748a4
7
+ data.tar.gz: 4aa99856df6415fb8fd1d7a3dc153501dc1fabe2ff8fab7957f6978ece0d30652feec542e23e7fa441c59c1fa98d8d3ae477bbfc8737b0fc0b6addc611964c1e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fflags (0.5.1)
4
+ fflags (0.6.0)
5
5
  redis (>= 3.0.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,8 @@
1
1
  module FFlags
2
2
  # Configuration Class
3
3
  class Configuration
4
- attr_accessor :key, :redis_url, :debug, :flags, :templates
4
+ attr_accessor :key, :debug, :flags, :templates, :redis_options
5
+ attr_accessor :redis_url # Legacy support
5
6
 
6
7
  def initialize
7
8
  set_default_values
@@ -11,7 +12,7 @@ module FFlags
11
12
 
12
13
  def set_default_values
13
14
  @key = 'code3.io'
14
- @redis_url = 'redis://127.0.0.1:6379'
15
+ @redis_options = {url: 'redis://127.0.0.1:6379'}
15
16
  @debug = false
16
17
  @flags = {}
17
18
  @templates = {}
@@ -23,7 +23,12 @@ module FFlags
23
23
  private
24
24
 
25
25
  def client
26
- @client ||= Redis.new(url: FFlags.configuration.redis_url)
26
+ if FFlags.configuration.redis_url
27
+ # Legacy support
28
+ @client ||= Redis.new(url: FFlags.configuration.redis_url)
29
+ else
30
+ @client ||= Redis.new(FFlags.configuration.redis_options)
31
+ end
27
32
  end
28
33
  end
29
34
  end
@@ -1,3 +1,3 @@
1
1
  module FFlags
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fflags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faizal Zakaria