launchdarkly-server-sdk 5.7.3 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +28 -122
- data/.gitignore +1 -1
- data/.ldrelease/build-docs.sh +18 -0
- data/.ldrelease/circleci/linux/execute.sh +18 -0
- data/.ldrelease/circleci/mac/execute.sh +18 -0
- data/.ldrelease/circleci/template/build.sh +29 -0
- data/.ldrelease/circleci/template/publish.sh +23 -0
- data/.ldrelease/circleci/template/set-gem-home.sh +7 -0
- data/.ldrelease/circleci/template/test.sh +10 -0
- data/.ldrelease/circleci/template/update-version.sh +8 -0
- data/.ldrelease/circleci/windows/execute.ps1 +19 -0
- data/.ldrelease/config.yml +14 -2
- data/CHANGELOG.md +36 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile.lock +92 -76
- data/README.md +5 -3
- data/azure-pipelines.yml +1 -1
- data/docs/Makefile +26 -0
- data/docs/index.md +9 -0
- data/launchdarkly-server-sdk.gemspec +20 -13
- data/lib/ldclient-rb.rb +0 -1
- data/lib/ldclient-rb/config.rb +15 -3
- data/lib/ldclient-rb/evaluation_detail.rb +293 -0
- data/lib/ldclient-rb/events.rb +1 -4
- data/lib/ldclient-rb/file_data_source.rb +1 -1
- data/lib/ldclient-rb/impl/evaluator.rb +225 -0
- data/lib/ldclient-rb/impl/evaluator_bucketing.rb +74 -0
- data/lib/ldclient-rb/impl/evaluator_operators.rb +160 -0
- data/lib/ldclient-rb/impl/event_sender.rb +56 -40
- data/lib/ldclient-rb/impl/integrations/consul_impl.rb +5 -5
- data/lib/ldclient-rb/impl/integrations/dynamodb_impl.rb +5 -5
- data/lib/ldclient-rb/impl/integrations/redis_impl.rb +8 -7
- data/lib/ldclient-rb/impl/model/serialization.rb +62 -0
- data/lib/ldclient-rb/impl/unbounded_pool.rb +34 -0
- data/lib/ldclient-rb/integrations/redis.rb +3 -0
- data/lib/ldclient-rb/ldclient.rb +16 -11
- data/lib/ldclient-rb/polling.rb +1 -4
- data/lib/ldclient-rb/redis_store.rb +1 -0
- data/lib/ldclient-rb/requestor.rb +25 -23
- data/lib/ldclient-rb/stream.rb +10 -30
- data/lib/ldclient-rb/user_filter.rb +3 -2
- data/lib/ldclient-rb/util.rb +12 -8
- data/lib/ldclient-rb/version.rb +1 -1
- data/spec/evaluation_detail_spec.rb +135 -0
- data/spec/event_sender_spec.rb +20 -2
- data/spec/events_spec.rb +11 -0
- data/spec/http_util.rb +11 -1
- data/spec/impl/evaluator_bucketing_spec.rb +111 -0
- data/spec/impl/evaluator_clause_spec.rb +55 -0
- data/spec/impl/evaluator_operators_spec.rb +141 -0
- data/spec/impl/evaluator_rule_spec.rb +96 -0
- data/spec/impl/evaluator_segment_spec.rb +125 -0
- data/spec/impl/evaluator_spec.rb +305 -0
- data/spec/impl/evaluator_spec_base.rb +75 -0
- data/spec/impl/model/serialization_spec.rb +41 -0
- data/spec/launchdarkly-server-sdk_spec.rb +1 -1
- data/spec/ldclient_end_to_end_spec.rb +34 -0
- data/spec/ldclient_spec.rb +10 -8
- data/spec/polling_spec.rb +2 -2
- data/spec/redis_feature_store_spec.rb +32 -3
- data/spec/requestor_spec.rb +11 -45
- data/spec/spec_helper.rb +0 -3
- data/spec/stream_spec.rb +1 -16
- metadata +110 -60
- data/.yardopts +0 -9
- data/lib/ldclient-rb/evaluation.rb +0 -462
- data/scripts/gendocs.sh +0 -11
- data/scripts/release.sh +0 -27
- data/spec/evaluation_spec.rb +0 -789
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fd5b1ccdc654b9ca033547f366d12fe0dde0d25245459de79f9cf1e3ed0e9b79
|
4
|
+
data.tar.gz: ee6461f8365f0df76055b8c1e5e71b58934df15b24bba22c8b61eb99619b21dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6723297fc581f47325f0147f915efa543f1daf27d01af6d63a13546a5d18e800743060478e9f40c62083ceae5bcd8acfaa8c84d83fc870b893069ae51a9f519
|
7
|
+
data.tar.gz: 89b4885e33f1ebf61fd88b4a65c4da060087901aaf9772100875888b0983f420099b23971c6b8ba8d71697da410daf0b43e88c946192cb8899682aff9b77a64d
|
data/.circleci/config.yml
CHANGED
@@ -1,134 +1,40 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# This CircleCI configuration was generated by Releaser for a specific release. It is not to be used
|
2
|
+
# for regular CI builds. Be aware that rerunning this build may cause it to repeat release actions
|
3
|
+
# such as publishing to a package manager. However, it will not perform any Git actions other than
|
4
|
+
# reading the repository.
|
5
|
+
version: 2.1
|
3
6
|
workflows:
|
4
|
-
version: 2
|
5
7
|
test:
|
6
8
|
jobs:
|
7
|
-
-
|
8
|
-
|
9
|
-
- test-2.3
|
10
|
-
- test-2.4
|
11
|
-
- test-2.5
|
12
|
-
- test-2.6
|
13
|
-
- test-jruby-9.2
|
14
|
-
|
15
|
-
ruby-docker-template: &ruby-docker-template
|
16
|
-
steps:
|
17
|
-
- checkout
|
18
|
-
- run: |
|
19
|
-
if [[ $CIRCLE_JOB == test-jruby* ]]; then
|
20
|
-
gem install jruby-openssl; # required by bundler, no effect on Ruby MRI
|
21
|
-
fi
|
22
|
-
- run: ruby -v
|
23
|
-
- run: gem install bundler -v 1.17.3
|
24
|
-
- run: bundle install
|
25
|
-
- run: mkdir ./rspec
|
26
|
-
- run: bundle exec rspec --format progress --format RspecJunitFormatter -o ./rspec/rspec.xml spec
|
27
|
-
- store_test_results:
|
28
|
-
path: ./rspec
|
29
|
-
- store_artifacts:
|
30
|
-
path: ./rspec
|
31
|
-
|
9
|
+
- release_linux:
|
10
|
+
context: org-global
|
32
11
|
jobs:
|
33
|
-
|
34
|
-
<<: *ruby-docker-template
|
12
|
+
release_linux:
|
35
13
|
docker:
|
36
|
-
- image: circleci/ruby:2.
|
37
|
-
- image: consul
|
38
|
-
- image: redis
|
39
|
-
- image: amazon/dynamodb-local
|
40
|
-
test-2.3:
|
41
|
-
<<: *ruby-docker-template
|
42
|
-
docker:
|
43
|
-
- image: circleci/ruby:2.3.7-jessie
|
44
|
-
- image: consul
|
45
|
-
- image: redis
|
46
|
-
- image: amazon/dynamodb-local
|
47
|
-
test-2.4:
|
48
|
-
<<: *ruby-docker-template
|
49
|
-
docker:
|
50
|
-
- image: circleci/ruby:2.4.5-stretch
|
51
|
-
- image: consul
|
52
|
-
- image: redis
|
53
|
-
- image: amazon/dynamodb-local
|
54
|
-
test-2.5:
|
55
|
-
<<: *ruby-docker-template
|
56
|
-
docker:
|
57
|
-
- image: circleci/ruby:2.5.3-stretch
|
58
|
-
- image: consul
|
59
|
-
- image: redis
|
60
|
-
- image: amazon/dynamodb-local
|
61
|
-
test-2.6:
|
62
|
-
<<: *ruby-docker-template
|
63
|
-
docker:
|
64
|
-
- image: circleci/ruby:2.6.2-stretch
|
65
|
-
- image: consul
|
66
|
-
- image: redis
|
67
|
-
- image: amazon/dynamodb-local
|
68
|
-
test-jruby-9.2:
|
69
|
-
<<: *ruby-docker-template
|
70
|
-
docker:
|
71
|
-
- image: circleci/jruby:9-jdk
|
72
|
-
- image: consul
|
73
|
-
- image: redis
|
74
|
-
- image: amazon/dynamodb-local
|
75
|
-
|
76
|
-
# The following very slow job uses an Ubuntu container to run the Ruby versions that
|
77
|
-
# CircleCI doesn't provide Docker images for.
|
78
|
-
test-misc-rubies:
|
79
|
-
machine:
|
80
|
-
image: circleci/classic:latest
|
14
|
+
- image: circleci/ruby:2.6.6-buster
|
81
15
|
environment:
|
82
|
-
|
16
|
+
LD_RELEASE_CIRCLECI_TYPE: linux
|
17
|
+
LD_RELEASE_BRANCH: "master"
|
18
|
+
LD_RELEASE_CIRCLECI_BRANCH: ""
|
19
|
+
LD_RELEASE_DOCS_GITHUB_PAGES: "1"
|
20
|
+
LD_RELEASE_DOCS_TITLE: ""
|
21
|
+
LD_RELEASE_PROJECT: "ruby-server-sdk"
|
22
|
+
LD_RELEASE_PROJECT_TEMPLATE: "ruby"
|
23
|
+
LD_RELEASE_VERSION: "6.0.0"
|
24
|
+
LD_SKIP_DATABASE_TESTS: "1"
|
83
25
|
steps:
|
84
|
-
- run: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
85
|
-
- run: sudo apt-get -q update
|
86
|
-
- run: sudo apt-get -qy install redis-server
|
87
|
-
- run: sudo apt-cache policy docker-ce
|
88
|
-
- run: sudo apt-get -qy install docker-ce
|
89
26
|
- checkout
|
90
27
|
- run:
|
91
|
-
name:
|
92
|
-
command:
|
93
|
-
- run:
|
94
|
-
name: bundle install for all versions
|
95
|
-
shell: /bin/bash -leo pipefail # need -l in order for "rvm use" to work
|
96
|
-
command: |
|
97
|
-
set -e;
|
98
|
-
for i in $RUBIES;
|
99
|
-
do
|
100
|
-
rvm use $i;
|
101
|
-
if [[ $i == jruby* ]]; then
|
102
|
-
gem install jruby-openssl; # required by bundler, no effect on Ruby MRI
|
103
|
-
fi
|
104
|
-
# bundler 2.0 may be preinstalled, we need to remove it if so
|
105
|
-
yes | gem uninstall bundler --version '>=2.0' || true;
|
106
|
-
gem install bundler -v 1.17.3;
|
107
|
-
bundle install;
|
108
|
-
mv Gemfile.lock "Gemfile.lock.$i"
|
109
|
-
done
|
110
|
-
- run:
|
111
|
-
name: start DynamoDB
|
112
|
-
command: docker run -p 8000:8000 amazon/dynamodb-local
|
113
|
-
background: true
|
114
|
-
- run:
|
115
|
-
name: download Consul
|
116
|
-
command: wget https://releases.hashicorp.com/consul/0.8.0/consul_0.8.0_linux_amd64.zip
|
28
|
+
name: "Releaser: build"
|
29
|
+
command: .ldrelease/circleci/mac/execute.sh build .ldrelease/circleci/template/build.sh
|
117
30
|
- run:
|
118
|
-
name:
|
119
|
-
command:
|
31
|
+
name: "Releaser: test"
|
32
|
+
command: .ldrelease/circleci/mac/execute.sh test .ldrelease/circleci/template/test.sh
|
120
33
|
- run:
|
121
|
-
name:
|
122
|
-
command:
|
123
|
-
background: true
|
34
|
+
name: "Releaser: build-docs"
|
35
|
+
command: .ldrelease/circleci/mac/execute.sh build-docs .ldrelease/build-docs.sh
|
124
36
|
- run:
|
125
|
-
name:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
for i in $RUBIES;
|
130
|
-
do
|
131
|
-
rvm use $i;
|
132
|
-
cp "Gemfile.lock.$i" Gemfile.lock;
|
133
|
-
bundle exec rspec spec;
|
134
|
-
done
|
37
|
+
name: "Releaser: publish"
|
38
|
+
command: .ldrelease/circleci/mac/execute.sh publish .ldrelease/circleci/template/publish.sh
|
39
|
+
- store_artifacts:
|
40
|
+
path: artifacts
|
data/.gitignore
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# doc generation is not part of Releaser's standard Ruby project template
|
4
|
+
|
5
|
+
mkdir -p ./artifacts/
|
6
|
+
|
7
|
+
cd ./docs
|
8
|
+
make
|
9
|
+
cd ..
|
10
|
+
|
11
|
+
# Releaser will pick up docs generated in CI if we put an archive of them in the
|
12
|
+
# artifacts directory and name it docs.tar.gz or docs.zip. They will be uploaded
|
13
|
+
# to GitHub Pages and also attached as release artifacts. There's no separate
|
14
|
+
# "publish-docs" step because the external service that also hosts them doesn't
|
15
|
+
# require an upload, it just picks up gems automatically.
|
16
|
+
|
17
|
+
cd ./docs/build/html
|
18
|
+
tar cfz ../../../artifacts/docs.tar.gz *
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Performs a delegated release step in a CircleCI Linux container. This mechanism is described
|
6
|
+
# in scripts/circleci/README.md. All of the necessary environment variables should already be
|
7
|
+
# in the generated CircleCI configuration.
|
8
|
+
|
9
|
+
mkdir -p artifacts
|
10
|
+
|
11
|
+
export LD_RELEASE_TEMP_DIR=/tmp/project-releaser-temp
|
12
|
+
mkdir -p ${LD_RELEASE_TEMP_DIR}
|
13
|
+
|
14
|
+
STEP="$1"
|
15
|
+
SCRIPT="$2"
|
16
|
+
echo
|
17
|
+
echo "[${STEP}] executing ${SCRIPT}"
|
18
|
+
"./${SCRIPT}"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Performs a delegated release step in a CircleCI Mac container. This mechanism is described
|
6
|
+
# in scripts/circleci/README.md. All of the necessary environment variables should already be
|
7
|
+
# in the generated CircleCI configuration.
|
8
|
+
|
9
|
+
mkdir -p artifacts
|
10
|
+
|
11
|
+
export LD_RELEASE_TEMP_DIR=/tmp/project-releaser-temp
|
12
|
+
mkdir -p ${LD_RELEASE_TEMP_DIR}
|
13
|
+
|
14
|
+
STEP="$1"
|
15
|
+
SCRIPT="$2"
|
16
|
+
echo
|
17
|
+
echo "[${STEP}] executing ${SCRIPT}"
|
18
|
+
"./${SCRIPT}"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard build.sh for Ruby-based projects that publish a gem
|
6
|
+
|
7
|
+
echo "Using gem $(gem --version)"
|
8
|
+
|
9
|
+
#shellcheck source=/dev/null
|
10
|
+
source "$(dirname "$0")/set-gem-home.sh"
|
11
|
+
|
12
|
+
# If the gemspec specifies a certain version of bundler, we need to make sure we install that version.
|
13
|
+
echo "Installing bundler"
|
14
|
+
GEMSPEC_BUNDLER_VERSION=$(sed -n -e "s/.*['\"]bundler['\"], *['\"]\([^'\"]*\)['\"]/\1/p" ./*.gemspec | tr -d ' ')
|
15
|
+
if [ -n "${GEMSPEC_BUNDLER_VERSION}" ]; then
|
16
|
+
GEMSPEC_OPTIONS="-v ${GEMSPEC_BUNDLER_VERSION}"
|
17
|
+
else
|
18
|
+
GEMSPEC_OPTIONS=""
|
19
|
+
fi
|
20
|
+
gem install bundler ${GEMSPEC_OPTIONS} || { echo "installing bundler failed" >&2; exit 1; }
|
21
|
+
|
22
|
+
echo; echo "Installing dependencies"
|
23
|
+
bundle install
|
24
|
+
|
25
|
+
# Build Ruby Gem - this assumes there is a single .gemspec file in the main project directory
|
26
|
+
# Note that the gemspec must be able to get the project version either from $LD_RELEASE_VERSION,
|
27
|
+
# or from somewhere in the source code that the project-specific update-version.sh has updated.
|
28
|
+
echo "Running gem build"
|
29
|
+
gem build ./*.gemspec || { echo "gem build failed" >&2; exit 1; }
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard publish.sh for Ruby-based projects - we can assume build.sh has already been run
|
6
|
+
|
7
|
+
export GEM_HOME="${LD_RELEASE_TEMP_DIR}/gems"
|
8
|
+
|
9
|
+
# If we're running in CircleCI, the RubyGems credentials will be in an environment
|
10
|
+
# variable and need to be copied to a file
|
11
|
+
if [ -n "${LD_RELEASE_RUBYGEMS_API_KEY}" ]; then
|
12
|
+
mkdir -p ~/.gem
|
13
|
+
cat >~/.gem/credentials <<EOF
|
14
|
+
---
|
15
|
+
:rubygems_api_key: $LD_RELEASE_RUBYGEMS_API_KEY
|
16
|
+
EOF
|
17
|
+
chmod 0600 ~/.gem/credentials
|
18
|
+
fi
|
19
|
+
|
20
|
+
# Since all Releaser builds are clean builds, we can assume that the only .gem file here
|
21
|
+
# is the one we just built
|
22
|
+
echo "Running gem push"
|
23
|
+
gem push ./*.gem || { echo "gem push failed" >&2; exit 1; }
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -ue
|
4
|
+
|
5
|
+
# Standard update-version.sh for Ruby-based projects - this will work only if the version string
|
6
|
+
# is in a source file under lib/ that has a line like his: VERSION = "2.0.0"
|
7
|
+
|
8
|
+
"$(dirname "$0")/../update-version-constant.sh" lib '*.rb'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
param(
|
2
|
+
[string]$step,
|
3
|
+
[string]$script
|
4
|
+
)
|
5
|
+
|
6
|
+
# Performs a delegated release step in a CircleCI Windows container using PowerShell. This
|
7
|
+
# mechanism is described in scripts/circleci/README.md. All of the necessary environment
|
8
|
+
# variables should already be in the generated CircleCI configuration.
|
9
|
+
|
10
|
+
$ErrorActionPreference = "Stop"
|
11
|
+
|
12
|
+
New-Item -Path "./artifacts" -ItemType "directory" -Force | Out-Null
|
13
|
+
|
14
|
+
$env:LD_RELEASE_TEMP_DIR = "$env:TEMP\project-releaser-temp"
|
15
|
+
New-Item -Path $env:LD_RELEASE_TEMP_DIR -ItemType "directory" -Force | Out-Null
|
16
|
+
|
17
|
+
Write-Host
|
18
|
+
Write-Host "[$step] executing $script"
|
19
|
+
& "./$script"
|
data/.ldrelease/config.yml
CHANGED
@@ -2,6 +2,10 @@ repo:
|
|
2
2
|
public: ruby-server-sdk
|
3
3
|
private: ruby-server-sdk-private
|
4
4
|
|
5
|
+
releasableBranches:
|
6
|
+
- name: master
|
7
|
+
- name: 5.x
|
8
|
+
|
5
9
|
publications:
|
6
10
|
- url: https://rubygems.org/gems/launchdarkly-server-sdk
|
7
11
|
description: RubyGems
|
@@ -10,8 +14,16 @@ publications:
|
|
10
14
|
|
11
15
|
template:
|
12
16
|
name: ruby
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
circleci:
|
19
|
+
linux:
|
20
|
+
image: circleci/ruby:2.6.6-buster
|
21
|
+
context: org-global
|
22
|
+
env:
|
23
|
+
LD_SKIP_DATABASE_TESTS: "1" # Don't run Redis/Consul/DynamoDB tests in release; they are run in CI
|
24
|
+
|
25
|
+
documentation:
|
26
|
+
githubPages: true
|
15
27
|
|
16
28
|
sdk:
|
17
29
|
displayName: "Ruby"
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,42 @@
|
|
2
2
|
|
3
3
|
All notable changes to the LaunchDarkly Ruby SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
|
4
4
|
|
5
|
+
## [6.0.0] - 2021-01-26
|
6
|
+
### Added:
|
7
|
+
- Added a `socket_factory` configuration option which can be used for socket creation by the HTTP client if provided. The value of `socket_factory` must be an object providing an `open(uri, timeout)` method and returning a connected socket.
|
8
|
+
|
9
|
+
### Changed:
|
10
|
+
- Switched to the `http` gem instead of `socketry` (with a custom http client) for streaming, and instead of `Net::HTTP` for polling / events.
|
11
|
+
- Dropped support for Ruby < version 2.5
|
12
|
+
- Dropped support for JRuby < version 9.2
|
13
|
+
|
14
|
+
## [5.8.2] - 2021-01-19
|
15
|
+
### Fixed:
|
16
|
+
- Fixed a warning within the Redis integration when run with version 4.3 or later of the `redis` gem. (Thanks, [emancu](https://github.com/launchdarkly/ruby-server-sdk/pull/167)!)
|
17
|
+
|
18
|
+
|
19
|
+
## [5.8.1] - 2020-11-09
|
20
|
+
### Fixed:
|
21
|
+
- Updated `json` gem to patch [CVE-2020-10663](https://nvd.nist.gov/vuln/detail/CVE-2020-10663).
|
22
|
+
|
23
|
+
|
24
|
+
## [5.8.0] - 2020-05-27
|
25
|
+
### Added:
|
26
|
+
- In `LaunchDarkly::Integrations::Redis::new_feature_store`, if you pass in an externally created `pool`, you can now set the new option `pool_shutdown_on_close` to `false` to indicate that the SDK should _not_ shut down this pool if the SDK is shut down. The default behavior, as before, is that it will be shut down. (Thanks, [jacobthemyth](https://github.com/launchdarkly/ruby-server-sdk/pull/158)!)
|
27
|
+
|
28
|
+
## [5.7.4] - 2020-05-04
|
29
|
+
### Fixed:
|
30
|
+
- Setting a user's `custom` property explicitly to `nil`, rather than omitting it entirely or setting it to an empty hash, would cause the SDK to log an error and drop the current batch of analytics events. Now, it will be treated the same as an empty hash. ([#147](https://github.com/launchdarkly/ruby-server-sdk/issues/147))
|
31
|
+
|
32
|
+
## [5.7.3] - 2020-04-27
|
33
|
+
### Changed:
|
34
|
+
- Previously, installing the SDK in an environment that did not have `openssl` would cause a failure at build time. The SDK still requires `openssl` at runtime, but this check has been removed because it caused the `rake` problem mentioned below, and because `openssl` is normally bundled in modern Ruby versions.
|
35
|
+
|
36
|
+
### Fixed:
|
37
|
+
- The `LDClient` constructor will fail immediately with a descriptive `ArgumentError` if you provide a `nil` SDK key in a configuration that requires an SDK key (that is, a configuration that _will_ require communicating with LaunchDarkly services). Previously, it would still fail, but without a clear error message. You are still allowed to omit the SDK key in an offline configuration. ([#154](https://github.com/launchdarkly/ruby-server-sdk/issues/154))
|
38
|
+
- Removed a hidden dependency on `rake` which could cause your build to fail if you had a dependency on this SDK and you did not have `rake` installed. ([#155](https://github.com/launchdarkly/ruby-server-sdk/issues/155))
|
39
|
+
- Previously a clause in a feature flag rule that used a string operator (such as "starts with") or a numeric operator (such as "greater than") could cause evaluation of the flag to completely fail and return a default value if the value on the right-hand side of the expression did not have the right data type-- for instance, "greater than" with a string value. The LaunchDarkly dashboard does not allow creation of such a rule, but it might be possible to do so via the REST API; the correct behavior of the SDK is to simply treat the expression as a non-match.
|
40
|
+
|
5
41
|
## [5.7.2] - 2020-03-27
|
6
42
|
### Fixed:
|
7
43
|
- Fixed a bug in the 5.7.0 and 5.7.1 releases that caused analytics events not to be sent unless diagnostic events were explicitly disabled. This also caused an error to be logged: `undefined method started?`.
|
data/CONTRIBUTING.md
CHANGED
@@ -18,7 +18,7 @@ Build instructions
|
|
18
18
|
|
19
19
|
### Prerequisites
|
20
20
|
|
21
|
-
This SDK is built with [Bundler](https://bundler.io/). To install Bundler, run `gem install bundler
|
21
|
+
This SDK is built with [Bundler](https://bundler.io/). To install Bundler, run `gem install bundler`. You might need `sudo` to execute the command successfully.
|
22
22
|
|
23
23
|
To install the runtime dependencies:
|
24
24
|
|
data/Gemfile.lock
CHANGED
@@ -1,100 +1,116 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
launchdarkly-server-sdk (
|
5
|
-
concurrent-ruby (~> 1.
|
6
|
-
|
7
|
-
|
4
|
+
launchdarkly-server-sdk (6.0.0)
|
5
|
+
concurrent-ruby (~> 1.1)
|
6
|
+
http (~> 4.4.1)
|
7
|
+
json (~> 2.3.1)
|
8
|
+
ld-eventsource (~> 2.0)
|
8
9
|
semantic (~> 1.6)
|
9
10
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
addressable (2.7.0)
|
15
|
+
public_suffix (>= 2.0.2, < 5.0)
|
16
|
+
ansi (1.5.0)
|
17
|
+
ast (2.4.2)
|
18
|
+
aws-eventstream (1.1.0)
|
19
|
+
aws-partitions (1.418.0)
|
20
|
+
aws-sdk-core (3.111.2)
|
21
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
22
|
+
aws-partitions (~> 1, >= 1.239.0)
|
23
|
+
aws-sigv4 (~> 1.1)
|
19
24
|
jmespath (~> 1.0)
|
20
|
-
aws-sdk-dynamodb (1.
|
21
|
-
aws-sdk-core (~> 3, >= 3.
|
22
|
-
aws-sigv4 (~> 1.
|
23
|
-
aws-sigv4 (1.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
diff-lcs (1.
|
29
|
-
diplomat (2.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
aws-sdk-dynamodb (1.58.0)
|
26
|
+
aws-sdk-core (~> 3, >= 3.109.0)
|
27
|
+
aws-sigv4 (~> 1.1)
|
28
|
+
aws-sigv4 (1.2.2)
|
29
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
30
|
+
concurrent-ruby (1.1.8)
|
31
|
+
connection_pool (2.2.3)
|
32
|
+
deep_merge (1.2.1)
|
33
|
+
diff-lcs (1.4.4)
|
34
|
+
diplomat (2.4.2)
|
35
|
+
deep_merge (~> 1.0, >= 1.0.1)
|
36
|
+
faraday (>= 0.9, < 1.1.0)
|
37
|
+
domain_name (0.5.20190701)
|
38
|
+
unf (>= 0.0.5, < 1.0.0)
|
39
|
+
faraday (1.0.1)
|
34
40
|
multipart-post (>= 1.2, < 3)
|
35
|
-
ffi (1.
|
36
|
-
ffi (1.
|
37
|
-
|
38
|
-
|
39
|
-
|
41
|
+
ffi (1.14.2)
|
42
|
+
ffi-compiler (1.0.1)
|
43
|
+
ffi (>= 1.0.0)
|
44
|
+
rake
|
45
|
+
http (4.4.1)
|
46
|
+
addressable (~> 2.3)
|
47
|
+
http-cookie (~> 1.0)
|
48
|
+
http-form_data (~> 2.2)
|
49
|
+
http-parser (~> 1.2.0)
|
50
|
+
http-cookie (1.0.3)
|
51
|
+
domain_name (~> 0.5)
|
52
|
+
http-form_data (2.3.0)
|
53
|
+
http-parser (1.2.3)
|
54
|
+
ffi-compiler (>= 1.0, < 2.0)
|
40
55
|
jmespath (1.4.0)
|
41
|
-
json (
|
42
|
-
|
43
|
-
ld-eventsource (1.0.3)
|
56
|
+
json (2.3.1)
|
57
|
+
ld-eventsource (2.0.0)
|
44
58
|
concurrent-ruby (~> 1.0)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
rb-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
rspec-
|
62
|
-
|
59
|
+
http (~> 4.4.1)
|
60
|
+
listen (3.4.1)
|
61
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
62
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
63
|
+
multipart-post (2.1.1)
|
64
|
+
oga (2.15)
|
65
|
+
ast
|
66
|
+
ruby-ll (~> 2.1)
|
67
|
+
public_suffix (4.0.6)
|
68
|
+
rake (13.0.3)
|
69
|
+
rb-fsevent (0.10.4)
|
70
|
+
rb-inotify (0.10.1)
|
71
|
+
ffi (~> 1.0)
|
72
|
+
redis (4.2.5)
|
73
|
+
rspec (3.10.0)
|
74
|
+
rspec-core (~> 3.10.0)
|
75
|
+
rspec-expectations (~> 3.10.0)
|
76
|
+
rspec-mocks (~> 3.10.0)
|
77
|
+
rspec-core (3.10.1)
|
78
|
+
rspec-support (~> 3.10.0)
|
79
|
+
rspec-expectations (3.10.1)
|
63
80
|
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
-
rspec-support (~> 3.
|
65
|
-
rspec-mocks (3.
|
81
|
+
rspec-support (~> 3.10.0)
|
82
|
+
rspec-mocks (3.10.1)
|
66
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
|
-
rspec-support (~> 3.
|
68
|
-
rspec-support (3.
|
69
|
-
rspec_junit_formatter (0.
|
84
|
+
rspec-support (~> 3.10.0)
|
85
|
+
rspec-support (3.10.1)
|
86
|
+
rspec_junit_formatter (0.4.1)
|
70
87
|
rspec-core (>= 2, < 4, != 2.12.0)
|
71
|
-
|
88
|
+
ruby-ll (2.1.2)
|
89
|
+
ansi
|
90
|
+
ast
|
72
91
|
semantic (1.6.1)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
socketry (0.5.1)
|
79
|
-
hitimes (~> 1.2)
|
80
|
-
timecop (0.9.1)
|
92
|
+
timecop (0.9.2)
|
93
|
+
unf (0.1.4)
|
94
|
+
unf_ext
|
95
|
+
unf_ext (0.0.7.7)
|
96
|
+
webrick (1.7.0)
|
81
97
|
|
82
98
|
PLATFORMS
|
83
|
-
java
|
84
99
|
ruby
|
85
100
|
|
86
101
|
DEPENDENCIES
|
87
|
-
aws-sdk-dynamodb (~> 1.
|
88
|
-
bundler (~> 1
|
89
|
-
|
90
|
-
|
91
|
-
diplomat (>= 2.0.2)
|
102
|
+
aws-sdk-dynamodb (~> 1.57)
|
103
|
+
bundler (~> 2.1)
|
104
|
+
connection_pool (~> 2.2.3)
|
105
|
+
diplomat (~> 2.4.2)
|
92
106
|
launchdarkly-server-sdk!
|
93
|
-
listen (~> 3.
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
107
|
+
listen (~> 3.3)
|
108
|
+
oga (~> 2.2)
|
109
|
+
redis (~> 4.2)
|
110
|
+
rspec (~> 3.10)
|
111
|
+
rspec_junit_formatter (~> 0.4)
|
112
|
+
timecop (~> 0.9)
|
113
|
+
webrick (~> 1.7)
|
98
114
|
|
99
115
|
BUNDLED WITH
|
100
|
-
|
116
|
+
2.2.6
|