vignette 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +6 -3
- data/lib/vignette/object_extensions.rb +3 -1
- data/lib/vignette/version.rb +1 -1
- data/vignette.gemspec +1 -1
- metadata +9 -11
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2761e522701cc819242684d22066db832a3d0555
|
4
|
+
data.tar.gz: b4781acbfcff19c92e6aff9e36c2fd304604ed45
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e79773fcde5989ec7ce01dc487c801aaaa0bf518752ff5eb938d35c9b144900a049d951c888638612907daad0214e8015fb046b2cb5bc9cd7799f2dc8bf7703b
|
7
|
+
data.tar.gz: 0ad6a310ce9a6c38b2b14bcb9fb414b10926ab9dfc259cd36d22dedc15a578db43bf1e83e7c59160b2b186044f81b6ff8cec4b43eca279ad224b8804df466026
|
data/README.md
CHANGED
@@ -35,13 +35,16 @@ Or install it yourself as:
|
|
35
35
|
Vignette was crafted to make A/b testing as simple as possible. Simply run the `vignette` function on any Array and get the result from a A/b test. Vignette will store this choice in session, a cookies or nowhere, based on how you configure Vignette. If you're in the request cycle (within an around_filter), Vignette will grab `session` or `cookies` for you. Otherwise, you'll need to specify where to store the result (if you want it consistent for the end-user). Vignette `tests` are identified by a checksum of the Array, and thus, changing the Array results in a new `test`.
|
36
36
|
|
37
37
|
# To store in session (default)
|
38
|
-
Vignette.init(:session)
|
38
|
+
Vignette.init(store: :session)
|
39
39
|
|
40
40
|
# To use cookies
|
41
|
-
Vignette.init(:cookies)
|
41
|
+
Vignette.init(store: :cookies)
|
42
42
|
|
43
43
|
# Or random sampling [no persistence]
|
44
|
-
Vignette.init(:random)
|
44
|
+
Vignette.init(store: :random)
|
45
|
+
|
46
|
+
# Other options
|
47
|
+
Vignette.init(logging: true) # add debug logging
|
45
48
|
|
46
49
|
Running tests:
|
47
50
|
|
@@ -32,9 +32,11 @@ module ObjectExtensions
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
else
|
35
|
-
name
|
35
|
+
name # TODO: This should be test_name = name
|
36
36
|
end
|
37
37
|
|
38
|
+
# p ['Test name',test_name]
|
39
|
+
|
38
40
|
store = Vignette.get_store
|
39
41
|
|
40
42
|
choice = store[key] ||= Kernel.rand(length) # Store key into storage if not available
|
data/lib/vignette/version.rb
CHANGED
data/vignette.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["geoff@safeshepherd.com"]
|
11
11
|
gem.description = %q{Simple, effective A/b testing made easy.}
|
12
12
|
gem.summary = %q{With a few simple features, get A/b testing up in your application.}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/hayesgm/vignette"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vignette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.8
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Geoff Hayes
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-02-17 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: Simple, effective A/b testing made easy.
|
15
14
|
email:
|
@@ -18,7 +17,7 @@ executables: []
|
|
18
17
|
extensions: []
|
19
18
|
extra_rdoc_files: []
|
20
19
|
files:
|
21
|
-
- .gitignore
|
20
|
+
- ".gitignore"
|
22
21
|
- Gemfile
|
23
22
|
- LICENSE.txt
|
24
23
|
- README.md
|
@@ -29,29 +28,28 @@ files:
|
|
29
28
|
- lib/vignette/version.rb
|
30
29
|
- lib/vignette/vignette_errors.rb
|
31
30
|
- vignette.gemspec
|
32
|
-
homepage:
|
31
|
+
homepage: https://github.com/hayesgm/vignette
|
33
32
|
licenses: []
|
33
|
+
metadata: {}
|
34
34
|
post_install_message:
|
35
35
|
rdoc_options: []
|
36
36
|
require_paths:
|
37
37
|
- lib
|
38
38
|
required_ruby_version: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
39
|
requirements:
|
41
|
-
- -
|
40
|
+
- - ">="
|
42
41
|
- !ruby/object:Gem::Version
|
43
42
|
version: '0'
|
44
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
44
|
requirements:
|
47
|
-
- -
|
45
|
+
- - ">="
|
48
46
|
- !ruby/object:Gem::Version
|
49
47
|
version: '0'
|
50
48
|
requirements: []
|
51
49
|
rubyforge_project:
|
52
|
-
rubygems_version:
|
50
|
+
rubygems_version: 2.2.2
|
53
51
|
signing_key:
|
54
|
-
specification_version:
|
52
|
+
specification_version: 4
|
55
53
|
summary: With a few simple features, get A/b testing up in your application.
|
56
54
|
test_files: []
|
57
55
|
has_rdoc:
|