field_test 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/app/views/field_test/experiments/_experiments.html.erb +4 -4
- data/app/views/field_test/experiments/show.html.erb +3 -3
- data/app/views/field_test/participants/show.html.erb +13 -4
- data/app/views/layouts/field_test/application.html.erb +9 -2
- data/lib/field_test/experiment.rb +2 -2
- data/lib/field_test/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d9052413033d14c99cad0376c77f9ade7573485549e0852adec3fc85038a4cb
|
4
|
+
data.tar.gz: b7a9bba74ceba3b9876a75165141ffc5a9cc9537f1e2951cbddd7de57ddf16f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f092659fd97859349a2673aa41be91de2a00e6d55607519d647df4caf2cf0949cf651386a11ae8072fd81c0cdc3340180b47319e2ee679b4c9c6787167591122
|
7
|
+
data.tar.gz: 9116b72afb732aeeed05f058907f7f48275e0389d27d8da98eef94815f24bdabdf75ccbe737dc062624a4d19399f9cedce6b3b184045277a147b14298bb297a1
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
Uses [Bayesian statistics](https://www.evanmiller.org/bayesian-ab-testing.html) to evaluate results so you don’t need to choose a sample size ahead of time.
|
11
11
|
|
12
|
-
[![Build Status](https://github.com/ankane/field_test/workflows/build/badge.svg
|
12
|
+
[![Build Status](https://github.com/ankane/field_test/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/field_test/actions)
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
@@ -20,10 +20,10 @@
|
|
20
20
|
<thead>
|
21
21
|
<tr>
|
22
22
|
<th>Variant</th>
|
23
|
-
<th
|
24
|
-
<th
|
25
|
-
<th
|
26
|
-
<th
|
23
|
+
<th class="width-20">Participants</th>
|
24
|
+
<th class="width-20">Conversions</th>
|
25
|
+
<th class="width-20">Conversion Rate</th>
|
26
|
+
<th class="width-20">Prob Winning</th>
|
27
27
|
</tr>
|
28
28
|
</thead>
|
29
29
|
<tbody>
|
@@ -14,9 +14,9 @@
|
|
14
14
|
<thead>
|
15
15
|
<tr>
|
16
16
|
<th>Participant</th>
|
17
|
-
<th
|
18
|
-
<th
|
19
|
-
<th
|
17
|
+
<th class="width-20">Variant</th>
|
18
|
+
<th class="width-20">Converted</th>
|
19
|
+
<th class="width-20">Started</th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
22
22
|
<tbody>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<thead>
|
11
11
|
<tr>
|
12
12
|
<th>Experiment</th>
|
13
|
-
<th
|
14
|
-
<th
|
15
|
-
<th
|
13
|
+
<th class="width-20">Variant</th>
|
14
|
+
<th class="width-20">Converted</th>
|
15
|
+
<th class="width-20">Started</th>
|
16
16
|
</tr>
|
17
17
|
</thead>
|
18
18
|
<tbody>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% experiment = FieldTest::Experiment.find(membership.experiment) rescue nil %>
|
24
24
|
<% if experiment %>
|
25
25
|
<%= form_for membership do |f| %>
|
26
|
-
<%= f.select "variant", options_for_select(FieldTest::Experiment.find(membership.experiment).variants.map { |v| [v, v] }, membership.variant)
|
26
|
+
<%= f.select "variant", options_for_select(FieldTest::Experiment.find(membership.experiment).variants.map { |v| [v, v] }, membership.variant) %>
|
27
27
|
<% end %>
|
28
28
|
<% else %>
|
29
29
|
<%= membership.variant %>
|
@@ -60,3 +60,12 @@
|
|
60
60
|
<% end %>
|
61
61
|
</tbody>
|
62
62
|
</table>
|
63
|
+
|
64
|
+
<%= javascript_tag nonce: true do %>
|
65
|
+
var selects = document.querySelectorAll(".edit_membership select");
|
66
|
+
for (var i = 0; i < selects.length; i++) {
|
67
|
+
selects[i].addEventListener("change", function () {
|
68
|
+
this.form.submit();
|
69
|
+
});
|
70
|
+
}
|
71
|
+
<% end %>
|
@@ -1,8 +1,11 @@
|
|
1
|
+
<!DOCTYPE html>
|
1
2
|
<html>
|
2
3
|
<head>
|
3
4
|
<title>Field Test</title>
|
4
5
|
|
5
|
-
<
|
6
|
+
<meta charset="utf-8" />
|
7
|
+
|
8
|
+
<%= content_tag :style, nonce: request.content_security_policy_nonce_directives&.include?("style-src") ? content_security_policy_nonce : nil do %>
|
6
9
|
body {
|
7
10
|
margin: 0;
|
8
11
|
padding: 20px;
|
@@ -78,7 +81,11 @@
|
|
78
81
|
padding-left: 10px;
|
79
82
|
padding-right: 10px;
|
80
83
|
}
|
81
|
-
|
84
|
+
|
85
|
+
.width-20 {
|
86
|
+
width: 20%;
|
87
|
+
}
|
88
|
+
<% end %>
|
82
89
|
</head>
|
83
90
|
<body>
|
84
91
|
<%= yield %>
|
@@ -116,9 +116,9 @@ module FieldTest
|
|
116
116
|
column =
|
117
117
|
if FieldTest.legacy_participants
|
118
118
|
:participant
|
119
|
-
elsif adapter_name
|
119
|
+
elsif adapter_name.match?(/postg/i) # postgres
|
120
120
|
"(participant_type, participant_id)"
|
121
|
-
elsif adapter_name
|
121
|
+
elsif adapter_name.match?(/mysql/i)
|
122
122
|
"COALESCE(participant_type, ''), participant_id"
|
123
123
|
else
|
124
124
|
# SQLite supports single column
|
data/lib/field_test/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: field_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.5.11
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: A/B testing for Rails
|