https://github.com/configcat/openfeature-ruby
ConfigCat OpenFeature Provider for Ruby.
https://github.com/configcat/openfeature-ruby
configcat feature-flagging feature-flags feature-toggles open-feature openfeature ruby
Last synced: 2 months ago
JSON representation
ConfigCat OpenFeature Provider for Ruby.
- Host: GitHub
- URL: https://github.com/configcat/openfeature-ruby
- Owner: configcat
- License: mit
- Created: 2025-05-26T09:45:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-14T16:14:30.000Z (about 1 year ago)
- Last Synced: 2025-06-14T16:47:54.659Z (about 1 year ago)
- Topics: configcat, feature-flagging, feature-flags, feature-toggles, open-feature, openfeature, ruby
- Language: Ruby
- Homepage: https://configcat.com/docs/sdk-reference/openfeature/ruby
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# ConfigCat OpenFeature Provider for Ruby
[](https://github.com/configcat/openfeature-ruby/actions/workflows/ci.yml)
[](https://badge.fury.io/rb/configcat-openfeature-provider)
This repository contains an OpenFeature provider that allows [ConfigCat](https://configcat.com) to be used with the [OpenFeature Ruby SDK](https://github.com/open-feature/ruby-sdk).
## Requirements
- Ruby >= 3.1
## Installation
```sh
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](https://github.com/configcat/ruby-sdk):
```ruby
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: "",
# 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](https://configcat.com/docs/sdk-reference/ruby/#creating-the-configcat-client).
## Need help?
https://configcat.com/support
## Contributing
Contributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).
## 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.
- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)
- [Documentation](https://configcat.com/docs)
- [Blog](https://configcat.com/blog)