GitHub PullRequestReviewCommentEvent at 2014-09-09 18:37:59
Repository: level_up_exercises
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/17318637","id":17318637,"diff_hunk":"@@ -0,0 +1,48 @@\n+require_relative \"arrowhead_collection\"\n+\n+class ArrowheadClassifier\n+\tattr_accessor :collection\n+\n+\tdef initialize\n+\t\t@collection = ArrowheadCollection.new\n+\t\tpopulate_collection\n+\tend\n+\n+\tdef classify(region, shape)\n+\t\tmatches = classification_matches(region, shape)\n+\t\tlog_classification_results(matches)\n+\tend\n+\n+\tprivate\n+\t\tdef classification_matches(region, shape)\n+\t\t\tcollection.arrowheads.select{ |a| a.region == region && a.shape == shape}\n+\t\tend\n+\n+\t\tdef log_classification_results(matches)\n+\t\t\tmatches.any? ? print_success(matches) : raise_no_match_error\n+\t\tend\n+\n+\t\tdef print_success(matches)\n+\t\t\tputs \"Your arrowhead is the #{matches.first.name}! Probably priceless.\"\n+\t\tend\n+\n+\t\tdef raise_no_match_error\n+\t\t\traise \"The system could not locate an arrowhead matching the specified region and shape.\"\n+\t\tend\n+\n+\t\tdef populate_collection\n+\t\t\tcollection.add(region: :far_west, shape: :notched, name: \"Archaic Side Notch\" )\n+\t\t\tcollection.add(region: :far_west, shape: :stemmed, name: \"Archaic Stemmed\" )\n+\t\t\tcollection.add(region: :far_west, shape: :lanceolate, name: \"Agate Basin\")\n+\t\t\tcollection.add(region: :far_west, shape: :bifurcated, name: \"Cody\")","path":"arrowhead/arrowhead_classifier.rb","position":37,"original_position":37,"commit_id":"f2b142ae12fd0a39d6e2e4943021b18991abdc5f","original_commit_id":"f2b142ae12fd0a39d6e2e4943021b18991abdc5f","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Tab detected.","created_at":"2014-09-09T18:37:59Z","updated_at":"2014-09-09T18:37:59Z","html_url":"https://github.com/jmmastey/level_up_exercises/pull/36#discussion_r17318637","pull_request_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/17318637"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/36#discussion_r17318637"},"pull_request":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36","id":20974346,"html_url":"https://github.com/jmmastey/level_up_exercises/pull/36","diff_url":"https://github.com/jmmastey/level_up_exercises/pull/36.diff","patch_url":"https://github.com/jmmastey/level_up_exercises/pull/36.patch","issue_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/36","number":36,"state":"open","locked":false,"title":"Level Up Pull Request","user":{"login":"csain","id":4407695,"avatar_url":"https://avatars.githubusercontent.com/u/4407695?v=2","gravatar_id":"5399034203a4e11fc73e069f26a95cea","url":"https://api.github.com/users/csain","html_url":"https://github.com/csain","followers_url":"https://api.github.com/users/csain/followers","following_url":"https://api.github.com/users/csain/following{/other_user}","gists_url":"https://api.github.com/users/csain/gists{/gist_id}","starred_url":"https://api.github.com/users/csain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csain/subscriptions","organizations_url":"https://api.github.com/users/csain/orgs","repos_url":"https://api.github.com/users/csain/repos","events_url":"https://api.github.com/users/csain/events{/privacy}","received_events_url":"https://api.github.com/users/csain/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-09T18:37:46Z","updated_at":"2014-09-09T18:37:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36/commits","review_comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36/comments","review_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/36/comments","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/f2b142ae12fd0a39d6e2e4943021b18991abdc5f","head":{"label":"csain:master","ref":"master","sha":"f2b142ae12fd0a39d6e2e4943021b18991abdc5f","user":{"login":"csain","id":4407695,"avatar_url":"https://avatars.githubusercontent.com/u/4407695?v=2","gravatar_id":"5399034203a4e11fc73e069f26a95cea","url":"https://api.github.com/users/csain","html_url":"https://github.com/csain","followers_url":"https://api.github.com/users/csain/followers","following_url":"https://api.github.com/users/csain/following{/other_user}","gists_url":"https://api.github.com/users/csain/gists{/gist_id}","starred_url":"https://api.github.com/users/csain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csain/subscriptions","organizations_url":"https://api.github.com/users/csain/orgs","repos_url":"https://api.github.com/users/csain/repos","events_url":"https://api.github.com/users/csain/events{/privacy}","received_events_url":"https://api.github.com/users/csain/received_events","type":"User","site_admin":false},"repo":{"id":23396762,"name":"level_up_exercises","full_name":"csain/level_up_exercises","owner":{"login":"csain","id":4407695,"avatar_url":"https://avatars.githubusercontent.com/u/4407695?v=2","gravatar_id":"5399034203a4e11fc73e069f26a95cea","url":"https://api.github.com/users/csain","html_url":"https://github.com/csain","followers_url":"https://api.github.com/users/csain/followers","following_url":"https://api.github.com/users/csain/following{/other_user}","gists_url":"https://api.github.com/users/csain/gists{/gist_id}","starred_url":"https://api.github.com/users/csain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csain/subscriptions","organizations_url":"https://api.github.com/users/csain/orgs","repos_url":"https://api.github.com/users/csain/repos","events_url":"https://api.github.com/users/csain/events{/privacy}","received_events_url":"https://api.github.com/users/csain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/csain/level_up_exercises","description":"A long series of code-related assignments to challenge starting engineers","fork":true,"url":"https://api.github.com/repos/csain/level_up_exercises","forks_url":"https://api.github.com/repos/csain/level_up_exercises/forks","keys_url":"https://api.github.com/repos/csain/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csain/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csain/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/csain/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/csain/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/csain/level_up_exercises/events","assignees_url":"https://api.github.com/repos/csain/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/csain/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/csain/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/csain/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csain/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csain/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/csain/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csain/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/csain/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/csain/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/csain/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/csain/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/csain/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/csain/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/csain/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/csain/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/csain/level_up_exercises/issues/comments/{number}","contents_url":"https://api.github.com/repos/csain/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/csain/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csain/level_up_exercises/merges","archive_url":"https://api.github.com/repos/csain/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csain/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/csain/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/csain/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/csain/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/csain/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csain/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/csain/level_up_exercises/releases{/id}","created_at":"2014-08-27T16:19:09Z","updated_at":"2014-09-02T16:35:57Z","pushed_at":"2014-09-09T18:36:42Z","git_url":"git://github.com/csain/level_up_exercises.git","ssh_url":"git@github.com:csain/level_up_exercises.git","clone_url":"https://github.com/csain/level_up_exercises.git","svn_url":"https://github.com/csain/level_up_exercises","homepage":null,"size":235,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jmmastey:master","ref":"master","sha":"136b1af958398e3337c6a4055eea783d1e079911","user":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=2","gravatar_id":"a9704266587836f7e784235e5073b93e","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"repo":{"id":20705648,"name":"level_up_exercises","full_name":"jmmastey/level_up_exercises","owner":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=2","gravatar_id":"a9704266587836f7e784235e5073b93e","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmmastey/level_up_exercises","description":"A long series of code-related assignments to challenge starting engineers","fork":false,"url":"https://api.github.com/repos/jmmastey/level_up_exercises","forks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/forks","keys_url":"https://api.github.com/repos/jmmastey/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmmastey/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmmastey/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/events","assignees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/jmmastey/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/jmmastey/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/comments/{number}","contents_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/jmmastey/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmmastey/level_up_exercises/merges","archive_url":"https://api.github.com/repos/jmmastey/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmmastey/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/jmmastey/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/jmmastey/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmmastey/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/jmmastey/level_up_exercises/releases{/id}","created_at":"2014-06-10T23:42:24Z","updated_at":"2014-09-02T21:41:48Z","pushed_at":"2014-09-09T00:55:58Z","git_url":"git://github.com/jmmastey/level_up_exercises.git","ssh_url":"git@github.com:jmmastey/level_up_exercises.git","clone_url":"https://github.com/jmmastey/level_up_exercises.git","svn_url":"https://github.com/jmmastey/level_up_exercises","homepage":null,"size":3721,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":21,"mirror_url":null,"open_issues_count":14,"forks":21,"open_issues":14,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/36"},"issue":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/36"},"comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/f2b142ae12fd0a39d6e2e4943021b18991abdc5f"}}}}