{"id":16549689,"url":"https://github.com/uiur/rspec-request-printer","last_synced_at":"2026-05-11T00:32:47.666Z","repository":{"id":141425152,"uuid":"331271549","full_name":"uiur/rspec-request-printer","owner":"uiur","description":"prints json api response as pretty format in request spec","archived":false,"fork":false,"pushed_at":"2021-04-28T12:21:25.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T17:16:12.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/uiur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2021-01-20T10:29:48.000Z","updated_at":"2021-04-28T12:21:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0e08afd-7fcd-405f-86ae-b30296a28ebc","html_url":"https://github.com/uiur/rspec-request-printer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiur%2Frspec-request-printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiur%2Frspec-request-printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiur%2Frspec-request-printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiur%2Frspec-request-printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uiur","download_url":"https://codeload.github.com/uiur/rspec-request-printer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241859404,"owners_count":20032314,"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":[],"created_at":"2024-10-11T19:30:25.259Z","updated_at":"2026-05-11T00:32:47.611Z","avatar_url":"https://github.com/uiur.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rspec-request-printer\n\n`rspec-request-printer` prints response of JSON API as pretty format when running request specs.\n\nIt prints a summary of a request like this format:\n\n```ruby\n$ RSPEC_REQUEST_PRINTER=1 bundle exec rspec spec/requests/menus_spec.rb\n...\nGET http://example.com/menus/72e1c777-547e-450d-ad83-0bf70e5786ca\n{}\n\n{\n  \"id\": \"72e1c777-547e-450d-ad83-0bf70e5786ca\",\n  \"name\": \"foobar\",\n  \"status\": \"published\",\n  \"created_at\": \"2021-04-05T18:30:49+09:00\"\n}\n```\n\nIt's helpful for cases like:\n\n- Check the response body with your eyes when you write JSON API\n- Copy it as an example of API response and paste it in a pull request to explain to others\n\n## Usage\n\nRun rspec with `RSPEC_REQUEST_PRINTER=1`.\n\n```ruby\n$ RSPEC_REQUEST_PRINTER=1 bundle exec rspec spec/requests/menus_spec.rb\nGET http://example.com/menus/72e1c777-547e-450d-ad83-0bf70e5786ca\n{}\n\n{\n  \"id\": \"72e1c777-547e-450d-ad83-0bf70e5786ca\",\n  \"name\": \"foobar\",\n  \"status\": \"published\",\n  \"created_at\": \"2021-04-05T18:30:49+09:00\"\n}\n```\n\nWith `dotenv`, you can set `RSPEC_REQUEST_PRINTER=1` in `.env.test` file.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rspec-request-printer', github: 'uiur/rspec-request-printer'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install rspec-request-printer\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiur%2Frspec-request-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuiur%2Frspec-request-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiur%2Frspec-request-printer/lists"}