launchdarkly-server-sdk 6.2.0 → 6.2.1

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: 1ee671939e04661c649d31502496cc33cd8844002c9af06864db9f322a81ec56
4
- data.tar.gz: f5f77f10a6c487e1846f8d86201e9456b04bfb03950c751a328a7d3b9c3b8597
3
+ metadata.gz: 0c3e33076372820b2ecde009b3effb174d633fee79cb700380e1b887f6f1876c
4
+ data.tar.gz: 30b62850e576db2710058de74bf28c1f95ef72e79479326df6214577c343d100
5
5
  SHA512:
6
- metadata.gz: 6dc025a98ed3ab25bfe14baa878ff36beb34875caafee9c1979c724d58af9d08ca2596615cb31819dbb150fdeffd17b597f76e19cf2f09962dc1095ffe686ea7
7
- data.tar.gz: 5d22b72feb1b46e7537f00b3959c72368d94c6606db640df1a7a9b17e1b01b952f1d34ea260e8d20b661fdee558975a9e034087e0d785aacd297d20ab15e9944
6
+ metadata.gz: b93a893777b34b7eb0774d150cbef556166852afb9bdebed78293b62ddc0c7f8639a4a789dc74655d461120b8720123ff687d851d873d2074ced86611b635cad
7
+ data.tar.gz: 90aa095737b094516659bd63b6987a6a523e5f20a83eeef3793ae9c667b5d950c7f494e7a7e44d655a5f7e6b2a0865e1cbeca0d35c8ec16ee8b084a7756027da
data/.circleci/config.yml CHANGED
@@ -20,7 +20,7 @@ jobs:
20
20
  LD_RELEASE_DOCS_TITLE: ""
21
21
  LD_RELEASE_PROJECT: "ruby-server-sdk"
22
22
  LD_RELEASE_PROJECT_TEMPLATE: "ruby"
23
- LD_RELEASE_VERSION: "6.2.0"
23
+ LD_RELEASE_VERSION: "6.2.1"
24
24
  LD_SKIP_DATABASE_TESTS: "1"
25
25
  steps:
26
26
  - checkout
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.
@@ -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" }
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "6.2.0"
2
+ VERSION = "6.2.1"
3
3
  end
@@ -171,20 +171,12 @@ describe LaunchDarkly::LDClient do
171
171
  client.variation("key", user_anonymous, "default")
172
172
  end
173
173
 
174
- it "queues a feature event for an existing feature when user key is nil" do
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).to receive(:add_event).with(hash_including(
179
- kind: "feature",
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.0
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-06-17 00:00:00.000000000 Z
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