{"action":"created","comment":{"url":"https://api.github.com/repos/sethvargo/chef-api/pulls/comments/25285861","id":25285861,"diff_hunk":"@@ -927,7 +927,7 @@ def to_hash\n     #\n     # @return [String]\n     #\n-    def to_json\n+    def to_json(state = nil)","path":"lib/chef-api/resources/base.rb","position":null,"original_position":5,"commit_id":"5b779a57fbcfb60b5e2491aee71fe9db2ac8ad77","original_commit_id":"57d84ffca4d5a13270fad9cba402589c20c0b36d","user":{"login":"ares","id":109773,"avatar_url":"https://avatars.githubusercontent.com/u/109773?v=3","gravatar_id":"","url":"https://api.github.com/users/ares","html_url":"https://github.com/ares","followers_url":"https://api.github.com/users/ares/followers","following_url":"https://api.github.com/users/ares/following{/other_user}","gists_url":"https://api.github.com/users/ares/gists{/gist_id}","starred_url":"https://api.github.com/users/ares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ares/subscriptions","organizations_url":"https://api.github.com/users/ares/orgs","repos_url":"https://api.github.com/users/ares/repos","events_url":"https://api.github.com/users/ares/events{/privacy}","received_events_url":"https://api.github.com/users/ares/received_events","type":"User","site_admin":false},"body":"I think it expects one optional parameter, * allows more of them. Anyway, I changed it to what you suggested.","created_at":"2015-02-24T19:52:05Z","updated_at":"2015-02-24T19:52:05Z","html_url":"https://github.com/sethvargo/chef-api/pull/34#discussion_r25285861","pull_request_url":"https://api.github.com/repos/sethvargo/chef-api/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/comments/25285861"},"html":{"href":"https://github.com/sethvargo/chef-api/pull/34#discussion_r25285861"},"pull_request":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/sethvargo/chef-api/pulls/34","id":29842774,"html_url":"https://github.com/sethvargo/chef-api/pull/34","diff_url":"https://github.com/sethvargo/chef-api/pull/34.diff","patch_url":"https://github.com/sethvargo/chef-api/pull/34.patch","issue_url":"https://api.github.com/repos/sethvargo/chef-api/issues/34","number":34,"state":"open","locked":false,"title":"Fixes to_json method contract","user":{"login":"ares","id":109773,"avatar_url":"https://avatars.githubusercontent.com/u/109773?v=3","gravatar_id":"","url":"https://api.github.com/users/ares","html_url":"https://github.com/ares","followers_url":"https://api.github.com/users/ares/followers","following_url":"https://api.github.com/users/ares/following{/other_user}","gists_url":"https://api.github.com/users/ares/gists{/gist_id}","starred_url":"https://api.github.com/users/ares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ares/subscriptions","organizations_url":"https://api.github.com/users/ares/orgs","repos_url":"https://api.github.com/users/ares/repos","events_url":"https://api.github.com/users/ares/events{/privacy}","received_events_url":"https://api.github.com/users/ares/received_events","type":"User","site_admin":false},"body":"Method `to_json` should optionally accept the state. Otherwise when you do something like `[<#resource1...>, <#resource2>].to_json` you receive \r\n\r\n```\r\nArgumentError - wrong number of arguments (1 for 0):\r\n        /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/chef-api-0.5.0/lib/chef-api/resources/base.rb:930:in `to_json'\r\n```","created_at":"2015-02-23T20:34:04Z","updated_at":"2015-02-24T19:52:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d1e0c9f3150e076aaabb6582bee1e599266c04e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sethvargo/chef-api/pulls/34/commits","review_comments_url":"https://api.github.com/repos/sethvargo/chef-api/pulls/34/comments","review_comment_url":"https://api.github.com/repos/sethvargo/chef-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sethvargo/chef-api/issues/34/comments","statuses_url":"https://api.github.com/repos/sethvargo/chef-api/statuses/5b779a57fbcfb60b5e2491aee71fe9db2ac8ad77","head":{"label":"ares:master","ref":"master","sha":"5b779a57fbcfb60b5e2491aee71fe9db2ac8ad77","user":{"login":"ares","id":109773,"avatar_url":"https://avatars.githubusercontent.com/u/109773?v=3","gravatar_id":"","url":"https://api.github.com/users/ares","html_url":"https://github.com/ares","followers_url":"https://api.github.com/users/ares/followers","following_url":"https://api.github.com/users/ares/following{/other_user}","gists_url":"https://api.github.com/users/ares/gists{/gist_id}","starred_url":"https://api.github.com/users/ares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ares/subscriptions","organizations_url":"https://api.github.com/users/ares/orgs","repos_url":"https://api.github.com/users/ares/repos","events_url":"https://api.github.com/users/ares/events{/privacy}","received_events_url":"https://api.github.com/users/ares/received_events","type":"User","site_admin":false},"repo":{"id":31227755,"name":"chef-api","full_name":"ares/chef-api","owner":{"login":"ares","id":109773,"avatar_url":"https://avatars.githubusercontent.com/u/109773?v=3","gravatar_id":"","url":"https://api.github.com/users/ares","html_url":"https://github.com/ares","followers_url":"https://api.github.com/users/ares/followers","following_url":"https://api.github.com/users/ares/following{/other_user}","gists_url":"https://api.github.com/users/ares/gists{/gist_id}","starred_url":"https://api.github.com/users/ares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ares/subscriptions","organizations_url":"https://api.github.com/users/ares/orgs","repos_url":"https://api.github.com/users/ares/repos","events_url":"https://api.github.com/users/ares/events{/privacy}","received_events_url":"https://api.github.com/users/ares/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ares/chef-api","description":"A tiny Chef API client with minimal dependencies","fork":true,"url":"https://api.github.com/repos/ares/chef-api","forks_url":"https://api.github.com/repos/ares/chef-api/forks","keys_url":"https://api.github.com/repos/ares/chef-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ares/chef-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ares/chef-api/teams","hooks_url":"https://api.github.com/repos/ares/chef-api/hooks","issue_events_url":"https://api.github.com/repos/ares/chef-api/issues/events{/number}","events_url":"https://api.github.com/repos/ares/chef-api/events","assignees_url":"https://api.github.com/repos/ares/chef-api/assignees{/user}","branches_url":"https://api.github.com/repos/ares/chef-api/branches{/branch}","tags_url":"https://api.github.com/repos/ares/chef-api/tags","blobs_url":"https://api.github.com/repos/ares/chef-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ares/chef-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ares/chef-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ares/chef-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ares/chef-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ares/chef-api/languages","stargazers_url":"https://api.github.com/repos/ares/chef-api/stargazers","contributors_url":"https://api.github.com/repos/ares/chef-api/contributors","subscribers_url":"https://api.github.com/repos/ares/chef-api/subscribers","subscription_url":"https://api.github.com/repos/ares/chef-api/subscription","commits_url":"https://api.github.com/repos/ares/chef-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ares/chef-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ares/chef-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ares/chef-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ares/chef-api/contents/{+path}","compare_url":"https://api.github.com/repos/ares/chef-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ares/chef-api/merges","archive_url":"https://api.github.com/repos/ares/chef-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ares/chef-api/downloads","issues_url":"https://api.github.com/repos/ares/chef-api/issues{/number}","pulls_url":"https://api.github.com/repos/ares/chef-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ares/chef-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ares/chef-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ares/chef-api/labels{/name}","releases_url":"https://api.github.com/repos/ares/chef-api/releases{/id}","created_at":"2015-02-23T20:22:43Z","updated_at":"2015-02-24T19:50:37Z","pushed_at":"2015-02-24T19:50:37Z","git_url":"git://github.com/ares/chef-api.git","ssh_url":"git@github.com:ares/chef-api.git","clone_url":"https://github.com/ares/chef-api.git","svn_url":"https://github.com/ares/chef-api","homepage":"http://sethvargo.github.io/chef-api/","size":273,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sethvargo:master","ref":"master","sha":"c8e4d4f71f3b8400a315e2bcad2c77ca4b0a5cec","user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"repo":{"id":14690593,"name":"chef-api","full_name":"sethvargo/chef-api","owner":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sethvargo/chef-api","description":"A tiny Chef API client with minimal dependencies","fork":false,"url":"https://api.github.com/repos/sethvargo/chef-api","forks_url":"https://api.github.com/repos/sethvargo/chef-api/forks","keys_url":"https://api.github.com/repos/sethvargo/chef-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sethvargo/chef-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sethvargo/chef-api/teams","hooks_url":"https://api.github.com/repos/sethvargo/chef-api/hooks","issue_events_url":"https://api.github.com/repos/sethvargo/chef-api/issues/events{/number}","events_url":"https://api.github.com/repos/sethvargo/chef-api/events","assignees_url":"https://api.github.com/repos/sethvargo/chef-api/assignees{/user}","branches_url":"https://api.github.com/repos/sethvargo/chef-api/branches{/branch}","tags_url":"https://api.github.com/repos/sethvargo/chef-api/tags","blobs_url":"https://api.github.com/repos/sethvargo/chef-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sethvargo/chef-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sethvargo/chef-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/sethvargo/chef-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sethvargo/chef-api/statuses/{sha}","languages_url":"https://api.github.com/repos/sethvargo/chef-api/languages","stargazers_url":"https://api.github.com/repos/sethvargo/chef-api/stargazers","contributors_url":"https://api.github.com/repos/sethvargo/chef-api/contributors","subscribers_url":"https://api.github.com/repos/sethvargo/chef-api/subscribers","subscription_url":"https://api.github.com/repos/sethvargo/chef-api/subscription","commits_url":"https://api.github.com/repos/sethvargo/chef-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/sethvargo/chef-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/sethvargo/chef-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/sethvargo/chef-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/sethvargo/chef-api/contents/{+path}","compare_url":"https://api.github.com/repos/sethvargo/chef-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sethvargo/chef-api/merges","archive_url":"https://api.github.com/repos/sethvargo/chef-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sethvargo/chef-api/downloads","issues_url":"https://api.github.com/repos/sethvargo/chef-api/issues{/number}","pulls_url":"https://api.github.com/repos/sethvargo/chef-api/pulls{/number}","milestones_url":"https://api.github.com/repos/sethvargo/chef-api/milestones{/number}","notifications_url":"https://api.github.com/repos/sethvargo/chef-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sethvargo/chef-api/labels{/name}","releases_url":"https://api.github.com/repos/sethvargo/chef-api/releases{/id}","created_at":"2013-11-25T16:14:00Z","updated_at":"2015-02-23T21:50:02Z","pushed_at":"2015-01-08T22:37:44Z","git_url":"git://github.com/sethvargo/chef-api.git","ssh_url":"git@github.com:sethvargo/chef-api.git","clone_url":"https://github.com/sethvargo/chef-api.git","svn_url":"https://github.com/sethvargo/chef-api","homepage":"http://sethvargo.github.io/chef-api/","size":644,"stargazers_count":56,"watchers_count":56,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":7,"forks":14,"open_issues":7,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/34"},"html":{"href":"https://github.com/sethvargo/chef-api/pull/34"},"issue":{"href":"https://api.github.com/repos/sethvargo/chef-api/issues/34"},"comments":{"href":"https://api.github.com/repos/sethvargo/chef-api/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sethvargo/chef-api/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/sethvargo/chef-api/statuses/5b779a57fbcfb60b5e2491aee71fe9db2ac8ad77"}}}}