{"id":44556911,"url":"https://github.com/codedbychavez/ab-testing-in-ruby","last_synced_at":"2026-02-13T21:48:19.113Z","repository":{"id":217380069,"uuid":"740117110","full_name":"codedbychavez/ab-testing-in-ruby","owner":"codedbychavez","description":"How to Implement A/B Testing in Ruby with ConfigCat Feature Flags and Amplitude Data Analytics Platform","archived":false,"fork":false,"pushed_at":"2024-01-15T20:50:46.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-16T03:19:56.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/codedbychavez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-07T15:23:34.000Z","updated_at":"2024-01-16T03:20:00.267Z","dependencies_parsed_at":"2024-01-16T03:31:31.894Z","dependency_job_id":null,"html_url":"https://github.com/codedbychavez/ab-testing-in-ruby","commit_stats":null,"previous_names":["codedbychavez/ab-testing-in-ruby"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/codedbychavez/ab-testing-in-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fab-testing-in-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fab-testing-in-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fab-testing-in-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fab-testing-in-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedbychavez","download_url":"https://codeload.github.com/codedbychavez/ab-testing-in-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedbychavez%2Fab-testing-in-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29419422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-13T21:48:18.396Z","updated_at":"2026-02-13T21:48:19.106Z","avatar_url":"https://github.com/codedbychavez.png","language":"CSS","readme":"# How to implement an A/B test in Ruby using Feature Flags\n\n## [Read the blog post here](https://configcat.com/blog/)\n\nThis repository contains the accompanying sample code for the blog article titled 'How to Implement an A/B Test in Ruby Using Feature Flags.' The application relies on the Sinatra gem to serve the landing page through the browser. To conduct the A/B test experiment, I've integrated [ConfigCat feature flags](https://configcat.com) for switching between and deploying each version to different user groups. Additionally, I've incorporated the Amplitude data analytics platform to analyze the impact of each version, to select the best one for deployment.\n\n## Getting started\n\n### Prerequisites\n\n- Latest version of [Ruby](https://www.ruby-lang.org/en/downloads/) installed on your machine.\n- A text editor of your choice. I'll be using [VSCode](https://code.visualstudio.com/download) for this demo.\n- Basic knowledge of [Ruby](https://www.ruby-lang.org/en/) and [Sinatra](https://sinatrarb.com/)\n\n### Build\n\n1. Clone this repository\n2. Create a `.env` file in the root of the repo with the following content. Then replace the placeholder values with your own:\n\n```sh\nAMPLITUDE_API_KEY=\"YOUR-AMPLITUDE-API-KEY-GOES-HERE\"\nCONFIGCAT_SDK_KEY=\"YOUR-CONFIGCAT-SDK-KEY-GOES-HERE\"\n```\n\n3. Install the Gemfile dependencies:\n\n```sh\nbundle install\n```\n\n### Run\n\nExecute the following command to launch the app in your browser:\n\n```sh\nruby app.rb\n```\n\nThe app should now be visible at: \u003chttp://localhost:4567\u003e\n\n## Learn more\n\nUseful links to technical resources.\n\n- [Ruby Documentation](https://www.ruby-lang.org/en/) - learn more about Ruby\n- [Learn Sinatra](https://sinatrarb.com/intro.html) - Get started with Sinatra\n\n[**ConfigCat**](https://configcat.com) also supports many other frameworks and languages. Check out the full list of supported SDKs [here](https://configcat.com/docs/sdk-reference/overview/).\n\nYou can also explore other code samples for various languages, frameworks, and topics here in the [ConfigCat labs](https://github.com/configcat-labs) on GitHub.\n\nKeep up with ConfigCat on [Twitter](https://twitter.com/configcat), [Facebook](https://www.facebook.com/configcat), [LinkedIn](https://www.linkedin.com/company/configcat/), and [GitHub](https://github.com/configcat).\n\n## Author\n[Chavez Harris](https://github.com/codedbychavez)\n\n## Contributions\nContributions are welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fab-testing-in-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedbychavez%2Fab-testing-in-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedbychavez%2Fab-testing-in-ruby/lists"}