vignette 0.0.6pre1 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,7 +8,7 @@ Vignette is as simple as sampling from an Array:
8
8
 
9
9
  @price = [5, 10, 15].vignette
10
10
 
11
- We've also added a filter to HAML for testing:
11
+ We've also added a filter to HAML for running quick A/b tests:
12
12
 
13
13
  %h1
14
14
  :vignette
@@ -32,7 +32,7 @@ Or install it yourself as:
32
32
 
33
33
  ## Usage
34
34
 
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. For this to work, all calls to Vignette must be within the request cycle (within an around_filter in ActionController::Base). Test are identified by a checksum of the Array, and thus, changing the Array will restart that test.
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
38
  Vignette.init(:session)
@@ -40,7 +40,7 @@ Vignette was crafted to make A/b testing as simple as possible. Simply run the
40
40
  # To use cookies
41
41
  Vignette.init(:cookies)
42
42
 
43
- # Or random sampling
43
+ # Or random sampling [no persistence]
44
44
  Vignette.init(:random)
45
45
 
46
46
  Running tests:
@@ -57,7 +57,9 @@ Running tests:
57
57
 
58
58
  Finally, to store in analytics which tests were run, simple check
59
59
 
60
- Vignette.test -> { 'views/orders/new.html.haml:54d3c10a1b21' => 0 } # First choice was select for new.html.haml test
60
+ Vignette.test -> { 'views/orders/new.html.haml:54d3c10a1b21' => 'Test one' } # First choice was select for new.html.haml test
61
+
62
+ N.B. If you choose to store your `tests` in `cookies`, then the chosen result will be stored in a cookie sent to the user's browser. Thus, be careful not to store any secret information in a test.
61
63
 
62
64
  ## Contributing
63
65
 
@@ -1,3 +1,3 @@
1
1
  module Vignette
2
- VERSION = "0.0.6pre1"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/vignette.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "vignette/version"
2
2
  require "vignette/object_extensions"
3
3
  require "vignette/filter"
4
+ require "vignette/vignette_errors"
4
5
 
5
6
  module Vignette
6
7
  # Your code goes here...
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vignette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6pre1
5
- prerelease: 5
4
+ version: 0.0.6
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Geoff Hayes
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-05 00:00:00.000000000 Z
12
+ date: 2013-11-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Simple, effective A/b testing made easy.
15
15
  email:
@@ -44,9 +44,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
47
- - - ! '>'
47
+ - - ! '>='
48
48
  - !ruby/object:Gem::Version
49
- version: 1.3.1
49
+ version: '0'
50
50
  requirements: []
51
51
  rubyforge_project:
52
52
  rubygems_version: 1.8.25