GitHub PullRequestReviewCommentEvent at 2014-10-24 14:26:32
Repository: level_up_exercises
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/19341245","id":19341245,"diff_hunk":"@@ -0,0 +1,88 @@\n+require 'csv'\n+\n+def grabDinos(dinoarray, qText, hname)\n+\tdinoarray.each do |ff|\n+\t\ttemp = ff[hname]\n+\t\tif qText == \"CARNIVORE\" \n+  \t\tif temp != nil and (temp.upcase == qText or temp.upcase == \"INSECTIVORE\" or temp.upcase == \"PISCIVORE\")\n+\t\t\t\t\t\t\tputs ff['name']\n+\t\t\tend #  if temp != nil and (temp.upcase == qText or temp.ucase == \"INSECTIVORE\" or temp.ucase == \"PISCIVORE\")\n+\t\telsif hname == \"weight\"\n+\t\t\tif temp != nil and qText == \"BIG\" and temp.to_i > 2000\n+\t\t\t\t\t\t\tputs ff['name']\n+\t\t\telsif temp != nil and qText == \"SMALL\" and temp.to_i < 2000\n+\t\t\t\t\t\t\tputs ff['name']\n+\t\t\tend\n+\t\telsif qText == \"PERIOD\"\n+\t\t\t\tputs (ff['name'] + \" - \" + ff['period'])\n+  \telsif temp != nil and temp.upcase == qText\n+    \tputs ff['name']\n+\t\tend # \tif qText == \"CARNIVORE\" \n+\tend #\tdinoarray.each do |ff|\n+end \t\n+\n+def eachDino(dinos, userReq)\n+\tdinos.each do |dd|\n+\t\tdinotemp = dd['name']\n+\t\tif dinotemp.upcase == userReq.upcase\n+\t\t\t\t\tdd.each.sort_by {|k, v| print k.upcase, \":    \", v, \"\\n\"}\n+\t\telsif userReq.upcase == \"ALL\" \n+\t\t\t\t\tdd.each.sort_by {|k, v| print k.upcase, \":    \", v, \"\\n\"}\n+\t\t\t\t\tprint(\"************************************************\\n\")\n+\t\tend\n+\tend\n+end\n+\n+allDinos = Array.new\n+array_csv_files = ['dinodex.csv','african_dinosaur_export.csv']\n+#puts array_csv_files\n+array_csv_files.each do |file|\n+\tcsv = CSV.read(file, :headers => true, :header_converters => [:downcase])\n+\tcsv.by_row!\n+\t\n+\tcsv.each do |row|\n+\t dino_temp = row.to_hash\n+\t if dino_temp['genus'] != nil \n+\t  \tdino_temp['name'] = dino_temp.delete('genus')\n+\t\t  dino_temp['diet'] = (dino_temp.delete('carnivore') == 'Yes')?'Carnivore':'Not Carnivore'\n+\t elsif \n+\t\t  dino_temp['weight'] = dino_temp.delete('weight_in_lbs')\n+\t end\n+\t allDinos << dino_temp\n+\tend\n+end\n+ \n+print(\"Enter a single choice or comma separated choices, please select from given (Biped, Quadruped, Carnivore, period, big, small, info by name) : \")\n+userq = gets.chomp\n+\n+userinput = userq.split(\",\")\n+userinput.each do |val|\n+\tuinput = val.strip\n+\tcase uinput.upcase\n+\t\twhen \"BIPED\"\n+\t\t\tputs \"Dinosaurs that were bipeds are: \\n\"\n+\t\t\tgrabDinos allDinos, uinput.upcase, \"walking\"","path":"dino_catalog/dinoDex.rb","position":64,"original_position":64,"commit_id":"23fa47dafb384f58e69e56053a6f440c612a9505","original_commit_id":"23fa47dafb384f58e69e56053a6f440c612a9505","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"","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-10-24T14:26:32Z","updated_at":"2014-10-24T14:26:32Z","html_url":"https://github.com/jmmastey/level_up_exercises/pull/176#discussion_r19341245","pull_request_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176","_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/19341245"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/176#discussion_r19341245"},"pull_request":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176"}}},"pull_request":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176","id":23299403,"html_url":"https://github.com/jmmastey/level_up_exercises/pull/176","diff_url":"https://github.com/jmmastey/level_up_exercises/pull/176.diff","patch_url":"https://github.com/jmmastey/level_up_exercises/pull/176.patch","issue_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/176","number":176,"state":"open","locked":false,"title":"Adding my solution for dinoDex exercise","user":{"login":"siringentavida","id":9354529,"avatar_url":"https://avatars.githubusercontent.com/u/9354529?v=2","gravatar_id":"","url":"https://api.github.com/users/siringentavida","html_url":"https://github.com/siringentavida","followers_url":"https://api.github.com/users/siringentavida/followers","following_url":"https://api.github.com/users/siringentavida/following{/other_user}","gists_url":"https://api.github.com/users/siringentavida/gists{/gist_id}","starred_url":"https://api.github.com/users/siringentavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siringentavida/subscriptions","organizations_url":"https://api.github.com/users/siringentavida/orgs","repos_url":"https://api.github.com/users/siringentavida/repos","events_url":"https://api.github.com/users/siringentavida/events{/privacy}","received_events_url":"https://api.github.com/users/siringentavida/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-24T14:26:24Z","updated_at":"2014-10-24T14:26:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50fa56f42fa7ab159549edc90edc256606eaf674","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176/commits","review_comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176/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/176/comments","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/23fa47dafb384f58e69e56053a6f440c612a9505","head":{"label":"siringentavida:dinodex_solution","ref":"dinodex_solution","sha":"23fa47dafb384f58e69e56053a6f440c612a9505","user":{"login":"siringentavida","id":9354529,"avatar_url":"https://avatars.githubusercontent.com/u/9354529?v=2","gravatar_id":"","url":"https://api.github.com/users/siringentavida","html_url":"https://github.com/siringentavida","followers_url":"https://api.github.com/users/siringentavida/followers","following_url":"https://api.github.com/users/siringentavida/following{/other_user}","gists_url":"https://api.github.com/users/siringentavida/gists{/gist_id}","starred_url":"https://api.github.com/users/siringentavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siringentavida/subscriptions","organizations_url":"https://api.github.com/users/siringentavida/orgs","repos_url":"https://api.github.com/users/siringentavida/repos","events_url":"https://api.github.com/users/siringentavida/events{/privacy}","received_events_url":"https://api.github.com/users/siringentavida/received_events","type":"User","site_admin":false},"repo":{"id":25691673,"name":"level_up_exercises-1","full_name":"siringentavida/level_up_exercises-1","owner":{"login":"siringentavida","id":9354529,"avatar_url":"https://avatars.githubusercontent.com/u/9354529?v=2","gravatar_id":"","url":"https://api.github.com/users/siringentavida","html_url":"https://github.com/siringentavida","followers_url":"https://api.github.com/users/siringentavida/followers","following_url":"https://api.github.com/users/siringentavida/following{/other_user}","gists_url":"https://api.github.com/users/siringentavida/gists{/gist_id}","starred_url":"https://api.github.com/users/siringentavida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siringentavida/subscriptions","organizations_url":"https://api.github.com/users/siringentavida/orgs","repos_url":"https://api.github.com/users/siringentavida/repos","events_url":"https://api.github.com/users/siringentavida/events{/privacy}","received_events_url":"https://api.github.com/users/siringentavida/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/siringentavida/level_up_exercises-1","description":"A series of code-related assignments to challenge starting engineers","fork":true,"url":"https://api.github.com/repos/siringentavida/level_up_exercises-1","forks_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/forks","keys_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/teams","hooks_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/hooks","issue_events_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/issues/events{/number}","events_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/events","assignees_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/assignees{/user}","branches_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/branches{/branch}","tags_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/tags","blobs_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/statuses/{sha}","languages_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/languages","stargazers_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/stargazers","contributors_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/contributors","subscribers_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/subscribers","subscription_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/subscription","commits_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/contents/{+path}","compare_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/merges","archive_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/downloads","issues_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/issues{/number}","pulls_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/pulls{/number}","milestones_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/milestones{/number}","notifications_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/labels{/name}","releases_url":"https://api.github.com/repos/siringentavida/level_up_exercises-1/releases{/id}","created_at":"2014-10-24T14:13:37Z","updated_at":"2014-10-09T06:13:13Z","pushed_at":"2014-10-24T14:25:18Z","git_url":"git://github.com/siringentavida/level_up_exercises-1.git","ssh_url":"git@github.com:siringentavida/level_up_exercises-1.git","clone_url":"https://github.com/siringentavida/level_up_exercises-1.git","svn_url":"https://github.com/siringentavida/level_up_exercises-1","homepage":"http://leveluprails.herokuapp.com","size":37316,"stargazers_count":0,"watchers_count":0,"language":null,"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":"jmmastey:master","ref":"master","sha":"512a604443c0f6ec75a3205e144bb2114a07308d","user":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=2","gravatar_id":"","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":"","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 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-10-09T06:13:13Z","pushed_at":"2014-10-23T22:05:20Z","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":"http://leveluprails.herokuapp.com","size":37316,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":15,"forks":41,"open_issues":15,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/176"},"issue":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/176"},"comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/176/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/176/commits"},"statuses":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/23fa47dafb384f58e69e56053a6f440c612a9505"}}}}