split 3.3.2 → 4.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc +1 -1
- data/.github/FUNDING.yml +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +24 -0
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/ci.yml +61 -0
- data/.rspec +1 -0
- data/.rubocop.yml +71 -1044
- data/.rubocop_todo.yml +226 -0
- data/Appraisals +1 -1
- data/CHANGELOG.md +62 -0
- data/CODE_OF_CONDUCT.md +3 -3
- data/Gemfile +2 -0
- data/README.md +40 -18
- data/Rakefile +2 -0
- data/gemfiles/6.0.gemfile +1 -1
- data/lib/split/algorithms/block_randomization.rb +2 -0
- data/lib/split/algorithms/weighted_sample.rb +2 -1
- data/lib/split/algorithms/whiplash.rb +3 -2
- data/lib/split/alternative.rb +4 -3
- data/lib/split/cache.rb +28 -0
- data/lib/split/combined_experiments_helper.rb +2 -1
- data/lib/split/configuration.rb +13 -14
- data/lib/split/dashboard/helpers.rb +1 -0
- data/lib/split/dashboard/pagination_helpers.rb +3 -3
- data/lib/split/dashboard/paginator.rb +1 -0
- data/lib/split/dashboard/public/dashboard.js +10 -0
- data/lib/split/dashboard/public/style.css +5 -0
- data/lib/split/dashboard/views/_controls.erb +13 -0
- data/lib/split/dashboard/views/layout.erb +1 -1
- data/lib/split/dashboard.rb +19 -1
- data/lib/split/encapsulated_helper.rb +3 -2
- data/lib/split/engine.rb +7 -4
- data/lib/split/exceptions.rb +1 -0
- data/lib/split/experiment.rb +98 -65
- data/lib/split/experiment_catalog.rb +1 -3
- data/lib/split/extensions/string.rb +1 -0
- data/lib/split/goals_collection.rb +2 -0
- data/lib/split/helper.rb +28 -8
- data/lib/split/metric.rb +2 -1
- data/lib/split/persistence/cookie_adapter.rb +6 -1
- data/lib/split/persistence/dual_adapter.rb +54 -12
- data/lib/split/persistence/redis_adapter.rb +5 -0
- data/lib/split/persistence/session_adapter.rb +1 -0
- data/lib/split/persistence.rb +4 -2
- data/lib/split/redis_interface.rb +9 -28
- data/lib/split/trial.rb +21 -11
- data/lib/split/user.rb +20 -4
- data/lib/split/version.rb +2 -4
- data/lib/split/zscore.rb +1 -0
- data/lib/split.rb +9 -3
- data/spec/alternative_spec.rb +1 -1
- data/spec/cache_spec.rb +88 -0
- data/spec/configuration_spec.rb +17 -15
- data/spec/dashboard/pagination_helpers_spec.rb +3 -1
- data/spec/dashboard_helpers_spec.rb +2 -2
- data/spec/dashboard_spec.rb +78 -17
- data/spec/encapsulated_helper_spec.rb +2 -2
- data/spec/experiment_spec.rb +116 -12
- data/spec/goals_collection_spec.rb +1 -1
- data/spec/helper_spec.rb +186 -112
- data/spec/persistence/cookie_adapter_spec.rb +1 -1
- data/spec/persistence/dual_adapter_spec.rb +160 -68
- data/spec/persistence/redis_adapter_spec.rb +9 -0
- data/spec/redis_interface_spec.rb +0 -69
- data/spec/spec_helper.rb +5 -6
- data/spec/trial_spec.rb +45 -19
- data/spec/user_spec.rb +45 -3
- data/split.gemspec +8 -9
- metadata +28 -36
- data/.travis.yml +0 -66
- data/gemfiles/4.2.gemfile +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bc6c9cfc3470eb28463fe0d286124b8ad89132e458963cfea9035f82d2dc484
|
4
|
+
data.tar.gz: 5cacccff1115b056ecafcea231ea27fff5d564ee9630b4279d8ce1fa5d8282ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bca228077d8dbecf7e06f21f411070effcc520c64d09b055c41fea4da7d786bedb81dbdd4f389a20f9166e08d9abf26ff75ea60bd1daf43c2555f5621adbb1e0
|
7
|
+
data.tar.gz: ad2aca522d8d7f7bad54ee256c8626dd7747ae6c65aaf6da40d0de4c56d78f2bddd34af4c22be9d9fc943538446e523bf1f6ae7bf43e59505eddd350507b168d
|
data/.eslintrc
CHANGED
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
open_collective: split
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: andrehjr
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See error
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Additional context**
|
24
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,61 @@
|
|
1
|
+
name: split
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
include:
|
10
|
+
- gemfile: 5.2.gemfile
|
11
|
+
ruby: 2.5
|
12
|
+
|
13
|
+
- gemfile: 5.2.gemfile
|
14
|
+
ruby: 2.6
|
15
|
+
|
16
|
+
- gemfile: 5.2.gemfile
|
17
|
+
ruby: 2.7
|
18
|
+
|
19
|
+
- gemfile: 6.0.gemfile
|
20
|
+
ruby: 2.5
|
21
|
+
|
22
|
+
- gemfile: 6.0.gemfile
|
23
|
+
ruby: 2.6
|
24
|
+
|
25
|
+
- gemfile: 6.0.gemfile
|
26
|
+
ruby: 2.7
|
27
|
+
|
28
|
+
- gemfile: 6.0.gemfile
|
29
|
+
ruby: '3.0'
|
30
|
+
|
31
|
+
runs-on: ubuntu-latest
|
32
|
+
|
33
|
+
services:
|
34
|
+
redis:
|
35
|
+
image: redis
|
36
|
+
ports: ['6379:6379']
|
37
|
+
options: >-
|
38
|
+
--health-cmd "redis-cli ping"
|
39
|
+
--health-interval 10s
|
40
|
+
--health-timeout 5s
|
41
|
+
--health-retries 5
|
42
|
+
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v2
|
45
|
+
|
46
|
+
- uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
ruby-version: ${{ matrix.ruby }}
|
49
|
+
|
50
|
+
- name: Install dependencies
|
51
|
+
run: |
|
52
|
+
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}"
|
53
|
+
bundle install --jobs 4 --retry 3
|
54
|
+
|
55
|
+
- name: Display Ruby version
|
56
|
+
run: ruby -v
|
57
|
+
|
58
|
+
- name: Test
|
59
|
+
run: bundle exec rspec
|
60
|
+
env:
|
61
|
+
REDIS_URL: redis:6379
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--profile
|