Skip to content

Commit 6b375ae

Browse files
LaunchDarklyReleaseBoteli-darklyLaunchDarklyCIjacobthemythapache-hb
authored
prepare 7.3.0 release (#225)
## [7.3.0] - 2023-10-16 ### Fixed: - The documentation for the `default_connect_timeout` setting stated it defaulted to 10 seconds when the code actually defaults to 2. (Thanks, [zmagg-figma](#223)!) ### Deprecated: - Creating an `LDContext` using the legacy user format has been deprecated and will be removed in the next major release. To learn more, read the [Contexts documentation](https://docs.launchdarkly.com/guides/flags/intro-contexts). --------- Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Jacob Smith <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: hroederld <[email protected]> Co-authored-by: Kerrie Martinez <[email protected]> Co-authored-by: pellyg-ld <[email protected]> Co-authored-by: Sam Stokes <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Matthew M. Keeler <[email protected]> Co-authored-by: Ben Levy <[email protected]> Co-authored-by: Ben Levy <[email protected]> Co-authored-by: Matthew M. Keeler <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Matt Hooks <[email protected]>
1 parent 13e8359 commit 6b375ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2795
-2746
lines changed

.circleci/config.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ workflows:
2121
- build-test-linux:
2222
name: Ruby 3.1
2323
docker-image: cimg/ruby:3.1
24+
- build-test-linux:
25+
name: Ruby 3.2
26+
docker-image: cimg/ruby:3.2
2427
- build-test-linux:
2528
name: JRuby 9.4
2629
docker-image: jruby:9.4-jdk
2730
jruby: true
31+
spec-tags: -t '~flaky'
2832

2933
jobs:
3034
build-test-windows:
@@ -37,6 +41,12 @@ jobs:
3741
steps:
3842
- checkout
3943

44+
# No idea what this is. But the win orb starts it up on port 8000 which
45+
# conflicts with DynamoDB. So we will stop it.
46+
- run:
47+
name: "Shutdown IBXDashboard"
48+
command: Stop-Service IBXDashboard
49+
4050
- run:
4151
name: "Setup DynamoDB"
4252
command: |
@@ -97,10 +107,13 @@ jobs:
97107
jruby:
98108
type: boolean
99109
default: false
110+
spec-tags:
111+
type: string
112+
default: ""
100113

101114
docker:
102115
- image: <<parameters.docker-image>>
103-
- image: consul
116+
- image: hashicorp/consul
104117
- image: redis
105118
- image: amazon/dynamodb-local
106119

@@ -124,7 +137,7 @@ jobs:
124137
- run: gem install bundler -v 2.2.33
125138
- run: bundle _2.2.33_ install
126139
- run: mkdir /tmp/circle-artifacts
127-
- run: bundle _2.2.33_ exec rspec --format documentation --format RspecJunitFormatter -o /tmp/circle-artifacts/rspec.xml spec
140+
- run: bundle _2.2.33_ exec rspec --format documentation --format RspecJunitFormatter -o /tmp/circle-artifacts/rspec.xml spec <<parameters.spec-tags>>
128141
- run: mv coverage /tmp/circle-artifacts/
129142

130143
- when:

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Style/FormatString:
170170
Style/GlobalVars:
171171
Description: 'Do not introduce global variables.'
172172
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
173-
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
173+
Reference: 'https://www.zenspider.com/ruby/quickref.html'
174174
Enabled: false
175175

176176
Style/GuardClause:

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
1+
# Repository Maintainers
2+
* @launchdarkly/team-sdk-ruby

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LaunchDarkly Server-side SDK for Ruby
99

1010
LaunchDarkly overview
1111
-------------------------
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!
1313

1414
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1515

@@ -26,7 +26,7 @@ Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/r
2626
Learn more
2727
-----------
2828

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).
3030

3131
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).
3232

lib/ldclient-rb/context.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ def self.with_key(key, kind = KIND_DEFAULT)
317317
# {https://docs.launchdarkly.com/sdk/features/user-config SDK
318318
# documentation}.
319319
#
320+
# @deprecated The old user format will be removed in 8.0.0. Please use the new context specific format.
321+
#
320322
# @param data [Hash]
321323
# @return [LDContext]
322324
#
@@ -397,6 +399,8 @@ def self.create_multi(contexts)
397399
# @return [LDContext]
398400
#
399401
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+
400404
key = data[:key]
401405

402406
# Legacy users are allowed to have "" as a key but they cannot have nil as a key.

lib/ldclient-rb/impl/context.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def self.validate_kind(kind)
4040
return ERR_KIND_NON_STRING unless kind.is_a?(String)
4141
return ERR_KIND_CANNOT_BE_KIND if kind == "kind"
4242
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.-]+$/)
4444
end
4545

4646
#
@@ -51,7 +51,7 @@ def self.validate_kind(kind)
5151
#
5252
def self.validate_key(key)
5353
return ERR_KEY_NON_STRING unless key.is_a?(String)
54-
return ERR_KEY_EMPTY if key == ""
54+
ERR_KEY_EMPTY if key == ""
5555
end
5656

5757
#
@@ -61,7 +61,7 @@ def self.validate_key(key)
6161
# @return [String, nil]
6262
#
6363
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)
6565
end
6666

6767
#

lib/ldclient-rb/impl/event_sender.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def send_event_data(event_data, description, is_diagnostic)
6464
begin
6565
res_time = Time.httpdate(response.headers["date"])
6666
rescue ArgumentError
67+
# Ignored
6768
end
6869
end
6970
return EventSenderResult.new(true, false, res_time)

lib/ldclient-rb/impl/integrations/file_data_source.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class FileDataSourceImpl
1818
require 'listen'
1919
@@have_listen = true
2020
rescue LoadError
21+
# Ignored
2122
end
2223

2324
#

lib/ldclient-rb/impl/integrations/redis_impl.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require "ldclient-rb/interfaces"
12
require "concurrent/atomics"
23
require "json"
34

@@ -117,7 +118,7 @@ def initialize(opts)
117118
@logger = opts[:logger] || Config.default_logger
118119
@test_hook = opts[:test_hook] # used for unit tests, deliberately undocumented
119120

120-
@stopped = Concurrent::AtomicBoolean.new()
121+
@stopped = Concurrent::AtomicBoolean.new
121122

122123
with_connection do |redis|
123124
@logger.info("#{description}: using Redis instance at #{redis.connection[:host]}:#{redis.connection[:port]} and prefix: #{@prefix}")

lib/ldclient-rb/integrations/test_data.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def call(_, config)
9090
#
9191
def flag(key)
9292
existing_builder = @lock.with_read_lock { @flag_builders[key] }
93-
if existing_builder.nil? then
93+
if existing_builder.nil?
9494
FlagBuilder.new(key).boolean_flag
9595
else
9696
existing_builder.clone
@@ -118,7 +118,7 @@ def update(flag_builder)
118118
@flag_builders[flag_builder.key] = flag_builder
119119
version = 0
120120
flag_key = flag_builder.key.to_sym
121-
if @current_flags[flag_key] then
121+
if @current_flags[flag_key]
122122
version = @current_flags[flag_key][:version]
123123
end
124124
new_flag = Impl::Model.deserialize(FEATURES, flag_builder.build(version+1))
@@ -175,7 +175,7 @@ def use_preconfigured_segment(segment)
175175
key = item.key.to_sym
176176
@lock.with_write_lock do
177177
old_item = current[key]
178-
unless old_item.nil? then
178+
unless old_item.nil?
179179
data = item.as_json
180180
data[:version] = old_item.version + 1
181181
item = Impl::Model.deserialize(kind, data)

0 commit comments

Comments
 (0)