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 +4 -4
- data/README.md +1 -1
- data/lib/ldclient-rb/ldclient.rb +3 -3
- data/lib/ldclient-rb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d3b7afae59606e6cf63711b7ebce25fb00ab2ca
|
4
|
+
data.tar.gz: e6118509c561eb65351ad2d7dfe6b72972ca7537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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", {
|
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
|
data/lib/ldclient-rb/ldclient.rb
CHANGED
@@ -158,13 +158,13 @@ module LaunchDarkly
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def param_for_user(feature, user)
|
161
|
-
if user
|
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
|
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
|
188
|
+
unless !! user[:custom]
|
189
189
|
return false
|
190
190
|
end
|
191
191
|
unless user[:custom].include? attrib
|
data/lib/ldclient-rb/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|