Skip to content

abmeter/abmeter-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABMeter Gem

A simple A/B testing client library for Ruby applications.

Installation

Add this line to your application's Gemfile:

gem 'abmeter'

And then execute:

$ bundle install

Usage

# configure the client
ABMeter.configure do |config|
  config.api_key = ENV['ABMETER_API_KEY']
end

# Somewhere in the renedring code:
user = ABMeter.user(id: current_user.id, email: current_user.email)
text = ABMeter.param('welcome_text', user)

# Somewhere in the model code:
current_user.plan = purchased_plan.name
user = ABMeter.user(id: current_user.id, email: current_user.email)
ABMeter.event(`user_purchases_plan`, user, {plan: purchased_plan.name, price: purchased_plan.price})

License

The gem is available as open source under the terms of the MIT License.

About

ABMeter Ruby SDK for feature flags and A/B testing

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages