{"action":"created","comment":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/26702943","id":26702943,"diff_hunk":"@@ -27,6 +27,72 @@ def color_name\n     color ? \"white\" : \"black\"\n   end\n \n+  def obstructed_diagonally?(x, y)","path":"app/models/piece.rb","position":4,"original_position":4,"commit_id":"25ada960d209025759318e2c5f59ed48056a8533","original_commit_id":"25ada960d209025759318e2c5f59ed48056a8533","user":{"login":"johnellison","id":5806135,"avatar_url":"https://avatars.githubusercontent.com/u/5806135?v=3","gravatar_id":"","url":"https://api.github.com/users/johnellison","html_url":"https://github.com/johnellison","followers_url":"https://api.github.com/users/johnellison/followers","following_url":"https://api.github.com/users/johnellison/following{/other_user}","gists_url":"https://api.github.com/users/johnellison/gists{/gist_id}","starred_url":"https://api.github.com/users/johnellison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnellison/subscriptions","organizations_url":"https://api.github.com/users/johnellison/orgs","repos_url":"https://api.github.com/users/johnellison/repos","events_url":"https://api.github.com/users/johnellison/events{/privacy}","received_events_url":"https://api.github.com/users/johnellison/received_events","type":"User","site_admin":false},"body":"It's nice to have these helper methods in here so we don't have to repeat this code. Well done.\r\n \r\nI'm curious from a best practices standpoint how to approach methods like this which apply to some inherited models and not others. ","created_at":"2015-03-18T20:20:33Z","updated_at":"2015-03-18T20:20:33Z","html_url":"https://github.com/sprky/sprky_chess/pull/43#discussion_r26702943","pull_request_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments/26702943"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/43#discussion_r26702943"},"pull_request":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/sprky/sprky_chess/pulls/43","id":31385461,"html_url":"https://github.com/sprky/sprky_chess/pull/43","diff_url":"https://github.com/sprky/sprky_chess/pull/43.diff","patch_url":"https://github.com/sprky/sprky_chess/pull/43.patch","issue_url":"https://api.github.com/repos/sprky/sprky_chess/issues/43","number":43,"state":"open","locked":false,"title":"Bishop and Queen obstructed_move methods","user":{"login":"hsinkoff","id":10408711,"avatar_url":"https://avatars.githubusercontent.com/u/10408711?v=3","gravatar_id":"","url":"https://api.github.com/users/hsinkoff","html_url":"https://github.com/hsinkoff","followers_url":"https://api.github.com/users/hsinkoff/followers","following_url":"https://api.github.com/users/hsinkoff/following{/other_user}","gists_url":"https://api.github.com/users/hsinkoff/gists{/gist_id}","starred_url":"https://api.github.com/users/hsinkoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsinkoff/subscriptions","organizations_url":"https://api.github.com/users/hsinkoff/orgs","repos_url":"https://api.github.com/users/hsinkoff/repos","events_url":"https://api.github.com/users/hsinkoff/events{/privacy}","received_events_url":"https://api.github.com/users/hsinkoff/received_events","type":"User","site_admin":false},"body":"There is a lot of repetitive code in this section.  We will probably want to deal with that later, but I wanted the group to have a chance to see the code.  ","created_at":"2015-03-17T22:42:25Z","updated_at":"2015-03-18T20:20:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4155a08b1de90c1c0ff987d51ae43d99f59d080","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/43/commits","review_comments_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/43/comments","review_comment_url":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/issues/43/comments","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/25ada960d209025759318e2c5f59ed48056a8533","head":{"label":"sprky:bishop_obstruction","ref":"bishop_obstruction","sha":"25ada960d209025759318e2c5f59ed48056a8533","user":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"repo":{"id":31082633,"name":"sprky_chess","full_name":"sprky/sprky_chess","owner":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprky/sprky_chess","description":"Sparky Chess app for Firehose group project","fork":false,"url":"https://api.github.com/repos/sprky/sprky_chess","forks_url":"https://api.github.com/repos/sprky/sprky_chess/forks","keys_url":"https://api.github.com/repos/sprky/sprky_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprky/sprky_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprky/sprky_chess/teams","hooks_url":"https://api.github.com/repos/sprky/sprky_chess/hooks","issue_events_url":"https://api.github.com/repos/sprky/sprky_chess/issues/events{/number}","events_url":"https://api.github.com/repos/sprky/sprky_chess/events","assignees_url":"https://api.github.com/repos/sprky/sprky_chess/assignees{/user}","branches_url":"https://api.github.com/repos/sprky/sprky_chess/branches{/branch}","tags_url":"https://api.github.com/repos/sprky/sprky_chess/tags","blobs_url":"https://api.github.com/repos/sprky/sprky_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprky/sprky_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprky/sprky_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprky/sprky_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/sprky/sprky_chess/languages","stargazers_url":"https://api.github.com/repos/sprky/sprky_chess/stargazers","contributors_url":"https://api.github.com/repos/sprky/sprky_chess/contributors","subscribers_url":"https://api.github.com/repos/sprky/sprky_chess/subscribers","subscription_url":"https://api.github.com/repos/sprky/sprky_chess/subscription","commits_url":"https://api.github.com/repos/sprky/sprky_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprky/sprky_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprky/sprky_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprky/sprky_chess/contents/{+path}","compare_url":"https://api.github.com/repos/sprky/sprky_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprky/sprky_chess/merges","archive_url":"https://api.github.com/repos/sprky/sprky_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprky/sprky_chess/downloads","issues_url":"https://api.github.com/repos/sprky/sprky_chess/issues{/number}","pulls_url":"https://api.github.com/repos/sprky/sprky_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/sprky/sprky_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/sprky/sprky_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprky/sprky_chess/labels{/name}","releases_url":"https://api.github.com/repos/sprky/sprky_chess/releases{/id}","created_at":"2015-02-20T20:01:15Z","updated_at":"2015-03-18T17:57:08Z","pushed_at":"2015-03-18T19:33:08Z","git_url":"git://github.com/sprky/sprky_chess.git","ssh_url":"git@github.com:sprky/sprky_chess.git","clone_url":"https://github.com/sprky/sprky_chess.git","svn_url":"https://github.com/sprky/sprky_chess","homepage":"http://sprky.herokuapp.com","size":704,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"sprky:master","ref":"master","sha":"bf429d33aaa0738c4aacf5831e53def90efc6a33","user":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"repo":{"id":31082633,"name":"sprky_chess","full_name":"sprky/sprky_chess","owner":{"login":"sprky","id":11095994,"avatar_url":"https://avatars.githubusercontent.com/u/11095994?v=3","gravatar_id":"","url":"https://api.github.com/users/sprky","html_url":"https://github.com/sprky","followers_url":"https://api.github.com/users/sprky/followers","following_url":"https://api.github.com/users/sprky/following{/other_user}","gists_url":"https://api.github.com/users/sprky/gists{/gist_id}","starred_url":"https://api.github.com/users/sprky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprky/subscriptions","organizations_url":"https://api.github.com/users/sprky/orgs","repos_url":"https://api.github.com/users/sprky/repos","events_url":"https://api.github.com/users/sprky/events{/privacy}","received_events_url":"https://api.github.com/users/sprky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprky/sprky_chess","description":"Sparky Chess app for Firehose group project","fork":false,"url":"https://api.github.com/repos/sprky/sprky_chess","forks_url":"https://api.github.com/repos/sprky/sprky_chess/forks","keys_url":"https://api.github.com/repos/sprky/sprky_chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprky/sprky_chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprky/sprky_chess/teams","hooks_url":"https://api.github.com/repos/sprky/sprky_chess/hooks","issue_events_url":"https://api.github.com/repos/sprky/sprky_chess/issues/events{/number}","events_url":"https://api.github.com/repos/sprky/sprky_chess/events","assignees_url":"https://api.github.com/repos/sprky/sprky_chess/assignees{/user}","branches_url":"https://api.github.com/repos/sprky/sprky_chess/branches{/branch}","tags_url":"https://api.github.com/repos/sprky/sprky_chess/tags","blobs_url":"https://api.github.com/repos/sprky/sprky_chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprky/sprky_chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprky/sprky_chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprky/sprky_chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprky/sprky_chess/statuses/{sha}","languages_url":"https://api.github.com/repos/sprky/sprky_chess/languages","stargazers_url":"https://api.github.com/repos/sprky/sprky_chess/stargazers","contributors_url":"https://api.github.com/repos/sprky/sprky_chess/contributors","subscribers_url":"https://api.github.com/repos/sprky/sprky_chess/subscribers","subscription_url":"https://api.github.com/repos/sprky/sprky_chess/subscription","commits_url":"https://api.github.com/repos/sprky/sprky_chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprky/sprky_chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprky/sprky_chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprky/sprky_chess/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprky/sprky_chess/contents/{+path}","compare_url":"https://api.github.com/repos/sprky/sprky_chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprky/sprky_chess/merges","archive_url":"https://api.github.com/repos/sprky/sprky_chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprky/sprky_chess/downloads","issues_url":"https://api.github.com/repos/sprky/sprky_chess/issues{/number}","pulls_url":"https://api.github.com/repos/sprky/sprky_chess/pulls{/number}","milestones_url":"https://api.github.com/repos/sprky/sprky_chess/milestones{/number}","notifications_url":"https://api.github.com/repos/sprky/sprky_chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprky/sprky_chess/labels{/name}","releases_url":"https://api.github.com/repos/sprky/sprky_chess/releases{/id}","created_at":"2015-02-20T20:01:15Z","updated_at":"2015-03-18T17:57:08Z","pushed_at":"2015-03-18T19:33:08Z","git_url":"git://github.com/sprky/sprky_chess.git","ssh_url":"git@github.com:sprky/sprky_chess.git","clone_url":"https://github.com/sprky/sprky_chess.git","svn_url":"https://github.com/sprky/sprky_chess","homepage":"http://sprky.herokuapp.com","size":704,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/43"},"html":{"href":"https://github.com/sprky/sprky_chess/pull/43"},"issue":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/43"},"comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sprky/sprky_chess/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/sprky/sprky_chess/statuses/25ada960d209025759318e2c5f59ed48056a8533"}}}}