ldclient-rb 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: 034158ae75d84ca63871a57441af1db86c2e7ec7
4
- data.tar.gz: 7aaaac7d020178559cd60bc5252e297773c22aa4
3
+ metadata.gz: 0d3b7afae59606e6cf63711b7ebce25fb00ab2ca
4
+ data.tar.gz: e6118509c561eb65351ad2d7dfe6b72972ca7537
5
5
  SHA512:
6
- metadata.gz: 2a066c4302d2ade5a8092be3871e99d352d2b65ace9aee25438599b44930db12aab50da9b3e62a8abebd2dffa274b1ffe88f7623c0f90fbe477432af234f757c
7
- data.tar.gz: 1bd7cc1e215dd8640ad89734fd313027fe578a22dead9761be038172d28f9dbc2f80282b26d60c0b6b7ab6d56eb0dbe81dc85a174a95bd669c2eb74e2caf88a0
6
+ metadata.gz: a4a52b5b3ca9ad33c0fce7bb68b1bb465a1e41899331175b1d8c979ac14d75ae5e1b5e6ac3a15006db3b77b95d1c3aabfcb2799b52c042e53e2bcc4940a75645
7
+ data.tar.gz: 0a2a5c1e2eb0cbb268f4f4db64e39f0c72ea7371640346b3c5954bdfd523d013f189ab25bb79b2cbbc73cd31e30706495624ef2ae50766641e40a623ef5ca11c
data/README.md CHANGED
@@ -23,7 +23,7 @@ Your first feature flag
23
23
  1. Create a new feature flag on your [dashboard](https://app.launchdarkly.com)
24
24
  2. In your application code, use the feature's key to check wthether the flag is on for each user:
25
25
 
26
- if client.get_flag?("your.flag.key", {"key" => "user@test.com"}, false)
26
+ if client.get_flag?("your.flag.key", {:key => "user@test.com"}, false)
27
27
  # application code to show the feature
28
28
  else
29
29
  # the code to run if the feature is off
@@ -158,13 +158,13 @@ module LaunchDarkly
158
158
  end
159
159
 
160
160
  def param_for_user(feature, user)
161
- if user.has_key? :key
161
+ if !! user[:key]
162
162
  id_hash = user[:key]
163
163
  else
164
164
  return nil
165
165
  end
166
166
 
167
- if user.has_key? :secondary
167
+ if !! user[:secondary]
168
168
  id_hash += '.' + user[:secondary]
169
169
  end
170
170
 
@@ -185,7 +185,7 @@ module LaunchDarkly
185
185
  return false
186
186
  end
187
187
  else # custom attribute
188
- unless user.has_key? :custom
188
+ unless !! user[:custom]
189
189
  return false
190
190
  end
191
191
  unless user[:custom].include? attrib
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catamorphic Co
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-23 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler