split 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: ac2527f0dab7b1f6c2de3e21b02fd933eef302046e7cdd4b8f42da20a3cdf1ba
4
- data.tar.gz: 6332eabde240b1c408ff434850b7ac520b3081bfd5fe76f7343259a8eae039b6
2
+ SHA1:
3
+ metadata.gz: b5af227a83e5e86e548a867ee1fd5b0f99a8f735
4
+ data.tar.gz: 187fa1e271f499f25d12fd2b212194f51443e53c
5
5
  SHA512:
6
- metadata.gz: 331863e4c78e8dabf7eb23551608be301cdd33d4c14186ab47def00485b028c05784f70009fd66d1b3e240963d1cd45b61d2233b651fd0bcbcb79e2871d2a6ad
7
- data.tar.gz: 2c8723105824b9dfc315f88de450be5c18aa32d20e2253a25ca9fcbb6b65b082697c0782719198a2f7b401e66824597a50c3f97dece30a3c9ceccb3fcd62fa95
6
+ metadata.gz: 808297b3e08a2fe1bd1bb0fabd81544f8c82d8e3c22f514f4966d2b8b4cf8c3d06f3a972d3e70461da3ee04c03f6e693a4d79a7710d884519ee45da524f43ca0
7
+ data.tar.gz: 3e5ecc4dfd26bd80750ee3ca268428d0e11a6497c3195d62ae4d067b3d227a9624e5d1d31b0c8b06305265f3b583b30c6221c65c692fe9d609b33eefe2f0859a
@@ -2,11 +2,12 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0
5
- - 2.1
5
+ - 2.1.10
6
6
  - 2.2.0
7
7
  - 2.2.2
8
- - 2.4.3
9
- - 2.5.1
8
+ - 2.4.5
9
+ - 2.5.3
10
+ - 2.6.0
10
11
 
11
12
  gemfile:
12
13
  - gemfiles/4.2.gemfile
@@ -21,30 +22,30 @@ matrix:
21
22
  gemfile: gemfiles/5.0.gemfile
22
23
  - rvm: 1.9.3
23
24
  gemfile: gemfiles/5.1.gemfile
25
+ - rvm: 1.9.3
26
+ gemfile: gemfiles/5.2.gemfile
24
27
  - rvm: 2.0
25
28
  gemfile: gemfiles/5.0.gemfile
26
29
  - rvm: 2.0
27
30
  gemfile: gemfiles/5.1.gemfile
28
- - rvm: 2.1
31
+ - rvm: 2.0
32
+ gemfile: gemfiles/5.2.gemfile
33
+ - rvm: 2.1.10
29
34
  gemfile: gemfiles/5.0.gemfile
30
- - rvm: 2.1
35
+ - rvm: 2.1.10
31
36
  gemfile: gemfiles/5.1.gemfile
37
+ - rvm: 2.1.10
38
+ gemfile: gemfiles/5.2.gemfile
32
39
  - rvm: 2.2.0
33
40
  gemfile: gemfiles/5.0.gemfile
34
41
  - rvm: 2.2.0
35
42
  gemfile: gemfiles/5.1.gemfile
36
- - rvm: 1.9.3
37
- gemfile: gemfiles/5.2.gemfile
38
- - rvm: 2.0
39
- gemfile: gemfiles/5.2.gemfile
40
- - rvm: 2.1
41
- gemfile: gemfiles/5.2.gemfile
42
43
  - rvm: 2.2.0
43
44
  gemfile: gemfiles/5.2.gemfile
44
45
 
45
46
 
46
47
  before_install:
47
- - gem update --system && gem install bundler
48
+ - gem install bundler --version=1.17.3
48
49
 
49
50
  script:
50
51
  - RAILS_ENV=test bundle exec rake spec && bundle exec codeclimate-test-reporter
@@ -1,3 +1,34 @@
1
+ ## 3.3.1 (January 11th, 2019)
2
+ - Filter some more bots (@janosch-x, #542)
3
+ - Fix Dashboard Pagination Helper typo (@cattekin, #541)
4
+ - Tweak RSpec instructions (@eliotsykes, #540)
5
+ - Do not storage alternative in cookie if experiment has a winner (@sadhu89, #539)
6
+ - Improve README regarding rspec usage (@vermaxik, #538)
7
+ - fix user participating alternative not found (@NaturalHokke, #536)
8
+
9
+ ## 3.3.0 (August 13th, 2018)
10
+
11
+ Features:
12
+
13
+ - Added pagination for dashboard (@GeorgeGorbanev, #518)
14
+ - Add Facebot crawler to list of bots (@pfeiffer, #530)
15
+ - Ignore previewing requests (@pfeiffer, #531)
16
+ - Fix binding of ignore_filter (@pfeiffer, #533)
17
+
18
+ Bugfixes:
19
+
20
+ - Fix cookie header duplication (@andrehjr, #522)
21
+
22
+ Performance:
23
+
24
+ - Improve performance of RedisInterface#make_list_length by using LTRIM command (@mlovic, #509)
25
+
26
+ Misc:
27
+
28
+ - Update development dependencies
29
+ - test rails 5.2 on travis (@lostapathy, #524)
30
+ - update ruby versions for travis (@lostapathy, #525)
31
+
1
32
  ## 3.2.0 (September 21st, 2017)
2
33
 
3
34
  Features:
data/README.md CHANGED
@@ -159,15 +159,15 @@ In the event you want to disable all tests without having to know the individual
159
159
 
160
160
  It is not required to send `SPLIT_DISABLE=false` to activate Split.
161
161
 
162
- To aid testing with RSpec, write `split_helper.rb` and call `use_ab_test(alternatives_by_experiment)` in your specs as instructed below:
162
+
163
+ ### Rspec Helper
164
+ To aid testing with RSpec, write `spec/support/split_helper.rb` and call `use_ab_test(alternatives_by_experiment)` in your specs as instructed below:
163
165
 
164
166
  ```ruby
165
- # Recommended path for this file is 'spec/support/split_helper.rb', and you will need to ensure it
166
- # is `require`-d by rails_helper.rb or spec_helper.rb
167
+ # Create a file with these contents at 'spec/support/split_helper.rb'
168
+ # and ensure it is `require`d in your rails_helper.rb or spec_helper.rb
167
169
  module SplitHelper
168
170
 
169
- # Usage:
170
- #
171
171
  # Force a specific experiment alternative to always be returned:
172
172
  # use_ab_test(signup_form: "single_page")
173
173
  #
@@ -176,18 +176,26 @@ module SplitHelper
176
176
  #
177
177
  def use_ab_test(alternatives_by_experiment)
178
178
  allow_any_instance_of(Split::Helper).to receive(:ab_test) do |_receiver, experiment|
179
- alternative =
180
- alternatives_by_experiment.fetch(experiment) { |key| raise "Unknown experiment '#{key}'" }
179
+ alternatives_by_experiment.fetch(experiment) { |key| raise "Unknown experiment '#{key}'" }
181
180
  end
182
181
  end
183
182
  end
184
183
 
184
+ # Make the `use_ab_test` method available to all specs:
185
185
  RSpec.configure do |config|
186
- # Make the `use_ab_test` method available to all specs:
187
186
  config.include SplitHelper
188
187
  end
189
188
  ```
190
189
 
190
+ Now you can call `use_ab_test(alternatives_by_experiment)` in your specs, for example:
191
+ ```ruby
192
+ it "registers using experimental signup" do
193
+ use_ab_test experiment_name: "alternative_name"
194
+ post "/signups"
195
+ ...
196
+ end
197
+ ```
198
+
191
199
 
192
200
  ### Starting experiments manually
193
201
 
@@ -210,6 +218,12 @@ The user will then always see the alternative they started with.
210
218
 
211
219
  Any old unfinished experiment key will be deleted from the user's data storage if the experiment had been removed or is over and a winner had been chosen. This allows a user to enroll into any new experiment in cases when the `allow_multiple_experiments` config option is set to `false`.
212
220
 
221
+ ### Reset experiments manually
222
+
223
+ By default Split automatically resets the experiment whenever it detects the configuration for an experiment has changed (e.g. you call `ab_test` with different alternatives). You can prevent this by setting the option `reset_manually` to `true`.
224
+
225
+ You may want to do this when you want to change something, like the variants' names, the metadata about an experiment, etc. without resetting everything.
226
+
213
227
  ### Multiple experiments at once
214
228
 
215
229
  By default Split will avoid users participating in multiple experiments at once. This means you are less likely to skew results by adding in more variation to your tests.
@@ -450,6 +464,7 @@ Split.configure do |config|
450
464
  config.enabled = true
451
465
  config.persistence = Split::Persistence::SessionAdapter
452
466
  #config.start_manually = false ## new test will have to be started manually from the admin panel. default false
467
+ #config.reset_manually = false ## if true, it never resets the experiment data, even if the configuration changes
453
468
  config.include_rails_helper = true
454
469
  config.redis = "redis://custom.redis.url:6380"
455
470
  end
@@ -61,12 +61,14 @@ module Split
61
61
  'ColdFusion' => 'ColdFusion http library',
62
62
  'EventMachine HttpClient' => 'Ruby http library',
63
63
  'Go http package' => 'Go http library',
64
+ 'Go-http-client' => 'Go http library',
64
65
  'Java' => 'Generic Java http library',
65
66
  'libwww-perl' => 'Perl client-server library loved by script kids',
66
67
  'lwp-trivial' => 'Another Perl library loved by script kids',
67
68
  'Python-urllib' => 'Python http library',
68
69
  'PycURL' => 'Python http library',
69
70
  'Test Certificate Info' => 'C http library?',
71
+ 'Typhoeus' => 'Ruby http library',
70
72
  'Wget' => 'wget unix CLI http client',
71
73
 
72
74
  # URL expanders / previewers
@@ -91,6 +93,7 @@ module Split
91
93
 
92
94
  # Uptime monitoring
93
95
  'check_http' => 'Nagios monitor',
96
+ 'GoogleStackdriverMonitoring' => 'Google Cloud monitor',
94
97
  'NewRelicPinger' => 'NewRelic monitor',
95
98
  'Panopta' => 'Monitoring service',
96
99
  'Pingdom' => 'Pingdom monitoring',
@@ -25,7 +25,7 @@ module Split
25
25
  html << current_page_tag
26
26
  html << next_page_tag if show_next_page_tag?(collection)
27
27
  html << ellipsis_tag if show_last_ellipsis_tag?(collection)
28
- html << last_page_tagcollection if show_last_page_tag?(collection)
28
+ html << last_page_tag(collection) if show_last_page_tag?(collection)
29
29
  html.join
30
30
  end
31
31
 
@@ -68,10 +68,8 @@ module Split
68
68
  if exclude_user?
69
69
  self.alternative = @experiment.control
70
70
  else
71
- value = @user[@experiment.key]
72
- if value
73
- self.alternative = value
74
- else
71
+ self.alternative = @user[@experiment.key]
72
+ if alternative.nil?
75
73
  self.alternative = @experiment.next_alternative
76
74
 
77
75
  # Increment the number of participants since we are actually choosing a new alternative
@@ -82,7 +80,7 @@ module Split
82
80
  end
83
81
  end
84
82
 
85
- @user[@experiment.key] = alternative.name if should_store_alternative?
83
+ @user[@experiment.key] = alternative.name if !@experiment.has_winner? && should_store_alternative?
86
84
  @alternative_choosen = true
87
85
  run_callback context, Split.configuration.on_trial unless @options[:disabled] || Split.configuration.disabled?
88
86
  alternative
@@ -2,6 +2,6 @@
2
2
  module Split
3
3
  MAJOR = 3
4
4
  MINOR = 3
5
- PATCH = 0
5
+ PATCH = 1
6
6
  VERSION = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
@@ -176,6 +176,14 @@ describe Split::Trial do
176
176
 
177
177
  expect_alternative(trial, 'basket')
178
178
  end
179
+
180
+ context "when alternative is not found" do
181
+ it "falls back on next_alternative" do
182
+ user[experiment.key] = 'notfound'
183
+ expect(experiment).to receive(:next_alternative).and_call_original
184
+ expect_alternative(trial, alternatives)
185
+ end
186
+ end
179
187
  end
180
188
 
181
189
  context "when user is a new participant" do
@@ -275,5 +283,17 @@ describe Split::Trial do
275
283
  trial.choose!
276
284
  end
277
285
  end
286
+
287
+ context 'when experiment has winner' do
288
+ let(:trial) do
289
+ experiment.winner = 'cart'
290
+ Split::Trial.new(:user => user, :experiment => experiment)
291
+ end
292
+
293
+ it 'does not store' do
294
+ expect(user).to_not receive("[]=")
295
+ trial.choose!
296
+ end
297
+ end
278
298
  end
279
299
  end
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.add_dependency 'sinatra', '>= 1.2.6'
35
35
  s.add_dependency 'simple-random', '>= 0.9.3'
36
36
 
37
- s.add_development_dependency 'bundler', '~> 1.14'
37
+ s.add_development_dependency 'bundler', '>= 1.17'
38
38
  s.add_development_dependency 'simplecov', '~> 0.15'
39
39
  s.add_development_dependency 'rack-test', '~> 0.6'
40
40
  s.add_development_dependency 'rake', '~> 12'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: split
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.14'
61
+ version: '1.17'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.14'
68
+ version: '1.17'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: 2.0.0
271
271
  requirements: []
272
272
  rubyforge_project: split
273
- rubygems_version: 2.7.3
273
+ rubygems_version: 2.6.14.3
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Rack based split testing framework