split 0.4.1 → 0.4.2
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.
- data/CHANGELOG.mdown +10 -0
- data/README.mdown +2 -2
- data/lib/split/dashboard/helpers.rb +12 -23
- data/lib/split/version.rb +1 -1
- data/spec/dashboard_helpers_spec.rb +9 -1
- data/spec/helper_spec.rb +1 -1
- data/split.gemspec +2 -2
- metadata +6 -6
data/CHANGELOG.mdown
CHANGED
data/README.mdown
CHANGED
@@ -6,6 +6,8 @@ Split is heavily inspired by the Abingo and Vanity rails ab testing plugins and
|
|
6
6
|
|
7
7
|
Split is designed to be hacker friendly, allowing for maximum customisation and extensibility.
|
8
8
|
|
9
|
+
[](http://travis-ci.org/andrew/split) [](https://gemnasium.com/andrew/split)
|
10
|
+
|
9
11
|
## Requirements
|
10
12
|
|
11
13
|
Split uses redis as a datastore.
|
@@ -269,8 +271,6 @@ Report Issues/Feature requests on [GitHub Issues](http://github.com/andrew/split
|
|
269
271
|
|
270
272
|
Tests can be ran with `rake spec`
|
271
273
|
|
272
|
-
[](http://travis-ci.org/andrew/split) [](https://gemnasium.com/andrew/split)
|
273
|
-
|
274
274
|
### Note on Patches/Pull Requests
|
275
275
|
|
276
276
|
* Fork the project.
|
@@ -19,30 +19,19 @@ module Split
|
|
19
19
|
def confidence_level(z_score)
|
20
20
|
return z_score if z_score.is_a? String
|
21
21
|
|
22
|
-
z = round(z_score.to_s.to_f, 3)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
elsif z < 0.0
|
34
|
-
if z > -1.96
|
35
|
-
'no confidence'
|
36
|
-
elsif z > -2.57
|
37
|
-
'95% confidence'
|
38
|
-
elsif z > -3.29
|
39
|
-
'99% confidence'
|
40
|
-
else
|
41
|
-
'99.9% confidence'
|
42
|
-
end
|
22
|
+
z = round(z_score.to_s.to_f, 3).abs
|
23
|
+
|
24
|
+
if z == 0.0
|
25
|
+
'No Change'
|
26
|
+
elsif z < 1.96
|
27
|
+
'no confidence'
|
28
|
+
elsif z < 2.57
|
29
|
+
'95% confidence'
|
30
|
+
elsif z < 3.29
|
31
|
+
'99% confidence'
|
43
32
|
else
|
44
|
-
|
33
|
+
'99.9% confidence'
|
45
34
|
end
|
46
35
|
end
|
47
36
|
end
|
48
|
-
end
|
37
|
+
end
|
data/lib/split/version.rb
CHANGED
@@ -8,5 +8,13 @@ describe Split::DashboardHelpers do
|
|
8
8
|
it 'should handle very small numbers' do
|
9
9
|
confidence_level(Complex(2e-18, -0.03)).should eql('No Change')
|
10
10
|
end
|
11
|
+
|
12
|
+
it "should consider a z-score of 1.96 < z < 2.57 as 95% confident" do
|
13
|
+
confidence_level(2.12).should eql('95% confidence')
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should consider a z-score of -1.96 > z > -2.57 as 95% confident" do
|
17
|
+
confidence_level(-2.12).should eql('95% confidence')
|
18
|
+
end
|
11
19
|
end
|
12
|
-
end
|
20
|
+
end
|
data/spec/helper_spec.rb
CHANGED
@@ -319,7 +319,7 @@ describe Split::Helper do
|
|
319
319
|
context 'when redis is not available' do
|
320
320
|
|
321
321
|
before(:each) do
|
322
|
-
Split.stub(:redis).and_raise(Errno::ECONNREFUSED)
|
322
|
+
Split.stub(:redis).and_raise(Errno::ECONNREFUSED.new)
|
323
323
|
end
|
324
324
|
|
325
325
|
context 'and db_failover config option is turned off' do
|
data/split.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency 'redis', '
|
22
|
-
s.add_dependency 'redis-namespace', '
|
21
|
+
s.add_dependency 'redis', '>= 2.1'
|
22
|
+
s.add_dependency 'redis-namespace', '>= 1.1.0'
|
23
23
|
s.add_dependency 'sinatra', '>= 1.2.6'
|
24
24
|
|
25
25
|
s.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Nesbitt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-06-01 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
hash: 1
|
30
30
|
segments:
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
hash: 19
|
45
45
|
segments:
|