CARVIEW |
assaf / vanity
- Source
- Commits
- Network (10)
- Issues (1)
- Downloads (11)
- Wiki (3)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
name | age | message | |
---|---|---|---|
![]() |
CHANGELOG | Tue Jan 05 18:55:15 -0800 2010 | Bumped version number, added short blurb in CHA... [assaf] |
![]() |
MIT-LICENSE | Fri Nov 13 17:20:55 -0800 2009 | Changed to MIT license. [assaf] |
![]() |
README.rdoc | Tue Dec 01 10:36:56 -0800 2009 | Fixed A/B alternative choosing to work with jQu... [assaf] |
![]() |
Rakefile | Thu Dec 17 13:36:02 -0800 2009 | Tag releases with vX.Y.Z (see https://semver.org/) [assaf] |
![]() |
bin/ | Wed Dec 23 22:33:02 -0800 2009 | Added: Command line "vanity list" catalogs all ... [assaf] |
![]() |
doc/ | Wed Jan 27 17:45:51 -0800 2010 | fix typo in docs [tswicegood] |
![]() |
lib/ | Tue Jan 05 18:46:27 -0800 2010 | Merge branch 'garb' [assaf] |
![]() |
test/ | Tue Jan 05 18:46:21 -0800 2010 | Fix: experiment not saved. [assaf] |
![]() |
vanity.gemspec | Tue Jan 05 18:55:15 -0800 2010 | Bumped version number, added short blurb in CHA... [assaf] |
![]() |
vendor/ | Mon Nov 30 10:29:30 -0800 2009 | Switched to redis-rb from https://github.com/ezm... [assaf] |
Vanity is an Experiment Driven Development framework for Rails.
- All about Vanity: vanity.labnotes.org
- On github: github.com/assaf/vanity
- Vanity requires Redis 1.0 or later.
A/B Testing With Rails (In 5 Easy Steps)
Step 1: Start using Vanity in your Rails application:
gem.config "vanity"
And:
class ApplicationController < ActionController::Base use_vanity :current_user end
Step 2: Define your first A/B test. This experiment goes in the file experiments/price_options.rb:
ab_test "Price options" do description "Mirror, mirror on the wall, who's the better price of all?" alternatives 19, 25, 29 metrics :signups end
Step 3: Present the different options to your users:
<h2>Get started for only $<%= ab_test :price_options %> a month!</h2>
Step 4: Measure conversion:
class SignupController < ApplicationController def signup @account = Account.new(params[:account]) if @account.save track! :signups redirect_to @acccount else render action: :offer end end end
Step 5: Check the report:
vanity --output vanity.html
Building From Source
To run the test suite for the first time:
$ gem install rails mocha timecop $ rake
You can also +rake test+ if you insist on being explicit.
To build the documentation:
$ gem install yardoc jekyll $ rake docs $ open html/index.html
To clean up after yourself:
$ rake clobber
To package Vanity as a gem and install on your machine:
$ rake install
Credits/License
Original code, copyright of Assaf Arkin, released under the MIT license.
Documentation available under the Creative Commons Attribution license.
For full list of credits and licenses: vanity.labnotes.org/credits.html.