{"repo":"splitrb/split","free":true,"listed":false,"github":"https://github.com/splitrb/split","clone":"git clone https://github.com/splitrb/split.git","description":":chart_with_upwards_trend: The Rack Based A/B testing framework","language":"Ruby","stars":2708,"topics":["split","redis","ab-testing","ruby","rails","rack"],"license":"MIT","category":"databases-storage","readme_excerpt":"Split 📈 The Rack Based A/B testing framework https://libraries.io/rubygems/split Split is a rack based A/B testing framework designed to work with Rails, Sinatra or any other rack based app. Split is heavily inspired by the Abingo and Vanity Rails A/B testing plugins and Resque in its use of Redis. Split is designed to be hacker friendly, allowing for maximum customisation and extensibility. Install Requirements Split v4.0+ is currently tested with Ruby = 2.5 and Rails = 5.2. If your project requires compatibility with Ruby 2.4.x or older Rails versions. You can try v3.0 or v0.8.0(for Ruby 1.9.3) Split uses Redis as a datastore. Split only supports Redis 4.0 or greater. If you're on OS X, Homebrew is the simplest way to install Redis: You now have a Redis daemon running on port 6379 . Setup Rails Adding gem 'split' to your Gemfile will autoload it when rails starts up, as long as you've configured Redis it will 'just work'. Sinatra To configure Sinatra with Split you need to enable sessions and mix in the helper methods. Add the following lines at the top of your Sinatra app: Usage To begin your A/B test use the ab test method, naming your experiment with the first argument and then the different alternatives which you wish to test on as the other arguments. ab test returns one of the alternatives, if a user has already seen that test they will get the same alternative as before, which you can use to split your code on. It can be used to render different templates, show diff","default_branch":null,"files":null,"tree":[],"storefront":"/r/splitrb","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/splitrb/split/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}