The project is in a healthy, maintained state
A Ruby SDK for Feature Management And Experimentation
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.1
 Project Readme

VWO Feature Management and Experimentation SDK for Ruby

Gem version License

Requirements

  • Works with 2.2.10 onwards

Installation

gem install vwo-fme-ruby-sdk

Basic usage

Importing and Instantiation

require 'vwo'

# options for initializing SDK
options = {
    sdk_key: 'your_sdk_key',
    account_id: 'your_account_id',
    gateway_service_url: 'http://your.host.com:port', # check section - How to Setup Gateway Service - for more details
}

# Initialize VWO
vwo_instance = VWO.init(options)

# get flag
get_flag_response = vwo_instance.get_flag('feature_key', { id: 'your_user_id'})
# check if feature is enabled
puts get_flag_response.is_enabled()
# get all variables
puts get_flag_response.get_variables()
# get specific variable
puts get_flag_response.get_variable('variable_key', 'default_value')

# track event for a user
track_response = vwo_instance.track_event('event_name', { id: 'your_user_id'})

# set attribute for a user
set_attribute_response = vwo_instance.set_attribute('attribute_key', 'attribute_value', { id: 'your_user_id'})

How to Setup VWO Gateway Service

To Setup the VWO Gateway Service, refer to this.

Authors

Changelog

Refer CHANGELOG.md for detailed changelog.

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

Apache License, Version 2.0

Copyright 2024 Wingify Software Pvt. Ltd.