easy_ab 0.0.2 → 0.0.3

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
2
  SHA1:
3
- metadata.gz: 50e5179b65bec859cfb55ecec25e5fd7698619ff
4
- data.tar.gz: a938f51b36faa0c46cf31a02d0a831ecef4e8c9e
3
+ metadata.gz: 1c7eddf36ea57f8a4c34fa66755ad8d93a55aeca
4
+ data.tar.gz: e25036d29777b725fdc401bd5315fadeee044523
5
5
  SHA512:
6
- metadata.gz: aa8c33658ef5294a3de560dcffe5fb085c9746382dbd60b00e7b1f9d223f7801fc55c81372032601e7136a25946ccfbeb3428afd45ce2861c053a1b3dc347fcb
7
- data.tar.gz: 87e59b21a23a6748434bc3fe288edf83aab6e2150d4323915a5286232e78b876252aecf40cf3a2c384b2f987c214e3f62a6ef53ac117e93d6bf3c06f2c94cdec
6
+ metadata.gz: afcc1ccfa3b319b894223e85997107dc1df50fbd2ba57fb70b7c1d0bb9d0886889c46a8e00694a4eb535923e116b1dfa2bc4564f4aa1bc7f375e120739ffc56e
7
+ data.tar.gz: 78e202157604d52dd71f90a3aab4905c32ab70bc4cfc4f19042568336350897c6d10138c1226df3e1c5923113ffda7d2a84a9ecf4c9e6855f84afe7f8b8ce400
data/CHANGELOG.md CHANGED
@@ -0,0 +1,2 @@
1
+ # 0.0.3
2
+ * Add new API `all_participated_experiments` to list current user's all participated experiments
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Easy, flexible A/B testing tool for Rails.
4
4
 
5
- * Design for web
5
+ * Design for web.
6
6
  * Use your database to keep users' testing info to seamlessly handle the transition from guest to signed in user. You don't need to prepare extra stack like Redis or something else.
7
7
  * Grouping your users to your predefined variants with very easy and flexible way:
8
8
  * Random with equal weightings.
@@ -32,14 +32,7 @@ Easy, flexible A/B testing tool for Rails.
32
32
  * No DSL, just setup your rules with pure Ruby (and Rails) :)
33
33
 
34
34
  # Notice
35
- Easy AB is under development. Currently don't use in your production app.
36
-
37
- # Why Easy AB?
38
- ## Comparisons
39
- ### Split
40
- ### Field Test
41
- ### Flipper
42
- ### ...
35
+ Easy AB is under development and is in beta phase. Be sure to test before integrating with your production app.
43
36
 
44
37
  # Installation & Setup
45
38
 
@@ -128,6 +121,29 @@ Keep in mind that `ab_test()` helper always returns String. You have to handle t
128
121
  @extra_vip_duration = ab_test(:extra_vip_duration).to_i.days
129
122
  ```
130
123
 
124
+ You can dump experiment data of current user to analytics services (Mixpanel, Google Analytics, etc.) by `all_participated_experiments`
125
+
126
+ ```erb
127
+ # In your view
128
+ <script type="text/javascript">
129
+ mixpanel.track("My Event", {
130
+ <% all_participated_experiments.each do |experiment, variant| %>
131
+ "<%= experiment %>": "<%= variant %>",
132
+ <% end %>
133
+ })
134
+ </script>
135
+ ```
136
+
137
+ The return format of `all_participated_experiments`
138
+
139
+ ```ruby
140
+ {
141
+ 'experiment 1' => 'variant 1',
142
+ 'experiment 2' => 'variant 2',
143
+ ...
144
+ }
145
+ ```
146
+
131
147
  # Others
132
148
  ## Type of experiments
133
149
  Both String and Symbol are valid when defining experiment or passing to `ab_test`.
@@ -168,4 +184,9 @@ end
168
184
 
169
185
  # In view/controller
170
186
  ab_test(:button_color).class # => String
171
- ```
187
+ ```
188
+
189
+ # Todo
190
+ * Add comparisons with existing A/B testing gems
191
+ * Convertion rate
192
+ * Test code
data/easy_ab.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'easy_ab/version'
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'easy_ab'
7
7
  s.version = EasyAb::VERSION
8
- s.summary = 'Flexible A/B testing and feature toggle for Rails'
8
+ s.summary = 'Easy, flexible A/B testing and feature toggle for Rails'
9
9
  s.authors = ['Gary Chu']
10
10
  s.email = 'icarus4.chu@gmail.com'
11
11
  s.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -32,7 +32,7 @@ module EasyAb
32
32
  # 'experiment 2' => 'variant 2',
33
33
  # ...
34
34
  # }
35
- def participated_experiments(options = {})
35
+ def all_participated_experiments(options = {})
36
36
  user_recognition = find_ab_test_user_recognition(options)
37
37
  groupings = if user_recognition[:id]
38
38
  EasyAb::Grouping.where("user_id = ? OR cookie = ?", user_recognition[:id], user_recognition[:cookie])
@@ -1,3 +1,3 @@
1
1
  module EasyAb
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Chu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: icarus4.chu@gmail.com
@@ -57,6 +57,6 @@ rubyforge_project:
57
57
  rubygems_version: 2.6.12
58
58
  signing_key:
59
59
  specification_version: 4
60
- summary: Flexible A/B testing and feature toggle for Rails
60
+ summary: Easy, flexible A/B testing and feature toggle for Rails
61
61
  test_files: []
62
62
  has_rdoc: