simple_split 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +10 -0
- data/README.md +17 -13
- data/lib/simple_split/version.rb +1 -1
- data/simple_split.gemspec +2 -1
- data/spec/spec_helper.rb +3 -0
- metadata +18 -11
- data/bin/bundler +0 -16
- data/bin/console +0 -16
- data/bin/rake +0 -16
- data/bin/setup +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e870bd860b788a8d5770648e807229436f7e9c9
|
4
|
+
data.tar.gz: 5dd6d3bd3febbfba92c5ffe5b11ba2701c83cc97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7547fd08be063d704bd8986b31d5555512d4ea901a7fa8bfce36f445c4a698913ce21d2a657d36f03ac7e157bd17e28f432668cc3d7e93a70e100d00cfe2eb1
|
7
|
+
data.tar.gz: 83ee12c738f001fa3fa99df237e5726c989985531b9bbbb7ed72fc88e8abb0db1e6f8b6d1e27e5a0dc5bc192dc5bdba84fdaeeb749afa063cc111ef68398a67e
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
|
2
|
-
# simple_split – dead simple A/B testing on Rails
|
2
|
+
# simple_split – dead simple A/B testing on Rails [![Gem Version](https://badge.fury.io/rb/simple_split.svg)](http://badge.fury.io/rb/simple_split) [![Code Climate](https://codeclimate.com/github/lexi-lambda/simple_split/badges/gpa.svg)](https://codeclimate.com/github/lexi-lambda/simple_split) [![Build Status](https://travis-ci.org/lexi-lambda/simple_split.svg?branch=master)](https://travis-ci.org/lexi-lambda/simple_split)
|
3
3
|
|
4
|
-
The `simple_split` gem provides the absolute simplest possible
|
5
|
-
testing
|
6
|
-
|
7
|
-
|
4
|
+
The `simple_split` gem provides the absolute simplest possible interface for
|
5
|
+
split testing via Rails while still providing an expressive set of tools for
|
6
|
+
writing and maintaining experiments. More traditional solutions like
|
7
|
+
[`split`][split] provide more bells and whistles, but they also do far
|
8
|
+
more than is necessary for simple split testing via good analytics services.
|
8
9
|
|
9
|
-
Instead, `simple_split` is bare
|
10
|
+
Instead, `simple_split` is bare bones, but it still supports flexible testing.
|
10
11
|
|
11
|
-
-
|
12
|
+
- Includes optionally-weighted variations
|
12
13
|
- Does not require the use of any data store
|
13
14
|
- Variations already seen by users are tracked via cookies
|
14
15
|
|
15
16
|
## Quick Start
|
16
17
|
|
17
18
|
Add `gem 'simple_split'` to your Gemfile, then run `bundle`. That's it. Now you
|
18
|
-
can start
|
19
|
+
can start writing A/B tests for your project.
|
19
20
|
|
20
21
|
All classes that inherit from `ActionView` or `ActionController` have access to
|
21
22
|
the `ab_test` method. It accepts an experiment name and a list of variations.
|
@@ -25,10 +26,12 @@ ab_test 'experiment_name', 'variation_a', 'variation_b', 'variation_c'
|
|
25
26
|
```
|
26
27
|
|
27
28
|
The result of a call to `ab_test` is a randomly selected variation. If a user
|
28
|
-
has already seen a particular variation, that
|
29
|
-
instead of
|
29
|
+
has already seen a particular variation, that result will always be returned
|
30
|
+
instead of picking a new one.
|
30
31
|
|
31
|
-
|
32
|
+
Variations can be weighted by using a hash, where the keys are variation labels
|
33
|
+
and the values are numeric weights. If no weight is provided, the default is to
|
34
|
+
use `1.0`.
|
32
35
|
|
33
36
|
```ruby
|
34
37
|
ab_test 'experiment_name', { 'variation_a' => 1.0, 'variation_b' => 0.2 }
|
@@ -36,8 +39,9 @@ ab_test 'experiment_name', { 'variation_a' => 1.0, 'variation_b' => 0.2 }
|
|
36
39
|
|
37
40
|
## Credit
|
38
41
|
|
39
|
-
This was inspired by the [`simple_abs`][simple_abs] gem, which
|
40
|
-
stripped-down,
|
42
|
+
This was inspired by the [`simple_abs`][simple_abs] gem, which also provides a
|
43
|
+
stripped-down interface. However, it still persists information to a database,
|
44
|
+
and it does not include support for weighted variations.
|
41
45
|
|
42
46
|
[split]: https://github.com/splitrb/split
|
43
47
|
[simple_abs]: https://github.com/n8/simple_abs
|
data/lib/simple_split/version.rb
CHANGED
data/simple_split.gemspec
CHANGED
@@ -13,13 +13,14 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = 'https://github.com/lexi-lambda/simple_split'
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
|
-
spec.executables = spec.files.grep(%r{^
|
16
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
21
21
|
spec.add_development_dependency 'rake', '~> 10.0'
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.7.0'
|
23
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
23
24
|
|
24
25
|
spec.add_runtime_dependency 'activesupport', '>= 3.0'
|
25
26
|
spec.add_runtime_dependency 'weighted_randomizer', '>= 0.1.2'
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis King
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 5.7.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: codeclimate-test-reporter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: activesupport
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,23 +97,16 @@ dependencies:
|
|
83
97
|
description:
|
84
98
|
email:
|
85
99
|
- alexis@gophilosophie.com
|
86
|
-
executables:
|
87
|
-
- bundler
|
88
|
-
- console
|
89
|
-
- rake
|
90
|
-
- setup
|
100
|
+
executables: []
|
91
101
|
extensions: []
|
92
102
|
extra_rdoc_files: []
|
93
103
|
files:
|
94
104
|
- ".gitignore"
|
95
105
|
- ".rubocop.yml"
|
106
|
+
- ".travis.yml"
|
96
107
|
- Gemfile
|
97
108
|
- README.md
|
98
109
|
- Rakefile
|
99
|
-
- bin/bundler
|
100
|
-
- bin/console
|
101
|
-
- bin/rake
|
102
|
-
- bin/setup
|
103
110
|
- lib/simple_split.rb
|
104
111
|
- lib/simple_split/version.rb
|
105
112
|
- simple_split.gemspec
|
data/bin/bundler
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'bundler' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('bundler', 'bundler')
|
data/bin/console
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'console' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('simple_split', 'console')
|
data/bin/rake
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'rake' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('rake', 'rake')
|
data/bin/setup
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# This file was generated by Bundler.
|
4
|
-
#
|
5
|
-
# The application 'setup' is installed as part of a gem, and
|
6
|
-
# this file is here to facilitate running it.
|
7
|
-
#
|
8
|
-
|
9
|
-
require 'pathname'
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
-
Pathname.new(__FILE__).realpath)
|
12
|
-
|
13
|
-
require 'rubygems'
|
14
|
-
require 'bundler/setup'
|
15
|
-
|
16
|
-
load Gem.bin_path('simple_split', 'setup')
|