launchdarkly-server-sdk 5.7.3 → 5.7.4

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: ab666bc37fa5a2f111f10b81d7cf0938b9f9bfc0
4
- data.tar.gz: 1f6564ed51bdfc73c62016c27e64571476165b55
3
+ metadata.gz: b374a5f119d3ba9ba2c787bd15e8192284726cd8
4
+ data.tar.gz: 12e5367e8ce7c10e5d5096429bca1154f1511187
5
5
  SHA512:
6
- metadata.gz: d76941981b9b7144d64a49b735b155dd79f0f37163612d5ad88751b7666f133310ecbbc6caae7598d4d775c9ef2e41f21276c8f36e11e0628f6e97a28df94419
7
- data.tar.gz: 7dbbd6e3f3cd865a372ab713f528c380f232c186d3c2b153073cb90256159fbd44dc1dcb7a0fcfea23d4518cb63b1ff72cff8fac8d48f2e4f030da1f65c6d648
6
+ metadata.gz: e6495effad7b943a428d93d149dfc736d1352c981f650249a724a14d2a9063ac1ec1167640dc6a0fe84fc85cccc50f2b929e0289c1c494252794762244e9341d
7
+ data.tar.gz: 6fb1b6965ed4bb12b316d8115b73590db0f913b614acefb277db00a32e82853670ba4b2e693445e1190ccdc16e2f53d0eaeae8e228485835bf709712832a69a3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
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
+ ## [5.7.3] - 2020-04-27
6
+ ### Changed:
7
+ - Previously, installing the SDK in an environment that did not have `openssl` would cause a failure at build time. The SDK still requires `openssl` at runtime, but this check has been removed because it caused the `rake` problem mentioned below, and because `openssl` is normally bundled in modern Ruby versions.
8
+
9
+ ### Fixed:
10
+ - The `LDClient` constructor will fail immediately with a descriptive `ArgumentError` if you provide a `nil` SDK key in a configuration that requires an SDK key (that is, a configuration that _will_ require communicating with LaunchDarkly services). Previously, it would still fail, but without a clear error message. You are still allowed to omit the SDK key in an offline configuration. ([#154](https://github.com/launchdarkly/ruby-server-sdk/issues/154))
11
+ - Removed a hidden dependency on `rake` which could cause your build to fail if you had a dependency on this SDK and you did not have `rake` installed. ([#155](https://github.com/launchdarkly/ruby-server-sdk/issues/155))
12
+ - Previously a clause in a feature flag rule that used a string operator (such as "starts with") or a numeric operator (such as "greater than") could cause evaluation of the flag to completely fail and return a default value if the value on the right-hand side of the expression did not have the right data type-- for instance, "greater than" with a string value. The LaunchDarkly dashboard does not allow creation of such a rule, but it might be possible to do so via the REST API; the correct behavior of the SDK is to simply treat the expression as a non-match.
13
+
5
14
  ## [5.7.2] - 2020-03-27
6
15
  ### Fixed:
7
16
  - Fixed a bug in the 5.7.0 and 5.7.1 releases that caused analytics events not to be sent unless diagnostic events were explicitly disabled. This also caused an error to be logged: `undefined method started?`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- launchdarkly-server-sdk (5.7.3)
4
+ launchdarkly-server-sdk (5.7.4)
5
5
  concurrent-ruby (~> 1.0)
6
6
  json (>= 1.8, < 3)
7
7
  ld-eventsource (= 1.0.3)
@@ -15,8 +15,9 @@ module LaunchDarkly
15
15
  user_private_attrs = Set.new((user_props[:privateAttributeNames] || []).map(&:to_sym))
16
16
 
17
17
  filtered_user_props, removed = filter_values(user_props, user_private_attrs, ALLOWED_TOP_LEVEL_KEYS, IGNORED_TOP_LEVEL_KEYS)
18
- if user_props.has_key?(:custom)
19
- filtered_user_props[:custom], removed_custom = filter_values(user_props[:custom], user_private_attrs)
18
+ custom = user_props[:custom]
19
+ if !custom.nil?
20
+ filtered_user_props[:custom], removed_custom = filter_values(custom, user_private_attrs)
20
21
  removed.merge(removed_custom)
21
22
  end
22
23
 
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "5.7.3"
2
+ VERSION = "5.7.4"
3
3
  end
data/spec/events_spec.rb CHANGED
@@ -408,6 +408,17 @@ describe LaunchDarkly::EventProcessor do
408
408
  end
409
409
  end
410
410
 
411
+ it "treats nil value for custom the same as an empty hash" do
412
+ with_processor_and_sender(default_config) do |ep, sender|
413
+ user_with_nil_custom = { key: "userkey", custom: nil }
414
+ e = { kind: "identify", key: "userkey", user: user_with_nil_custom }
415
+ ep.add_event(e)
416
+
417
+ output = flush_and_get_events(ep, sender)
418
+ expect(output).to contain_exactly(e)
419
+ end
420
+ end
421
+
411
422
  it "does a final flush when shutting down" do
412
423
  with_processor_and_sender(default_config) do |ep, sender|
413
424
  e = { kind: "identify", key: user[:key], user: user }
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: 5.7.3
4
+ version: 5.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb