{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/comments/85593490","pull_request_review_id":6303076,"id":85593490,"diff_hunk":"@@ -130,6 +113,49 @@\n     expect(invalid_response).not_to match_response_schema(\"collection\")\n   end\n \n+  context \"when options are passed directly to the matcher\" do\n+    it \"forwards options to the validator\" do\n+      create_schema(\"foo_schema\", {\n+        \"type\" => \"object\",\n+        \"properties\" => {\n+          \"id\" => { \"type\" => \"number\" },\n+          \"title\" => { \"type\" => \"string\" },\n+        },\n+      })\n+\n+      expect(response_for({ \"id\" => 1, \"title\" => \"bar\" })).\n+        to match_response_schema(\"foo_schema\", strict: true)\n+      expect(response_for({ \"id\" => 1 })).\n+        not_to match_response_schema(\"foo_schema\", strict: true)\n+    end\n+  end\n+\n+  context \"when options are configured globally\" do\n+    it \"forwards them to the validator\" do\n+      JsonMatchers.configure do |config|\n+        config.options[:strict] = true\n+      end\n+      create_schema(\"foo_schema\", {\n+        \"type\" => \"object\",\n+        \"properties\" => {\n+          \"id\" => { \"type\" => \"number\" },\n+          \"title\" => { \"type\" => \"string\" },\n+        },\n+      })\n+\n+      expect(response_for({ \"id\" => 1, \"title\" => \"bar\" })).","path":"spec/json_matchers/match_response_schema_spec.rb","position":38,"original_position":58,"commit_id":"36e2028cc687979fad433c1cb9f7b09bd22f0fd6","original_commit_id":"36e2028cc687979fad433c1cb9f7b09bd22f0fd6","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Redundant curly braces around a hash parameter.","created_at":"2016-10-28T19:14:48Z","updated_at":"2016-10-28T19:14:48Z","html_url":"https://github.com/thoughtbot/json_matchers/pull/46#discussion_r85593490","pull_request_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/comments/85593490"},"html":{"href":"https://github.com/thoughtbot/json_matchers/pull/46#discussion_r85593490"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46","id":91430315,"html_url":"https://github.com/thoughtbot/json_matchers/pull/46","diff_url":"https://github.com/thoughtbot/json_matchers/pull/46.diff","patch_url":"https://github.com/thoughtbot/json_matchers/pull/46.patch","issue_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/46","number":46,"state":"open","locked":false,"title":"Support configuring matcher default options","user":{"login":"seanpdoyle","id":2575027,"avatar_url":"https://avatars.githubusercontent.com/u/2575027?v=3","gravatar_id":"","url":"https://api.github.com/users/seanpdoyle","html_url":"https://github.com/seanpdoyle","followers_url":"https://api.github.com/users/seanpdoyle/followers","following_url":"https://api.github.com/users/seanpdoyle/following{/other_user}","gists_url":"https://api.github.com/users/seanpdoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/seanpdoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanpdoyle/subscriptions","organizations_url":"https://api.github.com/users/seanpdoyle/orgs","repos_url":"https://api.github.com/users/seanpdoyle/repos","events_url":"https://api.github.com/users/seanpdoyle/events{/privacy}","received_events_url":"https://api.github.com/users/seanpdoyle/received_events","type":"User","site_admin":false},"body":"Closes [#40].\n\nTo configure the default options passed to *all* matchers, call\n`JsonMatchers.configure`:\n\n```rb\n\nJsonMatchers.configure do |config|\n  config.options[:strict] = true\nend\n```\n\nA list of available options can be found [here][options].\n\n[#40]: https://github.com/thoughtbot/json_matchers/issues/40\n[options]: https://github.com/ruby-json-schema/json-schema/blob/2.2.4/lib/json-schema/validator.rb#L160-L162","created_at":"2016-10-28T18:37:33Z","updated_at":"2016-10-28T19:14:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe609f7b4b947b9274a2327ab38a8ac1a9ac4944","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/46/comments","statuses_url":"https://api.github.com/repos/thoughtbot/json_matchers/statuses/36e2028cc687979fad433c1cb9f7b09bd22f0fd6","head":{"label":"thoughtbot:configure","ref":"configure","sha":"36e2028cc687979fad433c1cb9f7b09bd22f0fd6","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":25044521,"name":"json_matchers","full_name":"thoughtbot/json_matchers","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/json_matchers","description":"Validate your JSON APIs","fork":false,"url":"https://api.github.com/repos/thoughtbot/json_matchers","forks_url":"https://api.github.com/repos/thoughtbot/json_matchers/forks","keys_url":"https://api.github.com/repos/thoughtbot/json_matchers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/json_matchers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/json_matchers/teams","hooks_url":"https://api.github.com/repos/thoughtbot/json_matchers/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/json_matchers/events","assignees_url":"https://api.github.com/repos/thoughtbot/json_matchers/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/json_matchers/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/json_matchers/tags","blobs_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/json_matchers/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/json_matchers/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/json_matchers/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/json_matchers/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/json_matchers/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/json_matchers/subscription","commits_url":"https://api.github.com/repos/thoughtbot/json_matchers/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/json_matchers/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/json_matchers/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/json_matchers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/json_matchers/merges","archive_url":"https://api.github.com/repos/thoughtbot/json_matchers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/json_matchers/downloads","issues_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/json_matchers/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/json_matchers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/json_matchers/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/json_matchers/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/json_matchers/deployments","created_at":"2014-10-10T16:51:29Z","updated_at":"2016-10-28T08:33:29Z","pushed_at":"2016-10-28T19:14:41Z","git_url":"git://github.com/thoughtbot/json_matchers.git","ssh_url":"git@github.com:thoughtbot/json_matchers.git","clone_url":"https://github.com/thoughtbot/json_matchers.git","svn_url":"https://github.com/thoughtbot/json_matchers","homepage":"","size":90,"stargazers_count":109,"watchers_count":109,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":9,"forks":16,"open_issues":9,"watchers":109,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"14a474e4597e21fffdde0e97cb553a4d208c5110","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":25044521,"name":"json_matchers","full_name":"thoughtbot/json_matchers","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/json_matchers","description":"Validate your JSON APIs","fork":false,"url":"https://api.github.com/repos/thoughtbot/json_matchers","forks_url":"https://api.github.com/repos/thoughtbot/json_matchers/forks","keys_url":"https://api.github.com/repos/thoughtbot/json_matchers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/json_matchers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/json_matchers/teams","hooks_url":"https://api.github.com/repos/thoughtbot/json_matchers/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/json_matchers/events","assignees_url":"https://api.github.com/repos/thoughtbot/json_matchers/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/json_matchers/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/json_matchers/tags","blobs_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/json_matchers/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/json_matchers/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/json_matchers/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/json_matchers/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/json_matchers/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/json_matchers/subscription","commits_url":"https://api.github.com/repos/thoughtbot/json_matchers/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/json_matchers/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/json_matchers/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/json_matchers/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/json_matchers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/json_matchers/merges","archive_url":"https://api.github.com/repos/thoughtbot/json_matchers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/json_matchers/downloads","issues_url":"https://api.github.com/repos/thoughtbot/json_matchers/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/json_matchers/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/json_matchers/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/json_matchers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/json_matchers/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/json_matchers/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/json_matchers/deployments","created_at":"2014-10-10T16:51:29Z","updated_at":"2016-10-28T08:33:29Z","pushed_at":"2016-10-28T19:14:41Z","git_url":"git://github.com/thoughtbot/json_matchers.git","ssh_url":"git@github.com:thoughtbot/json_matchers.git","clone_url":"https://github.com/thoughtbot/json_matchers.git","svn_url":"https://github.com/thoughtbot/json_matchers","homepage":"","size":90,"stargazers_count":109,"watchers_count":109,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":9,"forks":16,"open_issues":9,"watchers":109,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46"},"html":{"href":"https://github.com/thoughtbot/json_matchers/pull/46"},"issue":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/issues/46"},"comments":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/json_matchers/statuses/36e2028cc687979fad433c1cb9f7b09bd22f0fd6"}}}}
{"actor":{"display_login":"houndci-bot"}}