launchdarkly-server-sdk 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/ldclient-rb/ldclient.rb +6 -0
- data/lib/ldclient-rb/version.rb +1 -1
- data/spec/ldclient_spec.rb +3 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3e33076372820b2ecde009b3effb174d633fee79cb700380e1b887f6f1876c
|
4
|
+
data.tar.gz: 30b62850e576db2710058de74bf28c1f95ef72e79479326df6214577c343d100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b93a893777b34b7eb0774d150cbef556166852afb9bdebed78293b62ddc0c7f8639a4a789dc74655d461120b8720123ff687d851d873d2074ced86611b635cad
|
7
|
+
data.tar.gz: 90aa095737b094516659bd63b6987a6a523e5f20a83eeef3793ae9c667b5d950c7f494e7a7e44d655a5f7e6b2a0865e1cbeca0d35c8ec16ee8b084a7756027da
|
data/.circleci/config.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
All notable changes to the LaunchDarkly Ruby SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
|
4
4
|
|
5
|
+
## [6.2.0] - 2021-06-17
|
6
|
+
### Added:
|
7
|
+
- The SDK now supports the ability to control the proportion of traffic allocation to an experiment. This works in conjunction with a new platform feature now available to early access customers.
|
8
|
+
|
5
9
|
## [6.1.1] - 2021-05-27
|
6
10
|
### Fixed:
|
7
11
|
- Calling `variation` with a nil user parameter is invalid, causing the SDK to log an error and return a fallback value, but the SDK was still sending an analytics event for this. An event without a user is meaningless and can't be processed by LaunchDarkly. This is now fixed so the SDK will not send one.
|
data/lib/ldclient-rb/ldclient.rb
CHANGED
@@ -407,6 +407,12 @@ module LaunchDarkly
|
|
407
407
|
return detail
|
408
408
|
end
|
409
409
|
|
410
|
+
if user[:key].nil?
|
411
|
+
@config.logger.warn { "[LDClient] Variation called with nil user key; returning default value" }
|
412
|
+
detail = Evaluator.error_result(EvaluationReason::ERROR_USER_NOT_SPECIFIED, default)
|
413
|
+
return detail
|
414
|
+
end
|
415
|
+
|
410
416
|
if !initialized?
|
411
417
|
if @store.initialized?
|
412
418
|
@config.logger.warn { "[LDClient] Client has not finished initializing; using last known values from feature store" }
|
data/lib/ldclient-rb/version.rb
CHANGED
data/spec/ldclient_spec.rb
CHANGED
@@ -171,20 +171,12 @@ describe LaunchDarkly::LDClient do
|
|
171
171
|
client.variation("key", user_anonymous, "default")
|
172
172
|
end
|
173
173
|
|
174
|
-
it "
|
174
|
+
it "does not queue a feature event for an existing feature when user key is nil" do
|
175
175
|
config.feature_store.init({ LaunchDarkly::FEATURES => {} })
|
176
176
|
config.feature_store.upsert(LaunchDarkly::FEATURES, feature_with_value)
|
177
177
|
bad_user = { name: "Bob" }
|
178
|
-
expect(event_processor).
|
179
|
-
|
180
|
-
key: "key",
|
181
|
-
version: 100,
|
182
|
-
user: bad_user,
|
183
|
-
value: "default",
|
184
|
-
default: "default",
|
185
|
-
trackEvents: true,
|
186
|
-
debugEventsUntilDate: 1000
|
187
|
-
))
|
178
|
+
expect(event_processor).not_to receive(:add_event)
|
179
|
+
expect(logger).to receive(:warn)
|
188
180
|
client.variation("key", bad_user, "default")
|
189
181
|
end
|
190
182
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: launchdarkly-server-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LaunchDarkly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-dynamodb
|