{"action":"created","comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/45766891","id":45766891,"diff_hunk":"@@ -14,6 +14,7 @@ Breaking changes:\n \n Features:\n \n+- [#1336](https://github.com/rails-api/active_model_serializers/pull/1336) Added support for Grape 0.13.x","path":"CHANGELOG.md","position":4,"original_position":4,"commit_id":"d1d55f02dc25fa99e8bd65d85ea17f339dbec3d3","original_commit_id":"d1d55f02dc25fa99e8bd65d85ea17f339dbec3d3","user":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"body":"should be `>= 0.13, < 1.0`","created_at":"2015-11-24T17:26:47Z","updated_at":"2015-11-24T17:26:47Z","html_url":"https://github.com/rails-api/active_model_serializers/pull/1336#discussion_r45766891","pull_request_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336","_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/45766891"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/1336#discussion_r45766891"},"pull_request":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336"}}},"pull_request":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336","id":51223664,"html_url":"https://github.com/rails-api/active_model_serializers/pull/1336","diff_url":"https://github.com/rails-api/active_model_serializers/pull/1336.diff","patch_url":"https://github.com/rails-api/active_model_serializers/pull/1336.patch","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1336","number":1336,"state":"open","locked":false,"title":"Grape formatter feature requested in #1268 - Rebased and Repushed (#1273)","user":{"login":"johnhamelink","id":101739,"avatar_url":"https://avatars.githubusercontent.com/u/101739?v=3","gravatar_id":"","url":"https://api.github.com/users/johnhamelink","html_url":"https://github.com/johnhamelink","followers_url":"https://api.github.com/users/johnhamelink/followers","following_url":"https://api.github.com/users/johnhamelink/following{/other_user}","gists_url":"https://api.github.com/users/johnhamelink/gists{/gist_id}","starred_url":"https://api.github.com/users/johnhamelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnhamelink/subscriptions","organizations_url":"https://api.github.com/users/johnhamelink/orgs","repos_url":"https://api.github.com/users/johnhamelink/repos","events_url":"https://api.github.com/users/johnhamelink/events{/privacy}","received_events_url":"https://api.github.com/users/johnhamelink/received_events","type":"User","site_admin":false},"body":"I've rebased, squashed and repushed #1273 so we can get this merged!\r\n\r\n - adds handling for when the returned resource is not serializable via ams\r\n - fix for when resource is an Array\r\n - Moves grape include to grape namespace. Changes Enumerable to Array because a plain hash is enumerable.\r\n - Add integration test\r\n - Refine scope of Grape version dependency\r\n - Assert that the response is equal to a manually defined JSON string\r\n - Add single module to include in Grape projects\r\n - Create a Serializable Resource to test rails-api from Grape\r\n - Update docs\r\n - Fix discrepency between ActiveRecord 4.0 - 4.1 and 4.2\r\n\r\n**Edit:** Just want to explicitly point out that all credit for code goes to Julian Paas (https://github.com/jpaas)\r\n\r\n## Todos:\r\n\r\n- [x] Add instructions to docs\r\n- [x] Use `self.call` instead of a singleton\r\n- [x] Remove `.gitignore`\r\n- [x] Add Unit tests\r\n- [x] Add single module for including the formatter & helper in their Grape project\r\n- [x] Assert JSON response & not the ability for the JSON parser to parse it (see [here](https://github.com/rails-api/active_model_serializers/pull/1336/files#r45619253))\r\n- [x] Fix tests for Rails < 4.1\r\n- [x] Squash & Rebase","created_at":"2015-11-19T13:45:39Z","updated_at":"2015-11-24T17:26:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23f778c0b3f22ffcb17614ad34d585d142148d89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336/commits","review_comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336/comments","review_comment_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1336/comments","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/d1d55f02dc25fa99e8bd65d85ea17f339dbec3d3","head":{"label":"johnhamelink:master","ref":"master","sha":"d1d55f02dc25fa99e8bd65d85ea17f339dbec3d3","user":{"login":"johnhamelink","id":101739,"avatar_url":"https://avatars.githubusercontent.com/u/101739?v=3","gravatar_id":"","url":"https://api.github.com/users/johnhamelink","html_url":"https://github.com/johnhamelink","followers_url":"https://api.github.com/users/johnhamelink/followers","following_url":"https://api.github.com/users/johnhamelink/following{/other_user}","gists_url":"https://api.github.com/users/johnhamelink/gists{/gist_id}","starred_url":"https://api.github.com/users/johnhamelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnhamelink/subscriptions","organizations_url":"https://api.github.com/users/johnhamelink/orgs","repos_url":"https://api.github.com/users/johnhamelink/repos","events_url":"https://api.github.com/users/johnhamelink/events{/privacy}","received_events_url":"https://api.github.com/users/johnhamelink/received_events","type":"User","site_admin":false},"repo":{"id":46494348,"name":"active_model_serializers","full_name":"johnhamelink/active_model_serializers","owner":{"login":"johnhamelink","id":101739,"avatar_url":"https://avatars.githubusercontent.com/u/101739?v=3","gravatar_id":"","url":"https://api.github.com/users/johnhamelink","html_url":"https://github.com/johnhamelink","followers_url":"https://api.github.com/users/johnhamelink/followers","following_url":"https://api.github.com/users/johnhamelink/following{/other_user}","gists_url":"https://api.github.com/users/johnhamelink/gists{/gist_id}","starred_url":"https://api.github.com/users/johnhamelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnhamelink/subscriptions","organizations_url":"https://api.github.com/users/johnhamelink/orgs","repos_url":"https://api.github.com/users/johnhamelink/repos","events_url":"https://api.github.com/users/johnhamelink/events{/privacy}","received_events_url":"https://api.github.com/users/johnhamelink/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnhamelink/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":true,"url":"https://api.github.com/repos/johnhamelink/active_model_serializers","forks_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/forks","keys_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/events","assignees_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/merges","archive_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/johnhamelink/active_model_serializers/releases{/id}","created_at":"2015-11-19T13:35:53Z","updated_at":"2015-11-19T13:35:54Z","pushed_at":"2015-11-24T01:54:51Z","git_url":"git://github.com/johnhamelink/active_model_serializers.git","ssh_url":"git@github.com:johnhamelink/active_model_serializers.git","clone_url":"https://github.com/johnhamelink/active_model_serializers.git","svn_url":"https://github.com/johnhamelink/active_model_serializers","homepage":"","size":2095,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails-api:master","ref":"master","sha":"aa4384839dba6d1680564cb513301172cc66ba78","user":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"repo":{"id":2889230,"name":"active_model_serializers","full_name":"rails-api/active_model_serializers","owner":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails-api/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":false,"url":"https://api.github.com/repos/rails-api/active_model_serializers","forks_url":"https://api.github.com/repos/rails-api/active_model_serializers/forks","keys_url":"https://api.github.com/repos/rails-api/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails-api/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails-api/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/rails-api/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/events","assignees_url":"https://api.github.com/repos/rails-api/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/rails-api/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/rails-api/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/rails-api/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/rails-api/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/rails-api/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/rails-api/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/rails-api/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails-api/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/rails-api/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails-api/active_model_serializers/merges","archive_url":"https://api.github.com/repos/rails-api/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails-api/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/rails-api/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/rails-api/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/rails-api/active_model_serializers/releases{/id}","created_at":"2011-12-01T06:39:26Z","updated_at":"2015-11-24T17:18:14Z","pushed_at":"2015-11-24T17:25:41Z","git_url":"git://github.com/rails-api/active_model_serializers.git","ssh_url":"git@github.com:rails-api/active_model_serializers.git","clone_url":"https://github.com/rails-api/active_model_serializers.git","svn_url":"https://github.com/rails-api/active_model_serializers","homepage":"","size":3365,"stargazers_count":3146,"watchers_count":3146,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":733,"mirror_url":null,"open_issues_count":192,"forks":733,"open_issues":192,"watchers":3146,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/1336"},"issue":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1336"},"comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1336/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336/comments"},"review_comment":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1336/commits"},"statuses":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/d1d55f02dc25fa99e8bd65d85ea17f339dbec3d3"}}}}