{"id":16655994,"url":"https://github.com/mcrumm/req_sandbox","last_synced_at":"2025-03-16T23:31:29.984Z","repository":{"id":62083783,"uuid":"555626287","full_name":"mcrumm/req_sandbox","owner":"mcrumm","description":"Req plugin for Phoenix Ecto SQL Sandbox","archived":false,"fork":false,"pushed_at":"2024-09-13T19:17:46.000Z","size":59,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T15:06:57.550Z","etag":null,"topics":["ecto","elixir","integration-testing","phoenix","postgresql"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/req_sandbox","language":"Elixir","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/mcrumm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["mcrumm"]}},"created_at":"2022-10-22T00:45:11.000Z","updated_at":"2024-09-13T19:17:49.000Z","dependencies_parsed_at":"2024-09-14T09:24:40.055Z","dependency_job_id":null,"html_url":"https://github.com/mcrumm/req_sandbox","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"d509516ae85793feaa716a625e200535def87582"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrumm%2Freq_sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrumm%2Freq_sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrumm%2Freq_sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcrumm%2Freq_sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcrumm","download_url":"https://codeload.github.com/mcrumm/req_sandbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243832400,"owners_count":20355101,"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":["ecto","elixir","integration-testing","phoenix","postgresql"],"created_at":"2024-10-12T09:55:55.856Z","updated_at":"2025-03-16T23:31:29.520Z","avatar_url":"https://github.com/mcrumm.png","language":"Elixir","funding_links":["https://github.com/sponsors/mcrumm"],"categories":[],"sub_categories":[],"readme":"# ReqSandbox\n\n![Photo of a toy truck in a sandbox](https://user-images.githubusercontent.com/168677/197939037-750429a1-de19-461b-aa95-1284fe54950e.jpg)\nPhoto by \u003ca href=\"https://unsplash.com/@takeshi_morisato?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText\"\u003eTakeshi Morisato\u003c/a\u003e on \u003ca href=\"https://unsplash.com/?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText\"\u003eUnsplash\u003c/a\u003e\n\n\u003c!-- MDOC --\u003e\n\n[![CI](https://github.com/mcrumm/req_sandbox/actions/workflows/ci.yml/badge.svg)](https://github.com/mcrumm/req_sandbox/actions/workflows/ci.yml)\n[![Docs](https://img.shields.io/badge/hex.pm-docs-8e7ce6.svg)](https://hexdocs.pm/req_sandbox)\n[![Hex pm](http://img.shields.io/hexpm/v/req_sandbox.svg?style=flat\u0026color=blue)](https://hex.pm/packages/req_sandbox)\n\n[Req][req] plugin for [Phoenix.Ecto.SQL.Sandbox][plug-sandbox].\n\nReqSandbox simplifies making concurrent, transactional requests to a\nPhoenix server. Just before making a request, the sandbox metadata is\napplied via the specified request header. If there is no metadata\navailable, then ReqSandbox creates a new sandbox session and saves\nthe metadata for future requests. This is mostly useful in client\ntest environments to ensure logical isolation between concurrent\ntests.\n\n## Usage\n\nThe [Ecto SQL Sandbox Usage Guide](guides/usage.livemd) contains a full demonstration of the sandbox features.\n\n```elixir\nMix.install([\n  {:req, \"~\u003e 0.4.0\"},\n  {:req_sandbox, \"~\u003e 0.2.0\"}\n])\n\nreq = Req.new(base_url: \"http://localhost:4000\" |\u003e ReqSandbox.attach()\n\nReq.post!(req, url: \"/api/posts\", json: %{\"post\" =\u003e %{\"msg\" =\u003e \"Hello, world!\"}}).body\n#=\u003e %{\"data\" =\u003e %{\"id\" =\u003e 2, \"msg\" =\u003e \"Hello, world!\"}}\n\nReqSandbox.delete!(req)\n#=\u003e \"BeamMetadata (g2gCZAACdjF0AAAAA2QABW93bmVyWGQAInZ2ZXMzM2o1LWxpdmVib29...)\"\n```\n\n[req]: https://github.com/wojtekmach/req\n[plug-sandbox]: https://github.com/phoenixframework/phoenix_ecto\n\n## License\n\nMIT License. Copyright (c) 2022 Michael A. Crumm Jr.\n\n\u003c!-- MDOC --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrumm%2Freq_sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcrumm%2Freq_sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrumm%2Freq_sandbox/lists"}