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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b14010cc3e61f33c32a83dc937046b23bdd00eabe728cef7a139e4300810cf0
4
- data.tar.gz: 21eaf262fe3279bd8d4db2169737d3d934d0471e308b97037473e8d84d81af51
3
+ metadata.gz: 9c039ad353413b88544bf8da89f1400af464323ce17c5677d3df96429fd1966c
4
+ data.tar.gz: 25eb62e52f75379f22a46df2273df1b7e6658b835f8f0470d03412ce55612467
5
5
  SHA512:
6
- metadata.gz: b59b63876011041a2f37b2bcfabd179318622b1daadb7a33c5eaa217efb68abc2d2cc3d224c7ff6ad1e7a6b8223b15844a318cee767612d155b5b29a6cc135e8
7
- data.tar.gz: 6808eb4a6eca0d7680152022344a8aee930b864282a37e12da806b8d311fb9d6cbaac86fef2732e3abbaa75f025c3e67edfab7869d2b117e9a82b14f32f98b39
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 over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
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
- Check out 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).
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
 
@@ -486,7 +486,7 @@ module LaunchDarkly
486
486
 
487
487
  #
488
488
  # The default value for {#connect_timeout}.
489
- # @return [Float] 10
489
+ # @return [Float] 2
490
490
  #
491
491
  def self.default_connect_timeout
492
492
  2
@@ -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
- return ERR_KIND_INVALID_CHARS unless kind.match?(/^[\w.-]+$/)
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
- return ERR_KEY_EMPTY if key == ""
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
- return ERR_NAME_NON_STRING unless name.nil? || name.is_a?(String)
64
+ ERR_NAME_NON_STRING unless name.nil? || name.is_a?(String)
65
65
  end
66
66
 
67
67
  #
@@ -64,6 +64,7 @@ module LaunchDarkly
64
64
  begin
65
65
  res_time = Time.httpdate(response.headers["date"])
66
66
  rescue ArgumentError
67
+ # Ignored
67
68
  end
68
69
  end
69
70
  return EventSenderResult.new(true, false, res_time)
@@ -18,6 +18,7 @@ module LaunchDarkly
18
18
  require 'listen'
19
19
  @@have_listen = true
20
20
  rescue LoadError
21
+ # Ignored
21
22
  end
22
23
 
23
24
  #
@@ -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? then
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] then
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? then
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)
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "7.2.0"
2
+ VERSION = "7.3.0"
3
3
  end
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.2.0
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-05-04 00:00:00.000000000 Z
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.12
360
+ rubygems_version: 3.4.20
361
361
  signing_key:
362
362
  specification_version: 4
363
363
  summary: LaunchDarkly SDK for Ruby