{"action":"created","comment":{"url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/comments/45484239","id":45484239,"diff_hunk":"@@ -6,78 +6,70 @@\n \n   context 'when content type is json' do\n     context 'when json follows jsonapi spec' do\n-        context 'POST request' do\n-          let(:env) do\n-            Rack::MockRequest.env_for('', {\n-              'rack.input' => StringIO.new({\n-                data: {\n-                  type: 'users',\n-                  attributes: {\n-                    email: 'example.com',\n-                    password: '12345678'\n-                  }\n-                }\n-              }.to_json),\n-              'CONTENT_TYPE' => 'application/json',\n-              'REQUEST_METHOD' => 'POST'\n-            })\n-          end\n-\n-          it 'changes request body' do\n-            expect(JSON.parse(response_body)).to eq({\n-              'user' => {\n-                'email' => 'example.com',\n-                'password' => '12345678'\n+      context 'POST request' do\n+        let(:env) do\n+          Rack::MockRequest.env_for('', 'rack.input' => StringIO.new({\n+            data: {\n+              type: 'users',\n+              attributes: {\n+                email: 'john.doe@example.com',\n+                password: '12345678'\n               }\n-            })\n-          end\n+            }\n+          }.to_json),\n+            'CONTENT_TYPE' => 'application/json',\n+            'REQUEST_METHOD' => 'POST')\n         end\n \n-        context 'PATCH request' do\n-          let(:env) do\n-            Rack::MockRequest.env_for('', {\n-              'rack.input' => StringIO.new({\n-                data: {\n-                  type: 'users',\n-                  id: 5,\n-                  attributes: {\n-                    email: 'example.com',\n-                    password: '12345678'\n-                  }\n-                }\n-              }.to_json),\n-              'CONTENT_TYPE' => 'application/json',\n-              'REQUEST_METHOD' => 'PATCH'\n-            })\n-          end\n+        it 'changes request body' do\n+          expect(JSON.parse(response_body)).to eq('user' => {","path":"spec/jsonapi_rails4/middleware_spec.rb","position":61,"original_position":61,"commit_id":"e344740b8b1d4b3d427e2862b7ffe3cff9515afc","original_commit_id":"e344740b8b1d4b3d427e2862b7ffe3cff9515afc","user":{"login":"rilian","id":155563,"avatar_url":"https://avatars.githubusercontent.com/u/155563?v=3","gravatar_id":"","url":"https://api.github.com/users/rilian","html_url":"https://github.com/rilian","followers_url":"https://api.github.com/users/rilian/followers","following_url":"https://api.github.com/users/rilian/following{/other_user}","gists_url":"https://api.github.com/users/rilian/gists{/gist_id}","starred_url":"https://api.github.com/users/rilian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilian/subscriptions","organizations_url":"https://api.github.com/users/rilian/orgs","repos_url":"https://api.github.com/users/rilian/repos","events_url":"https://api.github.com/users/rilian/events{/privacy}","received_events_url":"https://api.github.com/users/rilian/received_events","type":"User","site_admin":false},"body":"please avoid such formatting. move content to the left side, properly indented","created_at":"2015-11-20T16:00:30Z","updated_at":"2015-11-20T16:00:30Z","html_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3#discussion_r45484239","pull_request_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/comments/45484239"},"html":{"href":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3#discussion_r45484239"},"pull_request":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3","id":51356699,"html_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3","diff_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3.diff","patch_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3.patch","issue_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/3","number":3,"state":"open","locked":false,"title":"Spec update","user":{"login":"DenisUA","id":10928241,"avatar_url":"https://avatars.githubusercontent.com/u/10928241?v=3","gravatar_id":"","url":"https://api.github.com/users/DenisUA","html_url":"https://github.com/DenisUA","followers_url":"https://api.github.com/users/DenisUA/followers","following_url":"https://api.github.com/users/DenisUA/following{/other_user}","gists_url":"https://api.github.com/users/DenisUA/gists{/gist_id}","starred_url":"https://api.github.com/users/DenisUA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenisUA/subscriptions","organizations_url":"https://api.github.com/users/DenisUA/orgs","repos_url":"https://api.github.com/users/DenisUA/repos","events_url":"https://api.github.com/users/DenisUA/events{/privacy}","received_events_url":"https://api.github.com/users/DenisUA/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-20T13:35:39Z","updated_at":"2015-11-20T16:00:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea6a3649f4d4c5566b424192244822c4c2d29217","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/3/comments","statuses_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/statuses/e344740b8b1d4b3d427e2862b7ffe3cff9515afc","head":{"label":"Railsreactor:spec-update","ref":"spec-update","sha":"e344740b8b1d4b3d427e2862b7ffe3cff9515afc","user":{"login":"Railsreactor","id":121519,"avatar_url":"https://avatars.githubusercontent.com/u/121519?v=3","gravatar_id":"","url":"https://api.github.com/users/Railsreactor","html_url":"https://github.com/Railsreactor","followers_url":"https://api.github.com/users/Railsreactor/followers","following_url":"https://api.github.com/users/Railsreactor/following{/other_user}","gists_url":"https://api.github.com/users/Railsreactor/gists{/gist_id}","starred_url":"https://api.github.com/users/Railsreactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Railsreactor/subscriptions","organizations_url":"https://api.github.com/users/Railsreactor/orgs","repos_url":"https://api.github.com/users/Railsreactor/repos","events_url":"https://api.github.com/users/Railsreactor/events{/privacy}","received_events_url":"https://api.github.com/users/Railsreactor/received_events","type":"Organization","site_admin":false},"repo":{"id":46425684,"name":"jsonapi-rails4-middleware","full_name":"Railsreactor/jsonapi-rails4-middleware","owner":{"login":"Railsreactor","id":121519,"avatar_url":"https://avatars.githubusercontent.com/u/121519?v=3","gravatar_id":"","url":"https://api.github.com/users/Railsreactor","html_url":"https://github.com/Railsreactor","followers_url":"https://api.github.com/users/Railsreactor/followers","following_url":"https://api.github.com/users/Railsreactor/following{/other_user}","gists_url":"https://api.github.com/users/Railsreactor/gists{/gist_id}","starred_url":"https://api.github.com/users/Railsreactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Railsreactor/subscriptions","organizations_url":"https://api.github.com/users/Railsreactor/orgs","repos_url":"https://api.github.com/users/Railsreactor/repos","events_url":"https://api.github.com/users/Railsreactor/events{/privacy}","received_events_url":"https://api.github.com/users/Railsreactor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware","description":"","fork":false,"url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware","forks_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/forks","keys_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/teams","hooks_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/hooks","issue_events_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/events","assignees_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/tags","blobs_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/languages","stargazers_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/stargazers","contributors_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/contributors","subscribers_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/subscribers","subscription_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/subscription","commits_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/merges","archive_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/downloads","issues_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/labels{/name}","releases_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/releases{/id}","created_at":"2015-11-18T14:56:02Z","updated_at":"2015-11-19T17:09:48Z","pushed_at":"2015-11-20T13:35:40Z","git_url":"git://github.com/Railsreactor/jsonapi-rails4-middleware.git","ssh_url":"git@github.com:Railsreactor/jsonapi-rails4-middleware.git","clone_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware.git","svn_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware","homepage":null,"size":11,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"Railsreactor:master","ref":"master","sha":"39f13402fe61ed910e6e07da101321d430260420","user":{"login":"Railsreactor","id":121519,"avatar_url":"https://avatars.githubusercontent.com/u/121519?v=3","gravatar_id":"","url":"https://api.github.com/users/Railsreactor","html_url":"https://github.com/Railsreactor","followers_url":"https://api.github.com/users/Railsreactor/followers","following_url":"https://api.github.com/users/Railsreactor/following{/other_user}","gists_url":"https://api.github.com/users/Railsreactor/gists{/gist_id}","starred_url":"https://api.github.com/users/Railsreactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Railsreactor/subscriptions","organizations_url":"https://api.github.com/users/Railsreactor/orgs","repos_url":"https://api.github.com/users/Railsreactor/repos","events_url":"https://api.github.com/users/Railsreactor/events{/privacy}","received_events_url":"https://api.github.com/users/Railsreactor/received_events","type":"Organization","site_admin":false},"repo":{"id":46425684,"name":"jsonapi-rails4-middleware","full_name":"Railsreactor/jsonapi-rails4-middleware","owner":{"login":"Railsreactor","id":121519,"avatar_url":"https://avatars.githubusercontent.com/u/121519?v=3","gravatar_id":"","url":"https://api.github.com/users/Railsreactor","html_url":"https://github.com/Railsreactor","followers_url":"https://api.github.com/users/Railsreactor/followers","following_url":"https://api.github.com/users/Railsreactor/following{/other_user}","gists_url":"https://api.github.com/users/Railsreactor/gists{/gist_id}","starred_url":"https://api.github.com/users/Railsreactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Railsreactor/subscriptions","organizations_url":"https://api.github.com/users/Railsreactor/orgs","repos_url":"https://api.github.com/users/Railsreactor/repos","events_url":"https://api.github.com/users/Railsreactor/events{/privacy}","received_events_url":"https://api.github.com/users/Railsreactor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware","description":"","fork":false,"url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware","forks_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/forks","keys_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/teams","hooks_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/hooks","issue_events_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/events","assignees_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/tags","blobs_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/languages","stargazers_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/stargazers","contributors_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/contributors","subscribers_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/subscribers","subscription_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/subscription","commits_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/merges","archive_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/downloads","issues_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/labels{/name}","releases_url":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/releases{/id}","created_at":"2015-11-18T14:56:02Z","updated_at":"2015-11-19T17:09:48Z","pushed_at":"2015-11-20T13:35:40Z","git_url":"git://github.com/Railsreactor/jsonapi-rails4-middleware.git","ssh_url":"git@github.com:Railsreactor/jsonapi-rails4-middleware.git","clone_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware.git","svn_url":"https://github.com/Railsreactor/jsonapi-rails4-middleware","homepage":null,"size":11,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3"},"html":{"href":"https://github.com/Railsreactor/jsonapi-rails4-middleware/pull/3"},"issue":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/3"},"comments":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Railsreactor/jsonapi-rails4-middleware/statuses/e344740b8b1d4b3d427e2862b7ffe3cff9515afc"}}}}