{"id":15667964,"url":"https://github.com/naps62/fun_with_flags_in_memory","last_synced_at":"2025-08-02T12:33:30.985Z","repository":{"id":44664160,"uuid":"196551554","full_name":"naps62/fun_with_flags_in_memory","owner":"naps62","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-01T09:42:22.000Z","size":11,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T13:54:32.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naps62.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-12T09:34:56.000Z","updated_at":"2023-09-06T17:42:02.000Z","dependencies_parsed_at":"2022-09-24T23:44:49.988Z","dependency_job_id":null,"html_url":"https://github.com/naps62/fun_with_flags_in_memory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naps62/fun_with_flags_in_memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Ffun_with_flags_in_memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Ffun_with_flags_in_memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Ffun_with_flags_in_memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Ffun_with_flags_in_memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naps62","download_url":"https://codeload.github.com/naps62/fun_with_flags_in_memory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naps62%2Ffun_with_flags_in_memory/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268388315,"owners_count":24242539,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-10-03T14:06:01.165Z","updated_at":"2025-08-02T12:33:30.932Z","avatar_url":"https://github.com/naps62.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FunWithFlags - InMemory Adapter\n\nAn adapter for [`fun_with_flags`](https://github.com/tompave/fun_with_flags)\nthat uses a GenServer to keep everything in memory.\n\nUseful for unit testing your code without having to mock `FunWithFlags`\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `fun_with_flags_in_memory` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:fun_with_flags_in_memory, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n### Configuration\n\nConfigure `FunWithFlags` to use this adapter while in test mode:\n\n```\n# config/test.exs\n\nconfig :fun_with_flags, :persistence,\n  adapter: FunWithFlags.Store.Persistent.InMemory\n```\n\n### Usage\n\nThe adapter doesn't clean up by itself automatically after each test.\n\nThe current aproach is to manually clean up each flag. For example:\n\n```elixir\ndefmodule Tests do\n  describe \"a disabled feature\" do\n    setup do\n      Flags.enable(:my_feature_flag)\n\n      on_exit fn -\u003e\n        Flags.clear(:my_feature_flag)\n      end\n    end\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaps62%2Ffun_with_flags_in_memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaps62%2Ffun_with_flags_in_memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaps62%2Ffun_with_flags_in_memory/lists"}