GitHub PullRequestReviewCommentEvent at 2014-12-16 16:11:21
Repository: level_up_exercises
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/21909347","id":21909347,"diff_hunk":"@@ -0,0 +1,84 @@\n+$LOAD_PATH << '.'\n+\n+require 'csv'\n+require 'dinosaur'\n+\n+class DinosaurImport\n+  attr_accessor :dinosaurs, :csv_files, :data\n+\n+  DEFAULT_OPTIONS = {\n+    headers: true,\n+    col_sep: ',',\n+  }\n+\n+  def initialize(csv_files)\n+    @csv_files = csv_files\n+    csv_files_to_dinosaurs\n+  end\n+\n+  def csv_files_to_dinosaurs\n+    dinosaurs = []\n+    @csv_files.each do |csv_file|\n+      @data = CSV.read(csv_file,DEFAULT_OPTIONS)\n+      dinosaurs_from_file = data_to_dinosaurs\n+      dinosaurs.concat(dinosaurs_from_file)\n+    end\n+    @dinosaurs = dinosaurs\n+  end\n+\n+  def data_to_dinosaurs\n+    dinosaurs = []\n+    @data.each do |row|\n+      hash = row.to_hash\n+      hash = DinosaurImport::convert_import_hash(hash)\n+      dinosaurs << Dinosaur.new(hash)\n+    end\n+    dinosaurs\n+  end\n+\n+  def self.convert_import_hash(hash)\n+    hash_converted = {}\n+    hash.each_pair do |key, value|\n+      key_converted = DinosaurImport::convert_import_keys(key)\n+      value_converted =\n+          DinosaurImport::convert_import_values(key_converted, value)\n+      hash_converted.merge!({key_converted => value_converted})","path":"dino_catalog/dinosaur_import.rb","position":45,"original_position":45,"commit_id":"5ea7df1dc2974c48f31ca082b25e79bc5e429d75","original_commit_id":"5ea7df1dc2974c48f31ca082b25e79bc5e429d75","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Redundant curly braces around a hash parameter.<br>Space inside { missing.<br>Space inside } missing.","created_at":"2014-12-16T16:11:21Z","updated_at":"2014-12-16T16:11:21Z","html_url":"https://github.com/jmmastey/level_up_exercises/pull/350#discussion_r21909347","pull_request_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350","_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/21909347"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/350#discussion_r21909347"},"pull_request":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350"}}},"pull_request":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350","id":26100632,"html_url":"https://github.com/jmmastey/level_up_exercises/pull/350","diff_url":"https://github.com/jmmastey/level_up_exercises/pull/350.diff","patch_url":"https://github.com/jmmastey/level_up_exercises/pull/350.patch","issue_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/350","number":350,"state":"open","locked":false,"title":"First Dino Dex Program","user":{"login":"jfinzel","id":10077712,"avatar_url":"https://avatars.githubusercontent.com/u/10077712?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinzel","html_url":"https://github.com/jfinzel","followers_url":"https://api.github.com/users/jfinzel/followers","following_url":"https://api.github.com/users/jfinzel/following{/other_user}","gists_url":"https://api.github.com/users/jfinzel/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinzel/subscriptions","organizations_url":"https://api.github.com/users/jfinzel/orgs","repos_url":"https://api.github.com/users/jfinzel/repos","events_url":"https://api.github.com/users/jfinzel/events{/privacy}","received_events_url":"https://api.github.com/users/jfinzel/received_events","type":"User","site_admin":false},"body":"I have it set up right now to just run the code in the Main class, and it prints the results to the console.","created_at":"2014-12-15T20:56:36Z","updated_at":"2014-12-16T16:11:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0eaa6d8e1ee654dad6297bcc28724f7d4e0ba304","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350/commits","review_comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350/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/350/comments","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/5ea7df1dc2974c48f31ca082b25e79bc5e429d75","head":{"label":"jfinzel:just_git","ref":"just_git","sha":"5ea7df1dc2974c48f31ca082b25e79bc5e429d75","user":{"login":"jfinzel","id":10077712,"avatar_url":"https://avatars.githubusercontent.com/u/10077712?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinzel","html_url":"https://github.com/jfinzel","followers_url":"https://api.github.com/users/jfinzel/followers","following_url":"https://api.github.com/users/jfinzel/following{/other_user}","gists_url":"https://api.github.com/users/jfinzel/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinzel/subscriptions","organizations_url":"https://api.github.com/users/jfinzel/orgs","repos_url":"https://api.github.com/users/jfinzel/repos","events_url":"https://api.github.com/users/jfinzel/events{/privacy}","received_events_url":"https://api.github.com/users/jfinzel/received_events","type":"User","site_admin":false},"repo":{"id":27552070,"name":"level_up_exercises","full_name":"jfinzel/level_up_exercises","owner":{"login":"jfinzel","id":10077712,"avatar_url":"https://avatars.githubusercontent.com/u/10077712?v=3","gravatar_id":"","url":"https://api.github.com/users/jfinzel","html_url":"https://github.com/jfinzel","followers_url":"https://api.github.com/users/jfinzel/followers","following_url":"https://api.github.com/users/jfinzel/following{/other_user}","gists_url":"https://api.github.com/users/jfinzel/gists{/gist_id}","starred_url":"https://api.github.com/users/jfinzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfinzel/subscriptions","organizations_url":"https://api.github.com/users/jfinzel/orgs","repos_url":"https://api.github.com/users/jfinzel/repos","events_url":"https://api.github.com/users/jfinzel/events{/privacy}","received_events_url":"https://api.github.com/users/jfinzel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jfinzel/level_up_exercises","description":"A series of code-related assignments to challenge starting engineers","fork":true,"url":"https://api.github.com/repos/jfinzel/level_up_exercises","forks_url":"https://api.github.com/repos/jfinzel/level_up_exercises/forks","keys_url":"https://api.github.com/repos/jfinzel/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jfinzel/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jfinzel/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/jfinzel/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/jfinzel/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/jfinzel/level_up_exercises/events","assignees_url":"https://api.github.com/repos/jfinzel/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/jfinzel/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/jfinzel/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/jfinzel/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jfinzel/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jfinzel/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/jfinzel/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jfinzel/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/jfinzel/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/jfinzel/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/jfinzel/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/jfinzel/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/jfinzel/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/jfinzel/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/jfinzel/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/jfinzel/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/jfinzel/level_up_exercises/issues/comments/{number}","contents_url":"https://api.github.com/repos/jfinzel/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/jfinzel/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jfinzel/level_up_exercises/merges","archive_url":"https://api.github.com/repos/jfinzel/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jfinzel/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/jfinzel/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/jfinzel/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/jfinzel/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/jfinzel/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jfinzel/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/jfinzel/level_up_exercises/releases{/id}","created_at":"2014-12-04T17:39:35Z","updated_at":"2014-12-04T17:39:35Z","pushed_at":"2014-12-16T16:11:13Z","git_url":"git://github.com/jfinzel/level_up_exercises.git","ssh_url":"git@github.com:jfinzel/level_up_exercises.git","clone_url":"https://github.com/jfinzel/level_up_exercises.git","svn_url":"https://github.com/jfinzel/level_up_exercises","homepage":"http://leveluprails.herokuapp.com","size":295,"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":"jmmastey:master","ref":"master","sha":"d6fb3782079429bc5629858bbd6c76ee3d4906b0","user":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=3","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=3","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-12-01T16:25:57Z","pushed_at":"2014-11-05T12:49:26Z","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":39009,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":9,"forks":51,"open_issues":9,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/350"},"issue":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/350"},"comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/350/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/350/commits"},"statuses":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/5ea7df1dc2974c48f31ca082b25e79bc5e429d75"}}}}