launchdarkly-server-sdk 7.2.0 → 7.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b14010cc3e61f33c32a83dc937046b23bdd00eabe728cef7a139e4300810cf0
4
- data.tar.gz: 21eaf262fe3279bd8d4db2169737d3d934d0471e308b97037473e8d84d81af51
3
+ metadata.gz: f4a03c0847cb10ea287eaa193067eb3e74191ea124faad2ec6a632ccd04b3297
4
+ data.tar.gz: dc06eb1a9d68e1fa972751ac4273ecc3284737279d1715b2769fde52f8457def
5
5
  SHA512:
6
- metadata.gz: b59b63876011041a2f37b2bcfabd179318622b1daadb7a33c5eaa217efb68abc2d2cc3d224c7ff6ad1e7a6b8223b15844a318cee767612d155b5b29a6cc135e8
7
- data.tar.gz: 6808eb4a6eca0d7680152022344a8aee930b864282a37e12da806b8d311fb9d6cbaac86fef2732e3abbaa75f025c3e67edfab7869d2b117e9a82b14f32f98b39
6
+ metadata.gz: 9496714bc7e4fe7ddfdf392255d89033a5d330b26397efd87ac166582d6ac74984843a91d5ee1236638f70310d8e4f03ab0d8fce0d0220381daed4b2bee9ea98
7
+ data.tar.gz: ababf98f4a35776fcbd9911a06b2dca144fb5803a05ad9f1aabe5a5afcb776a9c76a9156059ccfc484888d32c1f3ef70a81b8060bb01bced991d72b417da0b5f
data/README.md CHANGED
@@ -3,13 +3,13 @@ LaunchDarkly Server-side SDK for Ruby
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/launchdarkly-server-sdk.svg)](http://badge.fury.io/rb/launchdarkly-server-sdk)
5
5
 
6
- [![Circle CI](https://circleci.com/gh/launchdarkly/ruby-server-sdk/tree/main.svg?style=svg)](https://circleci.com/gh/launchdarkly/ruby-server-sdk/tree/main)
6
+ [![Run CI](https://github.com/launchdarkly/ruby-server-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/launchdarkly/ruby-server-sdk/actions/workflows/ci.yml)
7
7
  [![RubyDoc](https://img.shields.io/static/v1?label=docs+-+all+versions&message=reference&color=00add8)](https://www.rubydoc.info/gems/launchdarkly-server-sdk)
8
8
  [![GitHub Pages](https://img.shields.io/static/v1?label=docs+-+latest&message=reference&color=00add8)](https://launchdarkly.github.io/ruby-server-sdk)
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
 
@@ -111,13 +112,13 @@ module LaunchDarkly
111
112
  @pool = create_redis_pool(opts)
112
113
 
113
114
  # shutdown pool on close unless the client passed a custom pool and specified not to shutdown
114
- @pool_shutdown_on_close = (!opts[:pool] || opts.fetch(:pool_shutdown_on_close, true))
115
+ @pool_shutdown_on_close = !opts[:pool] || opts.fetch(:pool_shutdown_on_close, true)
115
116
 
116
117
  @prefix = opts[:prefix] || LaunchDarkly::Integrations::Redis::default_prefix
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)
@@ -87,6 +87,7 @@ module LaunchDarkly
87
87
 
88
88
  if @config.use_ldd?
89
89
  @config.logger.info { "[LDClient] Started LaunchDarkly Client in LDD mode" }
90
+ @data_source = NullUpdateProcessor.new
90
91
  return # requestor and update processor are not used in this mode
91
92
  end
92
93
 
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "7.2.0"
2
+ VERSION = "7.3.2" # x-release-please-version
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.2
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-12-26 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.1.6
361
361
  signing_key:
362
362
  specification_version: 4
363
363
  summary: LaunchDarkly SDK for Ruby