verdict 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +39 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +0 -1
- data/dev.yml +11 -0
- data/lib/verdict/storage/redis_storage.rb +9 -7
- data/lib/verdict/version.rb +1 -1
- data/test/storage/cookie_storage_test.rb +3 -1
- metadata +4 -3
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6d20d61b4b74ae3cdc111f872f18c6bcedf9165bed983dfc489d826edad4e99
|
4
|
+
data.tar.gz: 5a23b9b6b678b0e7c7ccdd8c4df24f6029ee6f5c8a3ba16e9850147974b0a490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c931d20970cb9a75a8f9780d6648493dbf6ca2a5a9eb61f79f35896063b603b36f611cc1e6175710075d0271afad9f73efd795b09eb55c63848dc67def3a68c
|
7
|
+
data.tar.gz: '0599822d437c5e7e512a0a75e64312aaf97008d0ae31b75bacab6bdc8361a0750b22f9e14f31d70c7b41df771c20267a2719e883a0394b161e1d4367901252d7'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby:
|
11
|
+
- 2.5
|
12
|
+
- 2.6
|
13
|
+
- 2.7
|
14
|
+
- head
|
15
|
+
- jruby
|
16
|
+
services:
|
17
|
+
redis:
|
18
|
+
image: redis
|
19
|
+
options: >-
|
20
|
+
--health-cmd "redis-cli ping"
|
21
|
+
--health-interval 10s
|
22
|
+
--health-timeout 5s
|
23
|
+
--health-retries 5
|
24
|
+
ports:
|
25
|
+
- 6379:6379
|
26
|
+
name: Tests Ruby ${{ matrix.ruby }}
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v1
|
29
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
- name: Run tests
|
34
|
+
run: |
|
35
|
+
gem install bundler
|
36
|
+
bundle install --jobs 4 --retry 3
|
37
|
+
bundle exec rake
|
38
|
+
env:
|
39
|
+
REDIS_HOST: localhost
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## v0.16.1
|
2
|
+
* Change `RedisStorage` scrub to be iterative to avoid SystemStackError while cleaning big experiments
|
3
|
+
|
1
4
|
## v0.16.0
|
2
5
|
* Allow configuring the `RedisStorage` with a [`ConnectionPool`](https://github.com/mperham/connection_pool) instead of a raw `Redis` connection.
|
3
6
|
|
data/Gemfile
CHANGED
data/dev.yml
ADDED
@@ -67,15 +67,17 @@ module Verdict
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def scrub(scope, cursor: 0)
|
70
|
-
|
71
|
-
|
72
|
-
|
70
|
+
loop do
|
71
|
+
cursor, results = redis.with do |conn|
|
72
|
+
conn.hscan(scope_key(scope), cursor, count: PAGE_SIZE)
|
73
|
+
end
|
73
74
|
|
74
|
-
|
75
|
-
|
76
|
-
|
75
|
+
results.map(&:first).each do |key|
|
76
|
+
remove(scope, key)
|
77
|
+
end
|
77
78
|
|
78
|
-
|
79
|
+
break if cursor.to_i.zero?
|
80
|
+
end
|
79
81
|
end
|
80
82
|
end
|
81
83
|
end
|
data/lib/verdict/version.rb
CHANGED
@@ -6,7 +6,9 @@ require 'fake_app'
|
|
6
6
|
class CookieStorageTest < Minitest::Test
|
7
7
|
def setup
|
8
8
|
@storage = Verdict::Storage::CookieStorage.new.tap do |s|
|
9
|
-
|
9
|
+
request = mock()
|
10
|
+
request.stubs(:cookies_same_site_protection).returns(proc { :none })
|
11
|
+
s.cookies = ActionDispatch::Cookies::CookieJar.new(request)
|
10
12
|
end
|
11
13
|
@experiment = Verdict::Experiment.new(:cookie_storage_test) do
|
12
14
|
groups { group :all, 100 }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: verdict
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -117,14 +117,15 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".github/probots.yml"
|
120
|
+
- ".github/workflows/ci.yml"
|
120
121
|
- ".gitignore"
|
121
|
-
- ".travis.yml"
|
122
122
|
- CHANGELOG.md
|
123
123
|
- CONTRIBUTING.md
|
124
124
|
- Gemfile
|
125
125
|
- LICENSE
|
126
126
|
- README.md
|
127
127
|
- Rakefile
|
128
|
+
- dev.yml
|
128
129
|
- docs/concepts.md
|
129
130
|
- lib/verdict.rb
|
130
131
|
- lib/verdict/assignment.rb
|
data/.travis.yml
DELETED