🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

xp_ruby_client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xp_ruby_client

0.1.2
Rubygems
Version published
Maintainers
1
Created
Source

Ruby Client for Xperiments

Build Status

Ruby client for A/B tool Xperiments. Based on Patron.
It is used to show the experiments during the page load.

Usage

Add gem 'xp_ruby_client' to your Gemfile.

You must to add XP_RUBY_CLIENT_HOST variable into your environment.

To use it, first you need to configure some settings:

  • application is required.
  • timeout, optional, default: 100 (ms)
  • segments, optional, can be set as an arguemnt on a request, default: {}
  • assigned, optional, can be set as an arguemnt on a request, default: []

Configurations:

experiment = XpRubyClient.experiment do |config|
  config.application = "web"
  config.timeout = 50
end

And retrieve an experiment:

experiment.retrieve # by default won't be used any segments
# OR
experiment.retrieve(segments: {lang: "en"})

Copyright (c) 2017 WeTransfer, Dmitry Tymchuk. See LICENSE.txt for further details.

FAQs

Package last updated on 03 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts