{"id":17753157,"url":"https://github.com/configcat/ruby-sdk","last_synced_at":"2025-08-08T12:14:02.574Z","repository":{"id":36230281,"uuid":"208341858","full_name":"configcat/ruby-sdk","owner":"configcat","description":"ConfigCat SDK for Ruby. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2025-04-24T13:04:53.000Z","size":398,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-13T00:49:47.967Z","etag":null,"topics":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","remote-config","ruby"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/ruby","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-13T20:31:16.000Z","updated_at":"2025-04-24T13:04:52.000Z","dependencies_parsed_at":"2024-05-22T20:46:41.979Z","dependency_job_id":null,"html_url":"https://github.com/configcat/ruby-sdk","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fruby-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fruby-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fruby-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fruby-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/ruby-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850882,"owners_count":21973672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","remote-config","ruby"],"created_at":"2024-10-26T13:22:55.027Z","updated_at":"2025-05-13T00:50:02.301Z","avatar_url":"https://github.com/configcat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigCat SDK for Ruby\r\nhttps://configcat.com  \r\nConfigCat SDK for Ruby provides easy integration for your application to ConfigCat.\r\n\r\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"http://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\r\n\r\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\r\n\r\n[![Ruby CI](https://github.com/configcat/ruby-sdk/actions/workflows/ruby-ci.yml/badge.svg?branch=master)](https://github.com/configcat/ruby-sdk/actions/workflows/ruby-ci.yml)\r\n[![Coverage Status](https://img.shields.io/codecov/c/github/ConfigCat/ruby-sdk.svg)](https://codecov.io/gh/ConfigCat/ruby-sdk)\r\n[![Gem version](https://badge.fury.io/rb/configcat.svg)](https://rubygems.org/gems/configcat)\r\n![License](https://img.shields.io/github/license/configcat/ruby-sdk.svg)\r\n\r\n## Getting started\r\n### 1. Install the package with `RubyGems`\r\n```bash\r\ngem install configcat\r\n```\r\n\r\n### 2. Import `configcat` to your application\r\n```ruby\r\nrequire 'configcat'\r\n```\r\n\r\n### 3. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\r\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/ruby-sdk/master/media/readme02-3.png  \"SDK-KEY\")\r\n\r\n### 4. Create a *ConfigCat* client instance:\r\n```ruby\r\nconfigcat_client = ConfigCat.get(\"#YOUR-SDK-KEY#\")\r\n```\r\n\u003e We strongly recommend using the *ConfigCat Client* as a Singleton object in your application. The `ConfigCat.get` static factory method constructs singleton client instances for your SDK keys.\r\n\r\n### 5. Get your setting value\r\n```ruby\r\nisMyAwesomeFeatureEnabled = configcat_client.get_value(\"isMyAwesomeFeatureEnabled\", false)\r\nif isMyAwesomeFeatureEnabled\r\n    do_the_new_thing\r\nelse\r\n    do_the_old_thing\r\nend\r\n```\r\n\r\n### 6. Stop *ConfigCat* client on application exit\r\n```ruby\r\nconfigcat_client.close\r\n```\r\n\r\n## Getting user specific setting values with Targeting\r\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `get_value()` function.\r\n\r\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\r\n```ruby\r\nuser = ConfigCat::User.new(\"#USER-IDENTIFIER#\")\r\n\r\nisMyAwesomeFeatureEnabled = configcat_client.get_value(\"isMyAwesomeFeatureEnabled\", false, user)\r\nif isMyAwesomeFeatureEnabled\r\n    do_the_new_thing\r\nelse\r\n    do_the_old_thing\r\nend\r\n```\r\n\r\n## Sample/Demo apps\r\n* [Sample Console Apps](https://github.com/configcat/ruby-sdk/tree/master/samples)\r\n\r\n## Polling Modes\r\nThe ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at [ConfigCat Docs](https://configcat.com/docs/sdk-reference/ruby/).\r\n\r\n## Need help?\r\nhttps://configcat.com/support\r\n\r\n## Contributing\r\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\r\n\r\n## About ConfigCat\r\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\r\n- [Documentation](https://configcat.com/docs)\r\n- [Blog](https://configcat.com/blog)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fruby-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fruby-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fruby-sdk/lists"}