{"action":"created","comment":{"url":"https://api.github.com/repos/sethdeckard/gull/pulls/comments/71905833","id":71905833,"diff_hunk":"@@ -30,6 +32,29 @@ def centroid\n       [center_x, center_y]\n     end\n \n+    def contains?(coordinate)\n+      # Source: http://jakescruggs.blogspot.com/2009/07/point-inside-polygon-in-ruby.html\n+      return false if outside_bounding_box?(coordinate)\n+\n+      # Note: does NOT take into account straddling the international date line \n+      # (+/- 180 degrees longitude)\n+\n+      contains = false\n+      i = -1\n+      j = coordinates.size - 1\n+      while (i += 1) < coordinates.size\n+        if ((coordinates[i][0] <= coordinate[0] && coordinate[0] < coordinates[j][0]) || ","path":"lib/gull/polygon.rb","position":26,"original_position":26,"commit_id":"47c5e60f306e57f9853a82db35713f7bcde7c492","original_commit_id":"47c5e60f306e57f9853a82db35713f7bcde7c492","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":"Line is too long. [89/80]<br>Don't use parentheses around the condition of an `if`.<br>Trailing whitespace detected.","created_at":"2016-07-22T16:21:50Z","updated_at":"2016-07-22T16:21:50Z","html_url":"https://github.com/sethdeckard/gull/pull/1#discussion_r71905833","pull_request_url":"https://api.github.com/repos/sethdeckard/gull/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/comments/71905833"},"html":{"href":"https://github.com/sethdeckard/gull/pull/1#discussion_r71905833"},"pull_request":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sethdeckard/gull/pulls/1","id":78503469,"html_url":"https://github.com/sethdeckard/gull/pull/1","diff_url":"https://github.com/sethdeckard/gull/pull/1.diff","patch_url":"https://github.com/sethdeckard/gull/pull/1.patch","issue_url":"https://api.github.com/repos/sethdeckard/gull/issues/1","number":1,"state":"open","locked":false,"title":"Adding #contains? method to polygons to determine if a coordinate is …","user":{"login":"schrockwell","id":30214,"avatar_url":"https://avatars.githubusercontent.com/u/30214?v=3","gravatar_id":"","url":"https://api.github.com/users/schrockwell","html_url":"https://github.com/schrockwell","followers_url":"https://api.github.com/users/schrockwell/followers","following_url":"https://api.github.com/users/schrockwell/following{/other_user}","gists_url":"https://api.github.com/users/schrockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/schrockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schrockwell/subscriptions","organizations_url":"https://api.github.com/users/schrockwell/orgs","repos_url":"https://api.github.com/users/schrockwell/repos","events_url":"https://api.github.com/users/schrockwell/events{/privacy}","received_events_url":"https://api.github.com/users/schrockwell/received_events","type":"User","site_admin":false},"body":"…within its bounds\r\n\r\nI added a basic test case, as well.\r\n\r\nI also added some undeclared variables in `#centroid`.","created_at":"2016-07-22T16:21:46Z","updated_at":"2016-07-22T16:21:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76e91809f9eeadddbda0b4dec3181df7d87499fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sethdeckard/gull/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sethdeckard/gull/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sethdeckard/gull/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sethdeckard/gull/issues/1/comments","statuses_url":"https://api.github.com/repos/sethdeckard/gull/statuses/47c5e60f306e57f9853a82db35713f7bcde7c492","head":{"label":"schrockwell:master","ref":"master","sha":"47c5e60f306e57f9853a82db35713f7bcde7c492","user":{"login":"schrockwell","id":30214,"avatar_url":"https://avatars.githubusercontent.com/u/30214?v=3","gravatar_id":"","url":"https://api.github.com/users/schrockwell","html_url":"https://github.com/schrockwell","followers_url":"https://api.github.com/users/schrockwell/followers","following_url":"https://api.github.com/users/schrockwell/following{/other_user}","gists_url":"https://api.github.com/users/schrockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/schrockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schrockwell/subscriptions","organizations_url":"https://api.github.com/users/schrockwell/orgs","repos_url":"https://api.github.com/users/schrockwell/repos","events_url":"https://api.github.com/users/schrockwell/events{/privacy}","received_events_url":"https://api.github.com/users/schrockwell/received_events","type":"User","site_admin":false},"repo":{"id":63965444,"name":"gull","full_name":"schrockwell/gull","owner":{"login":"schrockwell","id":30214,"avatar_url":"https://avatars.githubusercontent.com/u/30214?v=3","gravatar_id":"","url":"https://api.github.com/users/schrockwell","html_url":"https://github.com/schrockwell","followers_url":"https://api.github.com/users/schrockwell/followers","following_url":"https://api.github.com/users/schrockwell/following{/other_user}","gists_url":"https://api.github.com/users/schrockwell/gists{/gist_id}","starred_url":"https://api.github.com/users/schrockwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schrockwell/subscriptions","organizations_url":"https://api.github.com/users/schrockwell/orgs","repos_url":"https://api.github.com/users/schrockwell/repos","events_url":"https://api.github.com/users/schrockwell/events{/privacy}","received_events_url":"https://api.github.com/users/schrockwell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schrockwell/gull","description":"Ruby client for parsing NOAA/NWS alerts, warnings, and watches.","fork":true,"url":"https://api.github.com/repos/schrockwell/gull","forks_url":"https://api.github.com/repos/schrockwell/gull/forks","keys_url":"https://api.github.com/repos/schrockwell/gull/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schrockwell/gull/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schrockwell/gull/teams","hooks_url":"https://api.github.com/repos/schrockwell/gull/hooks","issue_events_url":"https://api.github.com/repos/schrockwell/gull/issues/events{/number}","events_url":"https://api.github.com/repos/schrockwell/gull/events","assignees_url":"https://api.github.com/repos/schrockwell/gull/assignees{/user}","branches_url":"https://api.github.com/repos/schrockwell/gull/branches{/branch}","tags_url":"https://api.github.com/repos/schrockwell/gull/tags","blobs_url":"https://api.github.com/repos/schrockwell/gull/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schrockwell/gull/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schrockwell/gull/git/refs{/sha}","trees_url":"https://api.github.com/repos/schrockwell/gull/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schrockwell/gull/statuses/{sha}","languages_url":"https://api.github.com/repos/schrockwell/gull/languages","stargazers_url":"https://api.github.com/repos/schrockwell/gull/stargazers","contributors_url":"https://api.github.com/repos/schrockwell/gull/contributors","subscribers_url":"https://api.github.com/repos/schrockwell/gull/subscribers","subscription_url":"https://api.github.com/repos/schrockwell/gull/subscription","commits_url":"https://api.github.com/repos/schrockwell/gull/commits{/sha}","git_commits_url":"https://api.github.com/repos/schrockwell/gull/git/commits{/sha}","comments_url":"https://api.github.com/repos/schrockwell/gull/comments{/number}","issue_comment_url":"https://api.github.com/repos/schrockwell/gull/issues/comments{/number}","contents_url":"https://api.github.com/repos/schrockwell/gull/contents/{+path}","compare_url":"https://api.github.com/repos/schrockwell/gull/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schrockwell/gull/merges","archive_url":"https://api.github.com/repos/schrockwell/gull/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schrockwell/gull/downloads","issues_url":"https://api.github.com/repos/schrockwell/gull/issues{/number}","pulls_url":"https://api.github.com/repos/schrockwell/gull/pulls{/number}","milestones_url":"https://api.github.com/repos/schrockwell/gull/milestones{/number}","notifications_url":"https://api.github.com/repos/schrockwell/gull/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schrockwell/gull/labels{/name}","releases_url":"https://api.github.com/repos/schrockwell/gull/releases{/id}","deployments_url":"https://api.github.com/repos/schrockwell/gull/deployments","created_at":"2016-07-22T15:53:41Z","updated_at":"2016-07-22T15:53:42Z","pushed_at":"2016-07-22T16:19:52Z","git_url":"git://github.com/schrockwell/gull.git","ssh_url":"git@github.com:schrockwell/gull.git","clone_url":"https://github.com/schrockwell/gull.git","svn_url":"https://github.com/schrockwell/gull","homepage":"","size":65,"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":"sethdeckard:master","ref":"master","sha":"675f4e16686f4e5d52b0a042c8c37b2db0683420","user":{"login":"sethdeckard","id":59431,"avatar_url":"https://avatars.githubusercontent.com/u/59431?v=3","gravatar_id":"","url":"https://api.github.com/users/sethdeckard","html_url":"https://github.com/sethdeckard","followers_url":"https://api.github.com/users/sethdeckard/followers","following_url":"https://api.github.com/users/sethdeckard/following{/other_user}","gists_url":"https://api.github.com/users/sethdeckard/gists{/gist_id}","starred_url":"https://api.github.com/users/sethdeckard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethdeckard/subscriptions","organizations_url":"https://api.github.com/users/sethdeckard/orgs","repos_url":"https://api.github.com/users/sethdeckard/repos","events_url":"https://api.github.com/users/sethdeckard/events{/privacy}","received_events_url":"https://api.github.com/users/sethdeckard/received_events","type":"User","site_admin":false},"repo":{"id":24694650,"name":"gull","full_name":"sethdeckard/gull","owner":{"login":"sethdeckard","id":59431,"avatar_url":"https://avatars.githubusercontent.com/u/59431?v=3","gravatar_id":"","url":"https://api.github.com/users/sethdeckard","html_url":"https://github.com/sethdeckard","followers_url":"https://api.github.com/users/sethdeckard/followers","following_url":"https://api.github.com/users/sethdeckard/following{/other_user}","gists_url":"https://api.github.com/users/sethdeckard/gists{/gist_id}","starred_url":"https://api.github.com/users/sethdeckard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethdeckard/subscriptions","organizations_url":"https://api.github.com/users/sethdeckard/orgs","repos_url":"https://api.github.com/users/sethdeckard/repos","events_url":"https://api.github.com/users/sethdeckard/events{/privacy}","received_events_url":"https://api.github.com/users/sethdeckard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sethdeckard/gull","description":"Ruby client for parsing NOAA/NWS alerts, warnings, and watches.","fork":false,"url":"https://api.github.com/repos/sethdeckard/gull","forks_url":"https://api.github.com/repos/sethdeckard/gull/forks","keys_url":"https://api.github.com/repos/sethdeckard/gull/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sethdeckard/gull/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sethdeckard/gull/teams","hooks_url":"https://api.github.com/repos/sethdeckard/gull/hooks","issue_events_url":"https://api.github.com/repos/sethdeckard/gull/issues/events{/number}","events_url":"https://api.github.com/repos/sethdeckard/gull/events","assignees_url":"https://api.github.com/repos/sethdeckard/gull/assignees{/user}","branches_url":"https://api.github.com/repos/sethdeckard/gull/branches{/branch}","tags_url":"https://api.github.com/repos/sethdeckard/gull/tags","blobs_url":"https://api.github.com/repos/sethdeckard/gull/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sethdeckard/gull/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sethdeckard/gull/git/refs{/sha}","trees_url":"https://api.github.com/repos/sethdeckard/gull/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sethdeckard/gull/statuses/{sha}","languages_url":"https://api.github.com/repos/sethdeckard/gull/languages","stargazers_url":"https://api.github.com/repos/sethdeckard/gull/stargazers","contributors_url":"https://api.github.com/repos/sethdeckard/gull/contributors","subscribers_url":"https://api.github.com/repos/sethdeckard/gull/subscribers","subscription_url":"https://api.github.com/repos/sethdeckard/gull/subscription","commits_url":"https://api.github.com/repos/sethdeckard/gull/commits{/sha}","git_commits_url":"https://api.github.com/repos/sethdeckard/gull/git/commits{/sha}","comments_url":"https://api.github.com/repos/sethdeckard/gull/comments{/number}","issue_comment_url":"https://api.github.com/repos/sethdeckard/gull/issues/comments{/number}","contents_url":"https://api.github.com/repos/sethdeckard/gull/contents/{+path}","compare_url":"https://api.github.com/repos/sethdeckard/gull/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sethdeckard/gull/merges","archive_url":"https://api.github.com/repos/sethdeckard/gull/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sethdeckard/gull/downloads","issues_url":"https://api.github.com/repos/sethdeckard/gull/issues{/number}","pulls_url":"https://api.github.com/repos/sethdeckard/gull/pulls{/number}","milestones_url":"https://api.github.com/repos/sethdeckard/gull/milestones{/number}","notifications_url":"https://api.github.com/repos/sethdeckard/gull/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sethdeckard/gull/labels{/name}","releases_url":"https://api.github.com/repos/sethdeckard/gull/releases{/id}","deployments_url":"https://api.github.com/repos/sethdeckard/gull/deployments","created_at":"2014-10-01T20:41:20Z","updated_at":"2016-07-22T15:48:42Z","pushed_at":"2016-07-22T16:21:46Z","git_url":"git://github.com/sethdeckard/gull.git","ssh_url":"git@github.com:sethdeckard/gull.git","clone_url":"https://github.com/sethdeckard/gull.git","svn_url":"https://github.com/sethdeckard/gull","homepage":"","size":65,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/1"},"html":{"href":"https://github.com/sethdeckard/gull/pull/1"},"issue":{"href":"https://api.github.com/repos/sethdeckard/gull/issues/1"},"comments":{"href":"https://api.github.com/repos/sethdeckard/gull/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sethdeckard/gull/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sethdeckard/gull/statuses/47c5e60f306e57f9853a82db35713f7bcde7c492"}}}}
{"actor":{"display_login":"houndci-bot"}}