launchdarkly-server-sdk 7.2.0 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/ldclient-rb/config.rb +1 -1
- data/lib/ldclient-rb/context.rb +4 -0
- data/lib/ldclient-rb/impl/context.rb +3 -3
- data/lib/ldclient-rb/impl/event_sender.rb +1 -0
- data/lib/ldclient-rb/impl/integrations/file_data_source.rb +1 -0
- data/lib/ldclient-rb/impl/integrations/redis_impl.rb +2 -1
- data/lib/ldclient-rb/integrations/test_data.rb +3 -3
- data/lib/ldclient-rb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c039ad353413b88544bf8da89f1400af464323ce17c5677d3df96429fd1966c
|
4
|
+
data.tar.gz: 25eb62e52f75379f22a46df2273df1b7e6658b835f8f0470d03412ce55612467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 076b46271f1907f7a8a3bfcb322b1a291cb0aa2ed4ca3da822bf67dad9b023e1e162014e4d94350a72c0bd66af5101f9f2437950859d07e67d912e823ef02548
|
7
|
+
data.tar.gz: 8339b1e5393e366126227ffc00e4f3cf5de72a1f3fde013c501951bd7c19f3505c2ea69510d53b6df46f62599c2f44dab7e670ae5c05c2fdf5a6fccbaf0000d0
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ LaunchDarkly Server-side SDK for Ruby
|
|
9
9
|
|
10
10
|
LaunchDarkly overview
|
11
11
|
-------------------------
|
12
|
-
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves
|
12
|
+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
|
13
13
|
|
14
14
|
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
|
15
15
|
|
@@ -26,7 +26,7 @@ Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/r
|
|
26
26
|
Learn more
|
27
27
|
-----------
|
28
28
|
|
29
|
-
|
29
|
+
Read our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [reference guide for this SDK](http://docs.launchdarkly.com/docs/ruby-sdk-reference).
|
30
30
|
|
31
31
|
Generated API documentation for all versions of the SDK is on [RubyDoc.info](https://www.rubydoc.info/gems/launchdarkly-server-sdk). The API documentation for the latest version is also on [GitHub Pages](https://launchdarkly.github.io/ruby-server-sdk).
|
32
32
|
|
data/lib/ldclient-rb/config.rb
CHANGED
data/lib/ldclient-rb/context.rb
CHANGED
@@ -317,6 +317,8 @@ module LaunchDarkly
|
|
317
317
|
# {https://docs.launchdarkly.com/sdk/features/user-config SDK
|
318
318
|
# documentation}.
|
319
319
|
#
|
320
|
+
# @deprecated The old user format will be removed in 8.0.0. Please use the new context specific format.
|
321
|
+
#
|
320
322
|
# @param data [Hash]
|
321
323
|
# @return [LDContext]
|
322
324
|
#
|
@@ -397,6 +399,8 @@ module LaunchDarkly
|
|
397
399
|
# @return [LDContext]
|
398
400
|
#
|
399
401
|
private_class_method def self.create_legacy_context(data)
|
402
|
+
warn("DEPRECATED: legacy user format will be removed in 8.0.0", uplevel: 1)
|
403
|
+
|
400
404
|
key = data[:key]
|
401
405
|
|
402
406
|
# Legacy users are allowed to have "" as a key but they cannot have nil as a key.
|
@@ -40,7 +40,7 @@ module LaunchDarkly
|
|
40
40
|
return ERR_KIND_NON_STRING unless kind.is_a?(String)
|
41
41
|
return ERR_KIND_CANNOT_BE_KIND if kind == "kind"
|
42
42
|
return ERR_KIND_CANNOT_BE_MULTI if kind == "multi"
|
43
|
-
|
43
|
+
ERR_KIND_INVALID_CHARS unless kind.match?(/^[\w.-]+$/)
|
44
44
|
end
|
45
45
|
|
46
46
|
#
|
@@ -51,7 +51,7 @@ module LaunchDarkly
|
|
51
51
|
#
|
52
52
|
def self.validate_key(key)
|
53
53
|
return ERR_KEY_NON_STRING unless key.is_a?(String)
|
54
|
-
|
54
|
+
ERR_KEY_EMPTY if key == ""
|
55
55
|
end
|
56
56
|
|
57
57
|
#
|
@@ -61,7 +61,7 @@ module LaunchDarkly
|
|
61
61
|
# @return [String, nil]
|
62
62
|
#
|
63
63
|
def self.validate_name(name)
|
64
|
-
|
64
|
+
ERR_NAME_NON_STRING unless name.nil? || name.is_a?(String)
|
65
65
|
end
|
66
66
|
|
67
67
|
#
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "ldclient-rb/interfaces"
|
1
2
|
require "concurrent/atomics"
|
2
3
|
require "json"
|
3
4
|
|
@@ -117,7 +118,7 @@ module LaunchDarkly
|
|
117
118
|
@logger = opts[:logger] || Config.default_logger
|
118
119
|
@test_hook = opts[:test_hook] # used for unit tests, deliberately undocumented
|
119
120
|
|
120
|
-
@stopped = Concurrent::AtomicBoolean.new
|
121
|
+
@stopped = Concurrent::AtomicBoolean.new
|
121
122
|
|
122
123
|
with_connection do |redis|
|
123
124
|
@logger.info("#{description}: using Redis instance at #{redis.connection[:host]}:#{redis.connection[:port]} and prefix: #{@prefix}")
|
@@ -90,7 +90,7 @@ module LaunchDarkly
|
|
90
90
|
#
|
91
91
|
def flag(key)
|
92
92
|
existing_builder = @lock.with_read_lock { @flag_builders[key] }
|
93
|
-
if existing_builder.nil?
|
93
|
+
if existing_builder.nil?
|
94
94
|
FlagBuilder.new(key).boolean_flag
|
95
95
|
else
|
96
96
|
existing_builder.clone
|
@@ -118,7 +118,7 @@ module LaunchDarkly
|
|
118
118
|
@flag_builders[flag_builder.key] = flag_builder
|
119
119
|
version = 0
|
120
120
|
flag_key = flag_builder.key.to_sym
|
121
|
-
if @current_flags[flag_key]
|
121
|
+
if @current_flags[flag_key]
|
122
122
|
version = @current_flags[flag_key][:version]
|
123
123
|
end
|
124
124
|
new_flag = Impl::Model.deserialize(FEATURES, flag_builder.build(version+1))
|
@@ -175,7 +175,7 @@ module LaunchDarkly
|
|
175
175
|
key = item.key.to_sym
|
176
176
|
@lock.with_write_lock do
|
177
177
|
old_item = current[key]
|
178
|
-
unless old_item.nil?
|
178
|
+
unless old_item.nil?
|
179
179
|
data = item.as_json
|
180
180
|
data[:version] = old_item.version + 1
|
181
181
|
item = Impl::Model.deserialize(kind, data)
|
data/lib/ldclient-rb/version.rb
CHANGED
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: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LaunchDarkly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-dynamodb
|
@@ -357,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
357
357
|
- !ruby/object:Gem::Version
|
358
358
|
version: '0'
|
359
359
|
requirements: []
|
360
|
-
rubygems_version: 3.4.
|
360
|
+
rubygems_version: 3.4.20
|
361
361
|
signing_key:
|
362
362
|
specification_version: 4
|
363
363
|
summary: LaunchDarkly SDK for Ruby
|