splitclient-rb 8.1.1.pre.rc2-java → 8.1.2.pre.rc1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +0 -1
- data/.github/workflows/ci.yml +33 -26
- data/.github/workflows/update-license-year.yml +2 -2
- data/.gitignore +3 -1
- data/CHANGES.txt +8 -0
- data/README.md +14 -14
- data/lib/splitclient-rb/cache/senders/impressions_adapter/redis_sender.rb +15 -7
- data/lib/splitclient-rb/version.rb +1 -1
- data/sonar-project.properties +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcc68876cf1a07553cf46556730756ad389623cb
|
4
|
+
data.tar.gz: 0eca775e395657074a50b88d7370f68331a87891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cdd2e8d1d05701b39d2a7de81198f67a4eafd5fa369e2fa973ab93aafd5e015fc4d60e0cd51c8acd36102e4fd0f280cc9850b93018923fd94d177ad990d5b57
|
7
|
+
data.tar.gz: 4c88d82a01595d986203a756e5952d7b5b3e3c0b73cbf1524bbea112e2e0fdc4205de1218a32242bb73f7c0fc9120e3405df525f047a9cfbbf845a0fedd2e02b
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,7 +1,21 @@
|
|
1
|
-
|
1
|
+
name: ci
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches:
|
5
|
+
- development
|
6
|
+
- master
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- development
|
10
|
+
- master
|
11
|
+
|
12
|
+
concurrency:
|
13
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
14
|
+
cancel-in-progress: true
|
2
15
|
|
3
16
|
jobs:
|
4
17
|
test:
|
18
|
+
name: Test
|
5
19
|
runs-on: ubuntu-latest
|
6
20
|
services:
|
7
21
|
redis:
|
@@ -9,19 +23,22 @@ jobs:
|
|
9
23
|
ports:
|
10
24
|
- 6379:6379
|
11
25
|
strategy:
|
26
|
+
fail-fast: false
|
12
27
|
matrix:
|
13
|
-
|
28
|
+
version:
|
29
|
+
- '2.5.0'
|
30
|
+
- '3.1.1'
|
14
31
|
|
15
32
|
steps:
|
16
33
|
- name: Checkout code
|
17
|
-
uses: actions/checkout@
|
34
|
+
uses: actions/checkout@v3
|
18
35
|
with:
|
19
36
|
fetch-depth: 0
|
20
37
|
|
21
|
-
- name:
|
38
|
+
- name: Setup Ruby ${{ matrix.version }}
|
22
39
|
uses: ruby/setup-ruby@v1
|
23
40
|
with:
|
24
|
-
ruby-version: ${{ matrix.
|
41
|
+
ruby-version: ${{ matrix.version }}
|
25
42
|
|
26
43
|
- name: Install dependencies
|
27
44
|
run: bundle install
|
@@ -30,47 +47,37 @@ jobs:
|
|
30
47
|
run: bundle exec rake
|
31
48
|
|
32
49
|
- name: Fix code coverage paths
|
33
|
-
working-directory:
|
50
|
+
working-directory: coverage
|
34
51
|
run: |
|
35
52
|
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' .resultset.json
|
36
53
|
ruby -rjson -e 'sqube = JSON.load(File.read(".resultset.json"))["RSpec"]["coverage"].transform_values {|lines| lines["lines"]}; total = { "RSpec" => { "coverage" => sqube, "timestamp" => Time.now.to_i }}; puts JSON.dump(total)' > .resultset.sonarqube.json
|
37
54
|
|
55
|
+
- name: Set VERSION env
|
56
|
+
run: echo "VERSION=$(cat lib/splitclient-rb/version.rb | grep VERSION | awk -F "'" '{print $2}')" >> $GITHUB_ENV
|
38
57
|
|
39
58
|
- name: SonarQube Scan (Push)
|
40
|
-
if: github.event_name == 'push'
|
41
|
-
uses: SonarSource/sonarcloud-github-action@v1.
|
59
|
+
if: matrix.version == '3.1.1' && github.event_name == 'push'
|
60
|
+
uses: SonarSource/sonarcloud-github-action@v1.9
|
42
61
|
env:
|
43
62
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
63
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
44
64
|
with:
|
45
65
|
projectBaseDir: .
|
46
66
|
args: >
|
47
67
|
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
|
48
|
-
-Dsonar.
|
49
|
-
-Dsonar.projectKey=${{ github.event.repository.name }}
|
50
|
-
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.sonarqube.json
|
51
|
-
-Dsonar.c.file.suffixes=-
|
52
|
-
-Dsonar.cpp.file.suffixes=-
|
53
|
-
-Dsonar.objc.file.suffixes=-
|
54
|
-
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
|
55
|
-
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
|
68
|
+
-Dsonar.projectVersion=${{ env.VERSION }}
|
56
69
|
|
57
70
|
- name: SonarQube Scan (Pull Request)
|
58
|
-
if: github.event_name == 'pull_request'
|
59
|
-
uses: SonarSource/sonarcloud-github-action@v1.
|
71
|
+
if: matrix.version == '3.1.1' && github.event_name == 'pull_request'
|
72
|
+
uses: SonarSource/sonarcloud-github-action@v1.9
|
60
73
|
env:
|
61
74
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
75
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
62
76
|
with:
|
63
77
|
projectBaseDir: .
|
64
78
|
args: >
|
65
79
|
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
|
66
|
-
-Dsonar.
|
67
|
-
-Dsonar.projectKey=${{ github.event.repository.name }}
|
68
|
-
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.sonarqube.json
|
69
|
-
-Dsonar.c.file.suffixes=-
|
70
|
-
-Dsonar.cpp.file.suffixes=-
|
71
|
-
-Dsonar.objc.file.suffixes=-
|
72
|
-
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
|
73
|
-
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
|
80
|
+
-Dsonar.projectVersion=${{ env.VERSION }}
|
74
81
|
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
|
75
82
|
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
|
76
83
|
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
|
data/.gitignore
CHANGED
data/CHANGES.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
CHANGES
|
2
2
|
|
3
|
+
8.1.2 (May 15, 2023)
|
4
|
+
- Updated terminology on the SDKs codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and intensense comments.
|
5
|
+
|
6
|
+
8.1.1 (Mar 17, 2023)
|
7
|
+
- Added retries with backoff when the sdk tries to connect to the Streaming service and it is not available.
|
8
|
+
- Updated the way that the sdk write mtks in redis.
|
9
|
+
- Fixed calculation of timeUntilReady in telemetry.
|
10
|
+
|
3
11
|
8.1.0 (Oct 5, 2022)
|
4
12
|
- Added a new impressions mode for the SDK called NONE , to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
|
5
13
|
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Overview
|
5
5
|
This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via a Split feature flag to manage your complete customer experience.
|
6
|
-
|
6
|
+
|
7
7
|
[![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware)
|
8
8
|
|
9
9
|
## Compatibility
|
@@ -24,11 +24,11 @@ require 'splitclient-rb'
|
|
24
24
|
split_factory = SplitIoClient::SplitFactory.new('SDK_API_KEY')
|
25
25
|
split_client = split_factory.client
|
26
26
|
|
27
|
-
begin
|
28
|
-
split_client.block_until_ready
|
27
|
+
begin
|
28
|
+
split_client.block_until_ready
|
29
29
|
rescue SplitIoClient::SDKBlockerTimeoutExpiredException
|
30
|
-
puts 'SDK is not ready. Decide whether to continue or abort execution'
|
31
|
-
end
|
30
|
+
puts 'SDK is not ready. Decide whether to continue or abort execution'
|
31
|
+
end
|
32
32
|
|
33
33
|
treatment = split_client.get_treatment('CUSTOMER_ID', 'SPLIT_NAME');
|
34
34
|
|
@@ -41,7 +41,7 @@ else
|
|
41
41
|
end
|
42
42
|
```
|
43
43
|
For multi-process environments you also need to setup Split Synchronizer. See [Sharing state: Redis integration](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK#sharing-state-redis-integration)
|
44
|
-
|
44
|
+
|
45
45
|
Please refer to [our official docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK) to learn about all the functionality provided by our SDK and the configuration options available for tailoring it to your current application setup.
|
46
46
|
|
47
47
|
## Submitting issues
|
@@ -49,17 +49,17 @@ The Split team monitors all issues submitted to this [issue tracker](https://git
|
|
49
49
|
|
50
50
|
## Contributing
|
51
51
|
Please see [Contributors Guide](CONTRIBUTORS-GUIDE.md) to find all you need to submit a Pull Request (PR).
|
52
|
-
|
52
|
+
|
53
53
|
## License
|
54
54
|
Licensed under the Apache License, Version 2.0. See: [Apache License](http://www.apache.org/licenses/).
|
55
55
|
|
56
|
-
## About Split
|
56
|
+
## About Split
|
57
57
|
Split is the leading Feature Delivery Platform for engineering teams that want to confidently deploy features as fast as they can develop them. Split’s fine-grained management, real-time monitoring, and data-driven experimentation ensure that new features will improve the customer experience without breaking or degrading performance. Companies like Twilio, Salesforce, GoDaddy and WePay trust Split to power their feature delivery.
|
58
|
-
|
58
|
+
|
59
59
|
To learn more about Split, contact hello@split.io, or get started with feature flags for free at https://www.split.io/signup.
|
60
|
-
|
60
|
+
|
61
61
|
Split has built and maintains SDKs for:
|
62
|
-
|
62
|
+
|
63
63
|
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
|
64
64
|
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
|
65
65
|
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
|
@@ -70,9 +70,9 @@ Split has built and maintains SDKs for:
|
|
70
70
|
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
|
71
71
|
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
|
72
72
|
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
|
73
|
-
|
73
|
+
|
74
74
|
For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
|
75
|
-
|
75
|
+
|
76
76
|
**Learn more about Split:**
|
77
|
-
|
77
|
+
|
78
78
|
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information.
|
@@ -12,15 +12,11 @@ module SplitIoClient
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def record_uniques_key(uniques)
|
15
|
-
return if uniques.nil? || uniques
|
15
|
+
return if uniques.nil? || uniques.empty?
|
16
16
|
|
17
|
-
size = @adapter.
|
18
|
-
uniques.each do |key, value|
|
19
|
-
pipeline.rpush(unique_keys_key, { f: key, ks: value.to_a }.to_json)
|
20
|
-
end
|
21
|
-
end
|
17
|
+
size = @adapter.add_to_queue(unique_keys_key, uniques_formatter(uniques))
|
22
18
|
|
23
|
-
@adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size
|
19
|
+
@adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size
|
24
20
|
rescue StandardError => e
|
25
21
|
@config.log_found_exception(__method__.to_s, e)
|
26
22
|
end
|
@@ -48,6 +44,18 @@ module SplitIoClient
|
|
48
44
|
@adapter.expire(impressions_count_key, EXPIRE_SECONDS) if impressions_count.size == hlen && (pipeline_result.sum - hlen) == total_count
|
49
45
|
end
|
50
46
|
|
47
|
+
def uniques_formatter(uniques)
|
48
|
+
to_return = []
|
49
|
+
uniques.each do |key, value|
|
50
|
+
to_return << {
|
51
|
+
f: key,
|
52
|
+
ks: value.to_a
|
53
|
+
}.to_json
|
54
|
+
end
|
55
|
+
|
56
|
+
to_return
|
57
|
+
end
|
58
|
+
|
51
59
|
def impressions_count_key
|
52
60
|
"#{@config.redis_namespace}.impressions.count"
|
53
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splitclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.1.
|
4
|
+
version: 8.1.2.pre.rc1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -538,6 +538,7 @@ files:
|
|
538
538
|
- lib/splitclient-rb/utilitites.rb
|
539
539
|
- lib/splitclient-rb/validators.rb
|
540
540
|
- lib/splitclient-rb/version.rb
|
541
|
+
- sonar-project.properties
|
541
542
|
- splitclient-rb.gemspec
|
542
543
|
- tasks/benchmark_get_treatment.rake
|
543
544
|
- tasks/irb.rake
|