Skip to content

Commit

Permalink
prepare 6.2.5 release (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyReleaseBot authored Oct 12, 2021
1 parent cd9f081 commit 065e75a
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 48 deletions.
11 changes: 8 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
docker-image: cimg/ruby:3.0
- build-test-linux:
name: JRuby 9.2
docker-image: circleci/jruby:9.2-jdk
docker-image: jruby:9.2-jdk
jruby: true

jobs:
Expand All @@ -42,12 +42,17 @@ jobs:
condition: <<parameters.jruby>>
steps:
- run: gem install jruby-openssl # required by bundler, no effect on Ruby MRI
- run: sudo apt-get update -y && sudo apt-get install -y build-essential
- run: apt-get update -y && apt-get install -y build-essential
- when:
condition:
not: <<parameters.jruby>>
steps:
- run: sudo apt-get update -y && sudo apt-get install -y build-essential
- run: ruby -v
- run: gem install bundler -v 2.2.10
- run: bundle _2.2.10_ install
- run: mkdir ./rspec
- run: bundle _2.2.10_ exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec
- run: bundle _2.2.10_ exec rspec --format documentation --format RspecJunitFormatter -o ./rspec/rspec.xml spec
- store_test_results:
path: ./rspec
- store_artifacts:
Expand Down
17 changes: 7 additions & 10 deletions .ldrelease/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

# doc generation is not part of Releaser's standard Ruby project template

mkdir -p ./artifacts/

cd ./docs
make
cd ..
cd build/html

# Releaser will pick up docs generated in CI if we put an archive of them in the
# artifacts directory and name it docs.tar.gz or docs.zip. They will be uploaded
# to GitHub Pages and also attached as release artifacts. There's no separate
# "publish-docs" step because the external service that also hosts them doesn't
# require an upload, it just picks up gems automatically.
# Releaser will pick up generated docs if we put them in the designated
# directory. They will be uploaded to GitHub Pages and also attached as
# release artifacts. There's no separate "publish-docs" step because the
# external service that also hosts them doesn't require an upload, it just
# picks up gems automatically.

cd ./docs/build/html
tar cfz ../../../artifacts/docs.tar.gz *
cp -r * "${LD_RELEASE_DOCS_DIR}"
18 changes: 9 additions & 9 deletions .ldrelease/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version: 2

repo:
public: ruby-server-sdk
private: ruby-server-sdk-private

releasableBranches:
branches:
- name: master
- name: 5.x

Expand All @@ -12,18 +14,16 @@ publications:
- url: https://www.rubydoc.info/gems/launchdarkly-server-sdk
description: documentation

template:
name: ruby

circleci:
linux:
image: circleci/ruby:2.6.6-buster
context: org-global
jobs:
- docker:
image: ruby:2.5-buster
template:
name: ruby
env:
LD_SKIP_DATABASE_TESTS: "1" # Don't run Redis/Consul/DynamoDB tests in release; they are run in CI

documentation:
githubPages: true
gitHubPages: true

sdk:
displayName: "Ruby"
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ The gem name will also change. In the 5.5.6 release, it is still `ldclient-rb`;

## [5.5.0] - 2019-01-17
### Added:
- It is now possible to use Consul or DynamoDB as a persistent feature store, similar to the existing Redis integration. See the `LaunchDarkly::Integrations::Consul` and `LaunchDarkly::Integrations::DynamoDB` modules, and the reference guide [Using a persistent feature store](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
- It is now possible to use Consul or DynamoDB as a persistent feature store, similar to the existing Redis integration. See the `LaunchDarkly::Integrations::Consul` and `LaunchDarkly::Integrations::DynamoDB` modules, and the reference guide [Persistent data stores](https://docs.launchdarkly.com/sdk/concepts/data-stores).
- There is now a `LaunchDarkly::Integrations::Redis` module, which is the preferred method for creating a Redis feature store.
- All of the database feature stores now support local caching not only for individual feature flag queries, but also for `all_flags_state`.
- The `Config` property `data_source` is the new name for `update_processor` and `update_processor_factory`.
Expand Down Expand Up @@ -249,7 +249,7 @@ Fixed a regression in version 5.0.0 that could prevent the client from reconnect
## [4.0.0] - 2018-05-10

### Changed:
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option `inline_users_in_events`. For more details, see [Analytics Data Stream Reference](https://docs.launchdarkly.com/v2.0/docs/analytics-data-stream-reference).
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option `inline_users_in_events`.

### Removed:
- JRuby 1.7 is no longer supported.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributing to the LaunchDarkly Server-side SDK for Ruby
================================================

LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.
LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/sdk/concepts/contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.

Submitting bug reports and feature requests
------------------
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LaunchDarkly Server-side SDK for Ruby

LaunchDarkly overview
-------------------------
[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/docs/getting-started) using LaunchDarkly today!
[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!

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

Expand All @@ -22,7 +22,7 @@ This version of the LaunchDarkly SDK has a minimum Ruby version of 2.5.0, or 9.2
Getting started
-----------

Refer to the [SDK documentation](https://docs.launchdarkly.com/docs/ruby-sdk-reference#section-getting-started) for instructions on getting started with using the SDK.
Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/server-side/ruby#getting-started) for instructions on getting started with using the SDK.

Learn more
-----------
Expand All @@ -49,7 +49,7 @@ About LaunchDarkly
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Read [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
* Explore LaunchDarkly
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
Expand Down
8 changes: 5 additions & 3 deletions launchdarkly-server-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "ldclient-rb/version"
require "rake"

# rubocop:disable Metrics/BlockLength
Gem::Specification.new do |spec|
Expand All @@ -15,9 +16,8 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/launchdarkly/ruby-server-sdk"
spec.license = "Apache-2.0"

spec.files = `git ls-files -z`.split("\x0")
spec.files = FileList["lib/**/*", "README.md", "LICENSE.txt"]
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.5.0"

Expand All @@ -36,7 +36,9 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency "semantic", "~> 1.6"
spec.add_runtime_dependency "concurrent-ruby", "~> 1.1"
spec.add_runtime_dependency "ld-eventsource", "2.0.1"
spec.add_runtime_dependency "ld-eventsource", "2.1.1"
# Please keep ld-eventsource dependency as an exact version so that bugfixes to
# that LD library are always associated with a new SDK version.

spec.add_runtime_dependency "json", "~> 2.3"
spec.add_runtime_dependency "http", ">= 4.4.0", "< 6.0.0"
Expand Down
6 changes: 3 additions & 3 deletions lib/ldclient-rb/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def stream?
# Whether to use the LaunchDarkly relay proxy in daemon mode. In this mode, the client does not
# use polling or streaming to get feature flag updates from the server, but instead reads them
# from the {#feature_store feature store}, which is assumed to be a database that is populated by
# a LaunchDarkly relay proxy. For more information, see ["The relay proxy"](https://docs.launchdarkly.com/v2.0/docs/the-relay-proxy)
# and ["Using a persistent feature store"](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
# a LaunchDarkly relay proxy. For more information, see ["The relay proxy"](https://docs.launchdarkly.com/home/relay-proxy)
# and ["Using a persistent data stores"](https://docs.launchdarkly.com/sdk/concepts/data-stores).
#
# All other properties related to streaming or polling are ignored if this option is set to true.
#
Expand Down Expand Up @@ -189,7 +189,7 @@ def offline?
# from LaunchDarkly, and uses the last stored data when evaluating flags. Defaults to
# {InMemoryFeatureStore}; for other implementations, see {LaunchDarkly::Integrations}.
#
# For more information, see ["Using a persistent feature store"](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
# For more information, see ["Persistent data stores"](https://docs.launchdarkly.com/sdk/concepts/data-stores).
#
# @return [LaunchDarkly::Interfaces::FeatureStore]
#
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/integrations/dynamodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module DynamoDB
#
# Creates a DynamoDB-backed persistent feature store. For more details about how and why you can
# use a persistent feature store, see the
# [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
# [SDK reference guide](https://docs.launchdarkly.com/sdk/features/storing-data#ruby).
#
# To use this method, you must first install one of the AWS SDK gems: either `aws-sdk-dynamodb`, or
# the full `aws-sdk`. Then, put the object returned by this method into the `feature_store` property
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/integrations/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.default_prefix
#
# Creates a Redis-backed persistent feature store. For more details about how and why you can
# use a persistent feature store, see the
# [SDK reference guide](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
# [SDK reference guide](https://docs.launchdarkly.com/sdk/features/storing-data#rubys).
#
# To use this method, you must first have the `redis` and `connection-pool` gems installed. Then,
# put the object returned by this method into the `feature_store` property of your
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/interfaces.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Interfaces
# client uses the feature store to persist feature flags and related objects received from
# the LaunchDarkly service. Implementations must support concurrent access and updates.
# For more about how feature stores can be used, see:
# [Using a persistent feature store](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
# [Using a persistent feature store](https://docs.launchdarkly.com/sdk/features/storing-data#ruby).
#
# An entity that can be stored in a feature store is a hash that can be converted to and from
# JSON, and that has at a minimum the following properties: `:key`, a string that is unique
Expand Down
10 changes: 5 additions & 5 deletions lib/ldclient-rb/ldclient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def toggle?(key, user, default = false)

#
# Creates a hash string that can be used by the JavaScript SDK to identify a user.
# For more information, see [Secure mode](https://docs.launchdarkly.com/docs/js-sdk-reference#section-secure-mode).
# For more information, see [Secure mode](https://docs.launchdarkly.com/sdk/features/secure-mode#ruby).
#
# @param user [Hash] the user properties
# @return [String] a hash string
Expand Down Expand Up @@ -172,11 +172,11 @@ def initialized?
#
# Other supported user attributes include IP address, country code, and an arbitrary hash of
# custom attributes. For more about the supported user properties and how they work in
# LaunchDarkly, see [Targeting users](https://docs.launchdarkly.com/docs/targeting-users).
# LaunchDarkly, see [Targeting users](https://docs.launchdarkly.com/home/flags/targeting-users).
#
# The optional `:privateAttributeNames` user property allows you to specify a list of
# attribute names that should not be sent back to LaunchDarkly.
# [Private attributes](https://docs.launchdarkly.com/docs/private-user-attributes)
# [Private attributes](https://docs.launchdarkly.com/home/users/attributes#creating-private-user-attributes)
# can also be configured globally in {Config}.
#
# @example Basic user hash
Expand Down Expand Up @@ -213,7 +213,7 @@ def variation(key, user, default)
# be included in analytics events, if you are capturing detailed event data for this flag.
#
# For more information, see the reference guide on
# [Evaluation reasons](https://docs.launchdarkly.com/v2.0/docs/evaluation-reasons).
# [Evaluation reasons](https://docs.launchdarkly.com/sdk/concepts/evaluation-reasons).
#
# @param key [String] the unique feature key for the feature flag, as shown
# on the LaunchDarkly dashboard
Expand Down Expand Up @@ -260,7 +260,7 @@ def identify(user)
#
# As of this version’s release date, the LaunchDarkly service does not support the `metricValue`
# parameter. As a result, specifying `metricValue` will not yet produce any different behavior
# from omitting it. Refer to the [SDK reference guide](https://docs.launchdarkly.com/docs/ruby-sdk-reference#section-track)
# from omitting it. Refer to the [SDK reference guide](https://docs.launchdarkly.com/sdk/features/events#ruby)
# for the latest status.
#
# @param event_name [String] The name of the event
Expand Down
6 changes: 4 additions & 2 deletions spec/event_sender_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ def with_sender_and_server
with_server do |server|
server.setup_ok_response("/bulk", "")

config = Config.new(events_uri: "http://events.com/bulk", socket_factory: SocketFactoryFromHash.new({"events.com" => server.port}), logger: $null_log)
config = Config.new(events_uri: "http://fake-event-server/bulk",
socket_factory: SocketFactoryFromHash.new({"fake-event-server" => server.port}),
logger: $null_log)
es = subject.new(sdk_key, config, nil, 0.1)

result = es.send_event_data(fake_data, "", false)

expect(result.success).to be true
req = server.await_request
expect(req.body).to eq fake_data
expect(req.host).to eq "events.com"
expect(req.host).to eq "fake-event-server"
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/ldclient_end_to_end_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ module LaunchDarkly

config = Config.new(
stream: false,
base_uri: "http://polling.com",
events_uri: "http://events.com",
base_uri: "http://fake-polling-server",
events_uri: "http://fake-events-server",
diagnostic_opt_out: true,
logger: NullLogger.new,
socket_factory: SocketFactoryFromHash.new({
"polling.com" => poll_server.port,
"events.com" => events_server.port
"fake-polling-server" => poll_server.port,
"fake-events-server" => events_server.port
})
)
with_client(config) do |client|
Expand Down

0 comments on commit 065e75a

Please sign in to comment.