optimizely-sdk 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/optimizely.rb +9 -9
- data/lib/optimizely/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: 01adaffe5e054d857678ed1b489ed18ed2edd4f8
|
4
|
+
data.tar.gz: 54adf65efba02815c56f590bb55928c2a00c3900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b16cb239fb9d5c391ca4359a964454cb71a9e7871a5645a86fd675000547f0fededbd7448826afd5a86000db272f59a7439bf09897e335fbfa50c52b745dcd
|
7
|
+
data.tar.gz: 8e64266fb986573b13ca9cabec300632f0c7890aaec9bf74849acca984470ae98ba09d1cdb550b01c1f4f724c3a29a9efe830d3b7f6813b09776ae5c62e610d6
|
data/lib/optimizely.rb
CHANGED
@@ -258,7 +258,6 @@ module Optimizely
|
|
258
258
|
# Returns True if the feature is enabled.
|
259
259
|
# False if the feature is disabled.
|
260
260
|
# False if the feature is not found.
|
261
|
-
|
262
261
|
unless @is_valid
|
263
262
|
logger = SimpleLogger.new
|
264
263
|
logger.log(Logger::ERROR, InvalidDatafileError.new('is_feature_enabled').message)
|
@@ -286,12 +285,6 @@ module Optimizely
|
|
286
285
|
end
|
287
286
|
|
288
287
|
variation = decision['variation']
|
289
|
-
unless variation['featureEnabled']
|
290
|
-
@logger.log(Logger::INFO,
|
291
|
-
"Feature '#{feature_flag_key}' is not enabled for user '#{user_id}'.")
|
292
|
-
return false
|
293
|
-
end
|
294
|
-
|
295
288
|
if decision.source == Optimizely::DecisionService::DECISION_SOURCE_EXPERIMENT
|
296
289
|
# Send event if Decision came from an experiment.
|
297
290
|
send_impression(decision.experiment, variation['key'], user_id, attributes)
|
@@ -299,9 +292,16 @@ module Optimizely
|
|
299
292
|
@logger.log(Logger::DEBUG,
|
300
293
|
"The user '#{user_id}' is not being experimented on in feature '#{feature_flag_key}'.")
|
301
294
|
end
|
302
|
-
@logger.log(Logger::INFO, "Feature '#{feature_flag_key}' is enabled for user '#{user_id}'.")
|
303
295
|
|
304
|
-
true
|
296
|
+
if variation['featureEnabled'] == true
|
297
|
+
@logger.log(Logger::INFO,
|
298
|
+
"Feature '#{feature_flag_key}' is enabled for user '#{user_id}'.")
|
299
|
+
return true
|
300
|
+
else
|
301
|
+
@logger.log(Logger::INFO,
|
302
|
+
"Feature '#{feature_flag_key}' is not enabled for user '#{user_id}'.")
|
303
|
+
return false
|
304
|
+
end
|
305
305
|
end
|
306
306
|
|
307
307
|
def get_enabled_features(user_id, attributes = nil)
|
data/lib/optimizely/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optimizely-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Optimizely
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|