The project is in a healthy, maintained state
OpenFeature Provider that allows ConfigCat to be used with the OpenFeature Ruby SDK.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

~> 8.0.1
 Project Readme

ConfigCat OpenFeature Provider for Ruby

Build Status Gem Version

This repository contains an OpenFeature provider that allows ConfigCat to be used with the OpenFeature Ruby SDK.

Requirements

  • Ruby >= 3.1

Installation

gem install configcat-openfeature-provider

Usage

The initializer of ConfigCat::OpenFeature::Provider takes the SDK key and an optional ConfigCat::ConfigCatOptions argument containing the additional configuration options for the ConfigCat Ruby SDK:

require "configcat-openfeature-provider"

# Configure the OpenFeature API with the ConfigCat provider.
OpenFeature::SDK.configure do |config|
  config.set_provider(ConfigCat::OpenFeature::Provider.new(
    sdk_key: "<YOUR-CONFIGCAT-SDK-KEY>",
    # Build options for the ConfigCat SDK.
    options: ConfigCat::ConfigCatOptions.new(
      polling_mode: ConfigCat::PollingMode.auto_poll,
      offline: false
    )))
end

# Create a client.
client = OpenFeature::SDK.build_client

# Evaluate feature flag.
flag_value = client.fetch_boolean_value(
  flag_key: "isMyAwesomeFeatureEnabled",
  default_value: false
)

For more information about all the configuration options, see the Ruby SDK documentation.

Need help?

https://configcat.com/support

Contributing

Contributions are welcome. For more info please read the Contribution Guideline.

About ConfigCat

ConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using ConfigCat Dashboard even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.

ConfigCat is a hosted feature flag service. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.