split 4.0.4 → 4.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +23 -36
- data/CHANGELOG.md +12 -0
- data/Gemfile +3 -0
- data/lib/split/dashboard.rb +2 -1
- data/lib/split/persistence/cookie_adapter.rb +3 -2
- data/lib/split/redis_interface.rb +1 -1
- data/lib/split/version.rb +1 -1
- data/lib/split.rb +2 -2
- data/spec/helper_spec.rb +6 -6
- data/spec/spec_helper.rb +8 -5
- data/split.gemspec +5 -2
- metadata +33 -12
- data/gemfiles/5.2.gemfile +0 -7
- data/gemfiles/6.0.gemfile +0 -7
- data/gemfiles/6.1.gemfile +0 -7
- data/gemfiles/7.0.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c7476504dcc3b062af1a156fc7021b65e64bcc64a96d5faeabd9c4bd3fc987
|
4
|
+
data.tar.gz: c8cb8c4335be14da004d94da31a5cb21ee80a13f0b782f7e94c36f698f1765ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bc0b3bbaeef30019bdcf913b8b20c3ac32efec3e025692eef5b3d552a0e7246b67a4dbcb73de7a01dd82d78d985587d21737f5f6cc77dcf4e1540eb067b9655
|
7
|
+
data.tar.gz: 87763ae8d35cf44780362e460c86ef7f818b32b5b7d5f4f1e4ec3c24cedf1b277bf162c2f34daba0cb1477f4acd44c8b4aa2d436be396ec51fbc19d8edcb72de
|
data/.github/workflows/ci.yml
CHANGED
@@ -6,52 +6,40 @@ jobs:
|
|
6
6
|
test:
|
7
7
|
strategy:
|
8
8
|
matrix:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
ruby:
|
27
|
-
|
28
|
-
|
29
|
-
ruby: '3.0'
|
30
|
-
|
31
|
-
- gemfile: 6.1.gemfile
|
32
|
-
ruby: '3.0'
|
33
|
-
|
34
|
-
- gemfile: 7.0.gemfile
|
35
|
-
ruby: '3.0'
|
36
|
-
|
37
|
-
- gemfile: 7.0.gemfile
|
38
|
-
ruby: '3.1'
|
39
|
-
|
40
|
-
- gemfile: 7.0.gemfile
|
41
|
-
ruby: '3.2'
|
42
|
-
|
9
|
+
ruby: ["3.5.0-preview1", "3.4", "3.3", "3.2", "3.1", "3.0", "2.7"]
|
10
|
+
rails: ["8.0", "7.2", "7.1", "6.1"]
|
11
|
+
exclude:
|
12
|
+
- rails: "6.1"
|
13
|
+
ruby: "3.4"
|
14
|
+
|
15
|
+
- rails: "6.1"
|
16
|
+
ruby: "3.5.0-preview1"
|
17
|
+
|
18
|
+
- rails: "7.2"
|
19
|
+
ruby: "2.7"
|
20
|
+
- rails: "7.2"
|
21
|
+
ruby: "3.0"
|
22
|
+
|
23
|
+
- rails: "8.0"
|
24
|
+
ruby: "2.7"
|
25
|
+
- rails: "8.0"
|
26
|
+
ruby: "3.0"
|
27
|
+
- rails: "8.0"
|
28
|
+
ruby: "3.1"
|
43
29
|
runs-on: ubuntu-latest
|
44
30
|
|
45
31
|
services:
|
46
32
|
redis:
|
47
33
|
image: redis
|
48
|
-
ports: [
|
34
|
+
ports: ["6379:6379"]
|
49
35
|
options: >-
|
50
36
|
--health-cmd "redis-cli ping"
|
51
37
|
--health-interval 10s
|
52
38
|
--health-timeout 5s
|
53
39
|
--health-retries 5
|
54
40
|
|
41
|
+
env:
|
42
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
55
43
|
steps:
|
56
44
|
- uses: actions/checkout@v4
|
57
45
|
|
@@ -61,7 +49,6 @@ jobs:
|
|
61
49
|
|
62
50
|
- name: Install dependencies
|
63
51
|
run: |
|
64
|
-
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}"
|
65
52
|
bundle install --jobs 4 --retry 3
|
66
53
|
|
67
54
|
- name: Display Ruby version
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 4.0.5 (Aug 3rd, 2025)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
- Handle when Rails is partially loaded as a Gem. (@bjacobs09, #727)
|
5
|
+
- Fix Rack compatibility with versions > 3 (@andrehjr, #729)
|
6
|
+
|
7
|
+
Misc:
|
8
|
+
- Add funding_uri to gemspec (@andrew, #726)
|
9
|
+
- Drop Rails 5.x Support (@andrehjr, #728)
|
10
|
+
- Drop Rails 6.0 and Ruby < 2.6 (@andrehjr, #729)
|
11
|
+
- Add support for Ruby 3.5+ (@andrehjr, #737)
|
12
|
+
|
1
13
|
# 4.0.4 (March 3rd, 2024)
|
2
14
|
|
3
15
|
Bugfixes:
|
data/Gemfile
CHANGED
data/lib/split/dashboard.rb
CHANGED
@@ -29,7 +29,8 @@ module Split
|
|
29
29
|
if Object.const_defined?("Rails") && Rails.respond_to?(:env)
|
30
30
|
@current_env = Rails.env.titlecase
|
31
31
|
else
|
32
|
-
|
32
|
+
rack_version = Rack.respond_to?(:version) ? Rack.version : Rack.release
|
33
|
+
@current_env = "Rack: #{rack_version}"
|
33
34
|
end
|
34
35
|
erb :index
|
35
36
|
end
|
@@ -47,8 +47,9 @@ module Split
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def set_cookie_via_rack(key, value)
|
50
|
-
|
51
|
-
|
50
|
+
headers = @response.respond_to?(:header) ? @response.header : @response.headers
|
51
|
+
delete_cookie_header!(headers, key, value)
|
52
|
+
Rack::Utils.set_cookie_header!(headers, key, value)
|
52
53
|
end
|
53
54
|
|
54
55
|
# Use Rack::Utils#make_delete_cookie_header after Rack 2.0.0
|
data/lib/split/version.rb
CHANGED
data/lib/split.rb
CHANGED
@@ -24,7 +24,7 @@ require "split/trial"
|
|
24
24
|
require "split/user"
|
25
25
|
require "split/version"
|
26
26
|
require "split/zscore"
|
27
|
-
require "split/engine" if defined?(Rails)
|
27
|
+
require "split/engine" if defined?(::Rails::Engine)
|
28
28
|
|
29
29
|
module Split
|
30
30
|
extend self
|
@@ -74,7 +74,7 @@ module Split
|
|
74
74
|
end
|
75
75
|
|
76
76
|
# Check to see if being run in a Rails application. If so, wait until before_initialize to run configuration so Gems that create ENV variables have the chance to initialize first.
|
77
|
-
if defined?(::Rails)
|
77
|
+
if defined?(::Rails::Railtie)
|
78
78
|
class Split::Railtie < Rails::Railtie
|
79
79
|
config.before_initialize { Split.configure { } }
|
80
80
|
end
|
data/spec/helper_spec.rb
CHANGED
@@ -670,7 +670,7 @@ describe Split::Helper do
|
|
670
670
|
|
671
671
|
describe "when user is a robot" do
|
672
672
|
before(:each) do
|
673
|
-
@request =
|
673
|
+
@request = build_request(user_agent: "Googlebot/2.1 (+http://www.google.com/bot.html)")
|
674
674
|
end
|
675
675
|
|
676
676
|
describe "ab_test" do
|
@@ -768,7 +768,7 @@ describe Split::Helper do
|
|
768
768
|
describe "when ip address is ignored" do
|
769
769
|
context "individually" do
|
770
770
|
before(:each) do
|
771
|
-
@request =
|
771
|
+
@request = build_request(ip: "81.19.48.130")
|
772
772
|
Split.configure do |c|
|
773
773
|
c.ignore_ip_addresses << "81.19.48.130"
|
774
774
|
end
|
@@ -779,7 +779,7 @@ describe Split::Helper do
|
|
779
779
|
|
780
780
|
context "for a range" do
|
781
781
|
before(:each) do
|
782
|
-
@request =
|
782
|
+
@request = build_request(ip: "81.19.48.129")
|
783
783
|
Split.configure do |c|
|
784
784
|
c.ignore_ip_addresses << /81\.19\.48\.[0-9]+/
|
785
785
|
end
|
@@ -790,7 +790,7 @@ describe Split::Helper do
|
|
790
790
|
|
791
791
|
context "using both a range and a specific value" do
|
792
792
|
before(:each) do
|
793
|
-
@request =
|
793
|
+
@request = build_request(ip: "81.19.48.128")
|
794
794
|
Split.configure do |c|
|
795
795
|
c.ignore_ip_addresses << "81.19.48.130"
|
796
796
|
c.ignore_ip_addresses << /81\.19\.48\.[0-9]+/
|
@@ -802,7 +802,7 @@ describe Split::Helper do
|
|
802
802
|
|
803
803
|
context "when ignored other address" do
|
804
804
|
before do
|
805
|
-
@request =
|
805
|
+
@request = build_request(ip: "1.1.1.1")
|
806
806
|
Split.configure do |c|
|
807
807
|
c.ignore_ip_addresses << "81.19.48.130"
|
808
808
|
end
|
@@ -819,7 +819,7 @@ describe Split::Helper do
|
|
819
819
|
|
820
820
|
describe "when user is previewing" do
|
821
821
|
before(:each) do
|
822
|
-
@request =
|
822
|
+
@request = build_request(headers: { "x-purpose" => "preview" })
|
823
823
|
end
|
824
824
|
|
825
825
|
it_behaves_like "a disabled test"
|
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,6 @@ require "simplecov"
|
|
9
9
|
SimpleCov.start
|
10
10
|
|
11
11
|
require "split"
|
12
|
-
require "ostruct"
|
13
12
|
require "yaml"
|
14
13
|
require "pry"
|
15
14
|
|
@@ -48,16 +47,20 @@ def request
|
|
48
47
|
@request ||= build_request
|
49
48
|
end
|
50
49
|
|
50
|
+
DummyRequest = Struct.new(:user_agent, :ip, :params, :cookies, :headers)
|
51
|
+
|
51
52
|
def build_request(
|
52
|
-
|
53
|
+
user_agent: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; de-de) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27",
|
53
54
|
ip: "192.168.1.1",
|
54
55
|
params: {},
|
55
|
-
cookies: {}
|
56
|
+
cookies: {},
|
57
|
+
headers: {}
|
56
58
|
)
|
57
|
-
r =
|
58
|
-
r.user_agent =
|
59
|
+
r = DummyRequest.new
|
60
|
+
r.user_agent = user_agent
|
59
61
|
r.ip = ip
|
60
62
|
r.params = params
|
61
63
|
r.cookies = cookies
|
64
|
+
r.headers = headers
|
62
65
|
r
|
63
66
|
end
|
data/split.gemspec
CHANGED
@@ -20,10 +20,11 @@ Gem::Specification.new do |s|
|
|
20
20
|
"source_code_uri" => "https://github.com/splitrb/split",
|
21
21
|
"bug_tracker_uri" => "https://github.com/splitrb/split/issues",
|
22
22
|
"wiki_uri" => "https://github.com/splitrb/split/wiki",
|
23
|
-
"mailing_list_uri" => "https://groups.google.com/d/forum/split-ruby"
|
23
|
+
"mailing_list_uri" => "https://groups.google.com/d/forum/split-ruby",
|
24
|
+
"funding_uri" => "https://opencollective.com/split"
|
24
25
|
}
|
25
26
|
|
26
|
-
s.required_ruby_version = ">= 2.
|
27
|
+
s.required_ruby_version = ">= 2.7.0"
|
27
28
|
s.required_rubygems_version = ">= 2.0.0"
|
28
29
|
|
29
30
|
s.files = `git ls-files`.split("\n")
|
@@ -34,6 +35,8 @@ Gem::Specification.new do |s|
|
|
34
35
|
s.add_dependency "sinatra", ">= 1.2.6"
|
35
36
|
s.add_dependency "rubystats", ">= 0.3.0"
|
36
37
|
s.add_dependency "matrix"
|
38
|
+
s.add_dependency "bigdecimal"
|
39
|
+
s.add_dependency "cgi"
|
37
40
|
|
38
41
|
s.add_development_dependency "bundler", ">= 1.17"
|
39
42
|
s.add_development_dependency "simplecov", "~> 0.15"
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: redis
|
@@ -66,6 +65,34 @@ dependencies:
|
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: bigdecimal
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: cgi
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
69
96
|
- !ruby/object:Gem::Dependency
|
70
97
|
name: bundler
|
71
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +191,6 @@ dependencies:
|
|
164
191
|
- - ">="
|
165
192
|
- !ruby/object:Gem::Version
|
166
193
|
version: '5.0'
|
167
|
-
description:
|
168
194
|
email:
|
169
195
|
- andrewnez@gmail.com
|
170
196
|
executables: []
|
@@ -189,10 +215,6 @@ files:
|
|
189
215
|
- LICENSE
|
190
216
|
- README.md
|
191
217
|
- Rakefile
|
192
|
-
- gemfiles/5.2.gemfile
|
193
|
-
- gemfiles/6.0.gemfile
|
194
|
-
- gemfiles/6.1.gemfile
|
195
|
-
- gemfiles/7.0.gemfile
|
196
218
|
- lib/split.rb
|
197
219
|
- lib/split/algorithms.rb
|
198
220
|
- lib/split/algorithms/block_randomization.rb
|
@@ -274,7 +296,7 @@ metadata:
|
|
274
296
|
bug_tracker_uri: https://github.com/splitrb/split/issues
|
275
297
|
wiki_uri: https://github.com/splitrb/split/wiki
|
276
298
|
mailing_list_uri: https://groups.google.com/d/forum/split-ruby
|
277
|
-
|
299
|
+
funding_uri: https://opencollective.com/split
|
278
300
|
rdoc_options: []
|
279
301
|
require_paths:
|
280
302
|
- lib
|
@@ -282,15 +304,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
282
304
|
requirements:
|
283
305
|
- - ">="
|
284
306
|
- !ruby/object:Gem::Version
|
285
|
-
version: 2.
|
307
|
+
version: 2.7.0
|
286
308
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
309
|
requirements:
|
288
310
|
- - ">="
|
289
311
|
- !ruby/object:Gem::Version
|
290
312
|
version: 2.0.0
|
291
313
|
requirements: []
|
292
|
-
rubygems_version: 3.
|
293
|
-
signing_key:
|
314
|
+
rubygems_version: 3.7.0.dev
|
294
315
|
specification_version: 4
|
295
316
|
summary: Rack based split testing framework
|
296
317
|
test_files:
|
data/gemfiles/5.2.gemfile
DELETED
data/gemfiles/6.0.gemfile
DELETED
data/gemfiles/6.1.gemfile
DELETED