split 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/README.md +1 -2
- data/lib/split.rb +1 -0
- data/lib/split/algorithms.rb +2 -1
- data/lib/split/algorithms/weighted_sample.rb +2 -1
- data/lib/split/algorithms/whiplash.rb +1 -0
- data/lib/split/alternative.rb +1 -0
- data/lib/split/configuration.rb +1 -0
- data/lib/split/dashboard.rb +1 -0
- data/lib/split/dashboard/helpers.rb +1 -0
- data/lib/split/dashboard/public/dashboard-filtering.js +43 -0
- data/lib/split/dashboard/public/style.css +4 -0
- data/lib/split/dashboard/views/_experiment.erb +1 -1
- data/lib/split/dashboard/views/index.erb +6 -1
- data/lib/split/dashboard/views/layout.erb +2 -1
- data/lib/split/encapsulated_helper.rb +1 -0
- data/lib/split/engine.rb +1 -0
- data/lib/split/exceptions.rb +1 -0
- data/lib/split/experiment.rb +1 -0
- data/lib/split/experiment_catalog.rb +1 -0
- data/lib/split/extensions.rb +2 -1
- data/lib/split/extensions/array.rb +2 -1
- data/lib/split/extensions/string.rb +2 -1
- data/lib/split/helper.rb +1 -0
- data/lib/split/metric.rb +1 -0
- data/lib/split/persistence.rb +1 -0
- data/lib/split/persistence/cookie_adapter.rb +1 -0
- data/lib/split/persistence/redis_adapter.rb +1 -0
- data/lib/split/persistence/session_adapter.rb +2 -1
- data/lib/split/trial.rb +1 -0
- data/lib/split/version.rb +3 -2
- data/lib/split/zscore.rb +1 -0
- data/spec/algorithms/weighted_sample_spec.rb +1 -0
- data/spec/algorithms/whiplash_spec.rb +1 -0
- data/spec/alternative_spec.rb +1 -0
- data/spec/configuration_spec.rb +1 -0
- data/spec/dashboard_helpers_spec.rb +1 -0
- data/spec/dashboard_spec.rb +1 -0
- data/spec/encapsulated_helper_spec.rb +1 -0
- data/spec/experiment_catalog_spec.rb +1 -0
- data/spec/experiment_spec.rb +1 -0
- data/spec/helper_spec.rb +2 -1
- data/spec/metric_spec.rb +1 -0
- data/spec/persistence/cookie_adapter_spec.rb +1 -0
- data/spec/persistence/redis_adapter_spec.rb +1 -0
- data/spec/persistence/session_adapter_spec.rb +1 -0
- data/spec/persistence_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/cookies_mock.rb +2 -1
- data/spec/trial_spec.rb +1 -0
- data/split.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5ce44cc3d861186dd8d1acce66eea15acb2f5af
|
4
|
+
data.tar.gz: 85bd7d57f7e56d0c4ac06ab8eecfbce40ec96060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa91bd0caab6c179b0393bb25f075efa1782bee1ce6cc238b470dac58d76b9819d0e5534e18a68e872ee88d81f01f6fba9ac97e89bc0ede5add5dc00b5a16a6
|
7
|
+
data.tar.gz: 2aca58592f7a381482dbcfaec0ba8b490ccb2f032ad68a3e4a495a8dd56a26a337066929954380188da53fef7a21b21520a0601adb5a7125b3f62aae6dcc9340
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at andrewnez@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/README.md
CHANGED
@@ -8,7 +8,6 @@ Split is designed to be hacker friendly, allowing for maximum customisation and
|
|
8
8
|
|
9
9
|
[![Gem Version](https://badge.fury.io/rb/split.svg)](http://badge.fury.io/rb/split)
|
10
10
|
[![Build Status](https://secure.travis-ci.org/splitrb/split.svg?branch=master)](http://travis-ci.org/splitrb/split)
|
11
|
-
[![Dependency Status](https://gemnasium.com/splitrb/split.svg)](https://gemnasium.com/splitrb/split)
|
12
11
|
[![Code Climate](https://codeclimate.com/github/splitrb/split.svg)](https://codeclimate.com/github/splitrb/split)
|
13
12
|
[![Coverage Status](http://img.shields.io/coveralls/splitrb/split.svg)](https://coveralls.io/r/splitrb/split)
|
14
13
|
|
@@ -37,7 +36,7 @@ gem install split
|
|
37
36
|
|
38
37
|
### Rails
|
39
38
|
|
40
|
-
Adding `gem 'split'` to your Gemfile will
|
39
|
+
Adding `gem 'split'` to your Gemfile will autoload it when rails starts up, as long as you've configured redis it will 'just work'.
|
41
40
|
|
42
41
|
### Sinatra
|
43
42
|
|
data/lib/split.rb
CHANGED
data/lib/split/algorithms.rb
CHANGED
data/lib/split/alternative.rb
CHANGED
data/lib/split/configuration.rb
CHANGED
data/lib/split/dashboard.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
$(function() {
|
2
|
+
$('#filter').on('keyup', function() {
|
3
|
+
$input = $(this);
|
4
|
+
|
5
|
+
if ($input.val() == '') {
|
6
|
+
$('div.experiment').show();
|
7
|
+
return false;
|
8
|
+
}
|
9
|
+
|
10
|
+
$('div.experiment').hide();
|
11
|
+
selector = 'div.experiment[data-name*="' + $input.val() + '"]';
|
12
|
+
$(selector).show();
|
13
|
+
});
|
14
|
+
|
15
|
+
$('#clear-filter').on('click', function() {
|
16
|
+
$('#filter').val('');
|
17
|
+
$('div.experiment').show();
|
18
|
+
$('#toggle-active').val('Hide active');
|
19
|
+
$('#toggle-completed').val('Hide completed');
|
20
|
+
});
|
21
|
+
|
22
|
+
$('#toggle-active').on('click', function() {
|
23
|
+
$button = $(this);
|
24
|
+
if ($button.val() == 'Hide active') {
|
25
|
+
$button.val('Show active');
|
26
|
+
} else {
|
27
|
+
$button.val('Hide active');
|
28
|
+
}
|
29
|
+
|
30
|
+
$('div.experiment[data-complete="false"]').toggle();
|
31
|
+
});
|
32
|
+
|
33
|
+
$('#toggle-completed').on('click', function() {
|
34
|
+
$button = $(this);
|
35
|
+
if ($button.val() == 'Hide completed') {
|
36
|
+
$button.val('Show completed');
|
37
|
+
} else {
|
38
|
+
$button.val('Hide completed');
|
39
|
+
}
|
40
|
+
|
41
|
+
$('div.experiment[data-complete="true"]').toggle();
|
42
|
+
});
|
43
|
+
});
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<% experiment.calc_winning_alternatives %>
|
8
8
|
|
9
|
-
<div class="<%= experiment_class %>">
|
9
|
+
<div class="<%= experiment_class %>" data-name="<%= experiment.name %>" data-complete="<%= experiment.has_winner? %>">
|
10
10
|
<div class="experiment-header">
|
11
11
|
<h2>
|
12
12
|
Experiment: <%= experiment.name %>
|
@@ -1,6 +1,11 @@
|
|
1
1
|
<% if @experiments.any? %>
|
2
2
|
<p class="intro">The list below contains all the registered experiments along with the number of test participants, completed and conversion rate currently in the system.</p>
|
3
3
|
|
4
|
+
<input type="text" placeholder="Begin typing to filter" id="filter" />
|
5
|
+
<input type="button" id="toggle-completed" value="Hide completed" />
|
6
|
+
<input type="button" id="toggle-active" value="Hide active" />
|
7
|
+
<input type="button" id="clear-filter" value="Clear filters" />
|
8
|
+
|
4
9
|
<% @experiments.each do |experiment| %>
|
5
10
|
<% if experiment.goals.empty? %>
|
6
11
|
<%= erb :_experiment, :locals => {:goal => nil, :experiment => experiment} %>
|
@@ -14,4 +19,4 @@
|
|
14
19
|
<% else %>
|
15
20
|
<p class="intro">No experiments have started yet, you need to define them in your code and introduce them to your users.</p>
|
16
21
|
<p class="intro">Check out the <a href='https://github.com/splitrb/split#readme'>Readme</a> for more help getting started.</p>
|
17
|
-
<% end %>
|
22
|
+
<% end %>
|
@@ -6,6 +6,7 @@
|
|
6
6
|
<link href="<%= url 'style.css' %>" media="screen" rel="stylesheet" type="text/css">
|
7
7
|
<script type="text/javascript" src='<%= url 'dashboard.js' %>'></script>
|
8
8
|
<script type="text/javascript" src='<%= url 'jquery-1.11.1.min.js' %>'></script>
|
9
|
+
<script type="text/javascript" src='<%= url 'dashboard-filtering.js' %>'></script>
|
9
10
|
<title>Split</title>
|
10
11
|
|
11
12
|
</head>
|
@@ -23,4 +24,4 @@
|
|
23
24
|
<p>Powered by <a href="http://github.com/splitrb/split">Split</a> v<%=Split::VERSION %></p>
|
24
25
|
</div>
|
25
26
|
</body>
|
26
|
-
</html>
|
27
|
+
</html>
|
data/lib/split/engine.rb
CHANGED
data/lib/split/exceptions.rb
CHANGED
data/lib/split/experiment.rb
CHANGED
data/lib/split/extensions.rb
CHANGED
data/lib/split/helper.rb
CHANGED
data/lib/split/metric.rb
CHANGED
data/lib/split/persistence.rb
CHANGED
data/lib/split/trial.rb
CHANGED
data/lib/split/version.rb
CHANGED
data/lib/split/zscore.rb
CHANGED
data/spec/alternative_spec.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
data/spec/dashboard_spec.rb
CHANGED
data/spec/experiment_spec.rb
CHANGED
data/spec/helper_spec.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'spec_helper'
|
2
3
|
|
3
4
|
# TODO change some of these tests to use Rack::Test
|
@@ -916,7 +917,7 @@ describe Split::Helper do
|
|
916
917
|
|
917
918
|
it "fails gracefully if config is missing alternatives" do
|
918
919
|
Split.configuration.experiments[:my_experiment] = { :foo => "Bar" }
|
919
|
-
expect(lambda { ab_test :my_experiment }).to raise_error
|
920
|
+
expect(lambda { ab_test :my_experiment }).to raise_error(NoMethodError)
|
920
921
|
end
|
921
922
|
end
|
922
923
|
|
data/spec/metric_spec.rb
CHANGED
data/spec/persistence_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/trial_spec.rb
CHANGED
data/split.gemspec
CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_development_dependency 'bundler', '~> 1.10'
|
29
29
|
s.add_development_dependency 'coveralls', '~> 0.8'
|
30
30
|
s.add_development_dependency 'rack-test', '~> 0.6'
|
31
|
-
s.add_development_dependency 'rake', '~>
|
31
|
+
s.add_development_dependency 'rake', '~> 11.1'
|
32
32
|
s.add_development_dependency 'rspec', '~> 3.4'
|
33
33
|
end
|
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: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '11.1'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '11.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- ".travis.yml"
|
148
148
|
- Appraisals
|
149
149
|
- CHANGELOG.md
|
150
|
+
- CODE_OF_CONDUCT.md
|
150
151
|
- CONTRIBUTING.md
|
151
152
|
- Gemfile
|
152
153
|
- LICENSE
|
@@ -162,6 +163,7 @@ files:
|
|
162
163
|
- lib/split/configuration.rb
|
163
164
|
- lib/split/dashboard.rb
|
164
165
|
- lib/split/dashboard/helpers.rb
|
166
|
+
- lib/split/dashboard/public/dashboard-filtering.js
|
165
167
|
- lib/split/dashboard/public/dashboard.js
|
166
168
|
- lib/split/dashboard/public/jquery-1.11.1.min.js
|
167
169
|
- lib/split/dashboard/public/reset.css
|