split 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ ## 0.4.5 (August 30, 2012)
2
+
3
+ Bugfixes:
4
+
5
+ - Fixed header gradient in FF/Opera (@philnash, #69)
6
+ - Fixed reseting of experiment in session (@apsoto, #43)
7
+
1
8
  ## 0.4.4 (August 9, 2012)
2
9
 
3
10
  Features:
@@ -15,11 +15,11 @@ body {
15
15
  background: -webkit-gradient(linear, left top, left bottom,
16
16
  color-stop(0%,#576a76),
17
17
  color-stop(100%,#4d5256));
18
- background: -moz-linear-gradient (top, #576a76 0%, #414e58 100%);
18
+ background: -moz-linear-gradient(top, #576076 0%, #414e58 100%);
19
19
  background: -webkit-linear-gradient(top, #576a76 0%, #414e58 100%);
20
- background: -o-linear-gradient (top, #576a76 0%, #414e58 100%);
21
- background: -ms-linear-gradient (top, #576a76 0%, #414e58 100%);
22
- background: linear-gradient (top, #576a76 0%, #414e58 100%);
20
+ background: -o-linear-gradient(top, #576a76 0%, #414e58 100%);
21
+ background: -ms-linear-gradient(top, #576a76 0%, #414e58 100%);
22
+ background: linear-gradient(top, #576a76 0%, #414e58 100%);
23
23
  border-bottom: 1px solid #fff;
24
24
  -moz-border-radius-topleft: 5px;
25
25
  -webkit-border-top-left-radius: 5px;
@@ -28,7 +28,7 @@ module Split
28
28
  if alternative_name = ab_user[experiment.key]
29
29
  alternative = Split::Alternative.new(alternative_name, experiment_name)
30
30
  alternative.increment_completion
31
- session[:split].delete(experiment_name) if options[:reset]
31
+ ab_user.delete(experiment.key) if options[:reset]
32
32
  end
33
33
  rescue => e
34
34
  raise unless Split.configuration.db_failover
@@ -1,3 +1,3 @@
1
1
  module Split
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -134,6 +134,29 @@ describe Split::Helper do
134
134
  session[:split].should eql("link_color" => alternative_name)
135
135
  end
136
136
 
137
+ it "should reset the users session when experiment is not versioned" do
138
+ experiment = Split::Experiment.find_or_create('link_color', 'blue', 'red')
139
+ alternative_name = ab_test('link_color', 'blue', 'red')
140
+
141
+ previous_completion_count = Split::Alternative.new(alternative_name, 'link_color').completed_count
142
+
143
+ session[:split].should eql(experiment.key => alternative_name)
144
+ finished('link_color', :reset => true)
145
+ session[:split].should eql({})
146
+ end
147
+
148
+ it "should reset the users session when experiment is versioned" do
149
+ experiment = Split::Experiment.find_or_create('link_color', 'blue', 'red')
150
+ experiment.increment_version
151
+ alternative_name = ab_test('link_color', 'blue', 'red')
152
+
153
+ previous_completion_count = Split::Alternative.new(alternative_name, 'link_color').completed_count
154
+
155
+ session[:split].should eql(experiment.key => alternative_name)
156
+ finished('link_color', :reset => true)
157
+ session[:split].should eql({})
158
+ end
159
+
137
160
  it "should do nothing where the experiment was not started by this user" do
138
161
  session[:split] = nil
139
162
  lambda { finished('some_experiment_not_started_by_the_user') }.should_not raise_exception
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: split
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-09 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70151613684420 !ruby/object:Gem::Requirement
16
+ requirement: &70263359071460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70151613684420
24
+ version_requirements: *70263359071460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redis-namespace
27
- requirement: &70151613683840 !ruby/object:Gem::Requirement
27
+ requirement: &70263359070960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70151613683840
35
+ version_requirements: *70263359070960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &70151613683320 !ruby/object:Gem::Requirement
38
+ requirement: &70263359070500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.2.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70151613683320
46
+ version_requirements: *70263359070500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70151613682760 !ruby/object:Gem::Requirement
49
+ requirement: &70263359070120 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70151613682760
57
+ version_requirements: *70263359070120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70151613695660 !ruby/object:Gem::Requirement
60
+ requirement: &70263359069580 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70151613695660
68
+ version_requirements: *70263359069580
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &70151613695120 !ruby/object:Gem::Requirement
71
+ requirement: &70263359069080 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '2.6'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70151613695120
79
+ version_requirements: *70263359069080
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rack-test
82
- requirement: &70151613694660 !ruby/object:Gem::Requirement
82
+ requirement: &70263359068620 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0.6'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70151613694660
90
+ version_requirements: *70263359068620
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: guard-rspec
93
- requirement: &70151613694080 !ruby/object:Gem::Requirement
93
+ requirement: &70263359068160 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '1.2'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70151613694080
101
+ version_requirements: *70263359068160
102
102
  description:
103
103
  email:
104
104
  - andrewnez@gmail.com