easy_ab 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -0
- data/README.md +33 -0
- data/easy_ab.gemspec +1 -1
- data/lib/easy_ab.rb +4 -0
- data/lib/easy_ab/version.rb +1 -1
- data/lib/generators/easy_ab/templates/easy_ab.rb +18 -0
- metadata +15 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7b3229647e76c5be95b159a35cfeb493449ead0c975de0255b1ad4396902725a
|
4
|
+
data.tar.gz: 98d9de1f18b1f4f6bad4e799c0000c7d824654941190e291efb08ab20a2f646f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eddc521758759b655843f21d3e9cc0647b3a53c94916aafd8e71cca3cdad5b410c87985f6e7c37572e64e5ebcfa0128f5b3cdfd7b2926c499a69942973996e7
|
7
|
+
data.tar.gz: 3475210720f05877fbb38d76e8c449205a0e1de12c87e27176d9c95ea36fdd92fddbc0c57f33bb7e56ed9d4cf0e62f67494caa68ae170fee14ecc01d3de917a2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.8.0 (2019-01-08)
|
2
|
+
- Provide a solution so you are no longer to restart rails server to apply any definition changes of experiments in development mode.
|
3
|
+
|
4
|
+
## 0.7.0 (2017-11-21)
|
5
|
+
- Set domain of cookie to :all to support cross-subdomain experiment.
|
6
|
+
|
1
7
|
## 0.6.2 (2017-09-01)
|
2
8
|
- [BF] Calling ab_test multiple times with different experiment name in one request may cause unwanted result if the definitions of experiments contain scope or rules.
|
3
9
|
|
data/README.md
CHANGED
@@ -239,6 +239,39 @@ end
|
|
239
239
|
ab_test(:button_color).class # => String
|
240
240
|
```
|
241
241
|
|
242
|
+
## Don't want to restart server whenever you make changes to your easy_ab.rb? (Only recommended for small projects)
|
243
|
+
1. Upgrade to 0.8.0 or later
|
244
|
+
|
245
|
+
2. In your `config/initializers/easy_ab.rb`, add `EasyAb.experiments.reset` at the first line.
|
246
|
+
```ruby
|
247
|
+
EasyAb.experiments.reset # Add this line
|
248
|
+
|
249
|
+
EasyAb.configure do |config|
|
250
|
+
.
|
251
|
+
.
|
252
|
+
.
|
253
|
+
end
|
254
|
+
|
255
|
+
EasyAb.experiments do |experiment|
|
256
|
+
.
|
257
|
+
.
|
258
|
+
.
|
259
|
+
end
|
260
|
+
```
|
261
|
+
|
262
|
+
3. In your `config/environments/development.rb`, set `config.reload_classes_only_on_change` to `false`. Note that this setting causes large project slow.
|
263
|
+
|
264
|
+
4. In your `config/application.rb`, add the following snippets:
|
265
|
+
```ruby
|
266
|
+
initializer_file = Rails.root.join('config', 'initializers', 'easy_ab.rb')
|
267
|
+
reloader = ActiveSupport::FileUpdateChecker.new([initializer_file]) do
|
268
|
+
load initializer_file
|
269
|
+
end
|
270
|
+
ActiveSupport::Reloader.to_prepare do
|
271
|
+
reloader.execute_if_updated
|
272
|
+
end
|
273
|
+
```
|
274
|
+
|
242
275
|
# Todo
|
243
276
|
* Add comparisons with existing A/B testing gems
|
244
277
|
* Convertion rate
|
data/easy_ab.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
f.match(%r{^(test|spec|features)/})
|
13
13
|
end
|
14
14
|
s.homepage = 'https://github.com/icarus4/easy_ab'
|
15
|
-
s.license
|
15
|
+
s.license = 'MIT'
|
16
16
|
|
17
17
|
s.add_development_dependency 'rspec-core', '~> 3.0', '>= 3.0.0'
|
18
18
|
s.add_development_dependency 'rspec', '~> 3.0'
|
data/lib/easy_ab.rb
CHANGED
data/lib/easy_ab/version.rb
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
# If you want to change definitions of experiments without restart rails server in development mode
|
2
|
+
# Follow the following instructions:
|
3
|
+
#
|
4
|
+
# 1. Set config.reload_classes_only_on_change to false in config/environments/development.rb
|
5
|
+
# (Note that this setting only recommended for small project.)
|
6
|
+
#
|
7
|
+
# 2. Add the following snippets in your application.rb
|
8
|
+
#
|
9
|
+
# initializer_file = Rails.root.join('config', 'initializers', 'easy_ab.rb')
|
10
|
+
# reloader = ActiveSupport::FileUpdateChecker.new([initializer_file]) do
|
11
|
+
# load initializer_file
|
12
|
+
# end
|
13
|
+
# ActiveSupport::Reloader.to_prepare do
|
14
|
+
# reloader.execute
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
EasyAb.experiments.reset
|
18
|
+
|
1
19
|
EasyAb.configure do |config|
|
2
20
|
# Define how to check whether current user is signed in or not
|
3
21
|
config.user_signed_in_method = -> { user_signed_in? }
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_ab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Chu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.0'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 3.0.0
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.0'
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 3.0.0
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -48,22 +48,22 @@ dependencies:
|
|
48
48
|
name: activerecord
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '4.2'
|
54
51
|
- - ">="
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 4.0.0
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '4.2'
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '4.2'
|
64
61
|
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: 4.0.0
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '4.2'
|
67
67
|
description:
|
68
68
|
email: icarus4.chu@gmail.com
|
69
69
|
executables: []
|
@@ -109,10 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
|
113
|
-
rubygems_version: 2.6.13
|
112
|
+
rubygems_version: 3.0.2
|
114
113
|
signing_key:
|
115
114
|
specification_version: 4
|
116
115
|
summary: Easy, flexible A/B testing and feature toggle for Rails
|
117
116
|
test_files: []
|
118
|
-
has_rdoc:
|