{"id":20779613,"url":"https://github.com/smartlogic/http_spec","last_synced_at":"2025-05-16T14:05:06.041Z","repository":{"id":3495529,"uuid":"4551945","full_name":"smartlogic/http_spec","owner":"smartlogic","description":"RSpec DSL for describing HTTP API interactions","archived":false,"fork":false,"pushed_at":"2025-02-26T23:32:53.000Z","size":105,"stargazers_count":119,"open_issues_count":2,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-15T19:11:54.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/smartlogic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-06-04T20:17:29.000Z","updated_at":"2025-02-26T23:32:56.000Z","dependencies_parsed_at":"2025-03-31T16:11:57.048Z","dependency_job_id":"cbd527a5-4f51-46e5-9cf1-125b765d7219","html_url":"https://github.com/smartlogic/http_spec","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlogic%2Fhttp_spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlogic%2Fhttp_spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlogic%2Fhttp_spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlogic%2Fhttp_spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartlogic","download_url":"https://codeload.github.com/smartlogic/http_spec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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-11-17T13:28:57.279Z","updated_at":"2025-05-16T14:05:06.024Z","avatar_url":"https://github.com/smartlogic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/smartlogic/http_spec.png?branch=master)](https://travis-ci.org/smartlogic/http_spec)\n[![Dependency Status](https://gemnasium.com/smartlogic/http_spec.png)](https://gemnasium.com/smartlogic/http_spec)\n[![Code Climate](https://codeclimate.com/github/smartlogic/http_spec.png)](https://codeclimate.com/github/smartlogic/http_spec)\n[![Coverage Status](https://coveralls.io/repos/smartlogic/http_spec/badge.png?branch=master)](https://coveralls.io/r/smartlogic/http_spec)\n\n# HTTPSpec\n\nRSpec DSLs for describing API behaviors\n\n## Features\n\n* Supports Rack, Webmachine, and live applications (via Faraday) using pluggable client back-ends.\n* Generate documentation from requests with Raddocs.\n* Validate requests and responses against a schema with Fdoc.\n* Record and play back responses to speed-up tests against live applications. (like VCR)\n\n## Example Usage\n\n```ruby\nrequire \"http_spec/dsl/resource\"\nrequire \"http_spec/clients/rack\"\n\napp = lambda { |env| [200, { \"Foo\" =\u003e \"Bar\" }, [\"Hello, World!\"]] }\nHTTPSpec.client = HTTPSpec::Clients::Rack.new(app)\n\ndescribe \"My Awesome App\" do\n  include HTTPSpec::DSL::Resource\n\n  get \"/foobar\" do\n    it \"should be successful\" do\n      do_request\n      status.should eq(200)\n    end\n\n    it \"should tell us about foo\" do\n      do_request\n      response_headers[\"Foo\"].should eq(\"Bar\")\n    end\n\n    it \"should greet us\" do\n      do_request\n      response_body.should eq(\"Hello, World!\")\n    end\n  end\nend\n```\n\nWant something more light-weight?\n\n```ruby\nrequire \"http_spec/dsl/methods\"\nrequire \"http_spec/clients/rack\"\n\napp = lambda { |env| [200, { \"Foo\" =\u003e \"Bar\" }, [\"Hello, World!\"]] }\nHTTPSpec.client = HTTPSpec::Clients::Rack.new(app)\n\ndescribe \"My Awesome App\" do\n  include HTTPSpec::DSL::Methods\n\n  it \"should be successful\" do\n    get(\"/foo\").status.should eq(200)\n  end\n\n  it \"should tell us about foo\" do\n    get(\"/bar\").headers[\"Foo\"].should eq(\"Bar\")\n  end\n\n  it \"should greet us\" do\n    get(\"/baz\").body.should eq(\"Hello, World!\")\n  end\nend\n```\n\n## Changes\n\n### 1.0.0\n\n* Support for ruby 3.X - fixes for stdlib API changes\n\n### 0.4.0\n\n* Support latest versions of RSpec, Raddocs, Webmachine\n\n### 0.3.0\n\n* Expose `last_response` when using the methods dsl\n* Allow rack client to control the cgi environment\n* [Bug] Fix issue where group-level headers where being mutated by examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlogic%2Fhttp_spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartlogic%2Fhttp_spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlogic%2Fhttp_spec/lists"}