{"action":"created","comment":{"url":"https://api.github.com/repos/fletch-mkii/apex/pulls/comments/50590954","id":50590954,"diff_hunk":"@@ -9,25 +9,49 @@\n # end\n \n STAR_COLUMNS = [\"pl_hostname\",\"ra\",\"dec\",\"st_dist\",\"st_teff\",\"st_mass\",\"st_rad\",\"st_spstr\",\"st_logg\",\"st_lum\",\"st_dens\",\"st_age\"]\n+PLANET_COLUMNS = [\"pl_name\",\"pl_tranflag\",\"pl_eqt\",\"pl_discmethod\",\"pl_orbper\",\"pl_orbeccen\",\"pl_massj\",\"pl_radj\",\"pl_dens\"]\n exoplanets_base_query = \"http://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?table=exoplanets\"\n-star_query = \"&columns=\" + STAR_COLUMNS.join(\",\")\n-star_response = HTTPClient.new.get(exoplanets_base_query + star_query)\n-csv = CSV.new(star_response.body, :headers => true, :header_converters => :symbol, :converters => :all)\n+query = \"&columns=\" + STAR_COLUMNS.join(\",\") + \",\" + PLANET_COLUMNS.join(\",\")\n+response = HTTPClient.new.get(exoplanets_base_query + query)\n+csv = CSV.new(response.body, :headers => true, :header_converters => :symbol, :converters => :all)\n csv_array_of_hashes = csv.to_a.map {|row| row.to_hash }\n \n-csv_array_of_hashes.each do |star|\n-  Star.create(\n-    star_name: star[:pl_hostname],\n-    right_ascension: star[:ra],\n-    declination: star[:dec],\n-    distance: star[:st_dist],\n-    temperature: star[:st_teff],\n-    stellar_age: star[:st_age],\n-    stellar_mass: star[:st_mass],\n-    stellar_radius: star[:st_rad],\n-    spectral_type: star[:st_spstr],\n-    density: star[:st_dens],\n-    surface_gravity: star[:st_logg],\n-    luminosity: star[:st_lum],\n-    )\n+csv_array_of_hashes.each do |planet|\n+  if planet[:pl_tranflag] == 0\n+    planet_tranflag = false","path":"db/seeds.rb","position":31,"original_position":31,"commit_id":"43520895bc70a5d757be9438487cd221cc838755","original_commit_id":"43520895bc70a5d757be9438487cd221cc838755","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":"Useless assignment to variable - `planet_tranflag`.","created_at":"2016-01-22T21:08:45Z","updated_at":"2016-01-22T21:08:45Z","html_url":"https://github.com/fletch-mkii/apex/pull/6#discussion_r50590954","pull_request_url":"https://api.github.com/repos/fletch-mkii/apex/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/comments/50590954"},"html":{"href":"https://github.com/fletch-mkii/apex/pull/6#discussion_r50590954"},"pull_request":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/fletch-mkii/apex/pulls/6","id":56941845,"html_url":"https://github.com/fletch-mkii/apex/pull/6","diff_url":"https://github.com/fletch-mkii/apex/pull/6.diff","patch_url":"https://github.com/fletch-mkii/apex/pull/6.patch","issue_url":"https://api.github.com/repos/fletch-mkii/apex/issues/6","number":6,"state":"open","locked":false,"title":"Planets","user":{"login":"fletch-mkii","id":14324473,"avatar_url":"https://avatars.githubusercontent.com/u/14324473?v=3","gravatar_id":"","url":"https://api.github.com/users/fletch-mkii","html_url":"https://github.com/fletch-mkii","followers_url":"https://api.github.com/users/fletch-mkii/followers","following_url":"https://api.github.com/users/fletch-mkii/following{/other_user}","gists_url":"https://api.github.com/users/fletch-mkii/gists{/gist_id}","starred_url":"https://api.github.com/users/fletch-mkii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletch-mkii/subscriptions","organizations_url":"https://api.github.com/users/fletch-mkii/orgs","repos_url":"https://api.github.com/users/fletch-mkii/repos","events_url":"https://api.github.com/users/fletch-mkii/events{/privacy}","received_events_url":"https://api.github.com/users/fletch-mkii/received_events","type":"User","site_admin":false},"body":"planet functionality added, styling in progress","created_at":"2016-01-22T21:07:55Z","updated_at":"2016-01-22T21:08:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f80cc5939b3f9d3b27575f630fbf29462feb4a81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fletch-mkii/apex/pulls/6/commits","review_comments_url":"https://api.github.com/repos/fletch-mkii/apex/pulls/6/comments","review_comment_url":"https://api.github.com/repos/fletch-mkii/apex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fletch-mkii/apex/issues/6/comments","statuses_url":"https://api.github.com/repos/fletch-mkii/apex/statuses/43520895bc70a5d757be9438487cd221cc838755","head":{"label":"fletch-mkii:planets","ref":"planets","sha":"43520895bc70a5d757be9438487cd221cc838755","user":{"login":"fletch-mkii","id":14324473,"avatar_url":"https://avatars.githubusercontent.com/u/14324473?v=3","gravatar_id":"","url":"https://api.github.com/users/fletch-mkii","html_url":"https://github.com/fletch-mkii","followers_url":"https://api.github.com/users/fletch-mkii/followers","following_url":"https://api.github.com/users/fletch-mkii/following{/other_user}","gists_url":"https://api.github.com/users/fletch-mkii/gists{/gist_id}","starred_url":"https://api.github.com/users/fletch-mkii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletch-mkii/subscriptions","organizations_url":"https://api.github.com/users/fletch-mkii/orgs","repos_url":"https://api.github.com/users/fletch-mkii/repos","events_url":"https://api.github.com/users/fletch-mkii/events{/privacy}","received_events_url":"https://api.github.com/users/fletch-mkii/received_events","type":"User","site_admin":false},"repo":{"id":49886984,"name":"apex","full_name":"fletch-mkii/apex","owner":{"login":"fletch-mkii","id":14324473,"avatar_url":"https://avatars.githubusercontent.com/u/14324473?v=3","gravatar_id":"","url":"https://api.github.com/users/fletch-mkii","html_url":"https://github.com/fletch-mkii","followers_url":"https://api.github.com/users/fletch-mkii/followers","following_url":"https://api.github.com/users/fletch-mkii/following{/other_user}","gists_url":"https://api.github.com/users/fletch-mkii/gists{/gist_id}","starred_url":"https://api.github.com/users/fletch-mkii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletch-mkii/subscriptions","organizations_url":"https://api.github.com/users/fletch-mkii/orgs","repos_url":"https://api.github.com/users/fletch-mkii/repos","events_url":"https://api.github.com/users/fletch-mkii/events{/privacy}","received_events_url":"https://api.github.com/users/fletch-mkii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fletch-mkii/apex","description":"Launch Academy Breakable Toy","fork":false,"url":"https://api.github.com/repos/fletch-mkii/apex","forks_url":"https://api.github.com/repos/fletch-mkii/apex/forks","keys_url":"https://api.github.com/repos/fletch-mkii/apex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fletch-mkii/apex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fletch-mkii/apex/teams","hooks_url":"https://api.github.com/repos/fletch-mkii/apex/hooks","issue_events_url":"https://api.github.com/repos/fletch-mkii/apex/issues/events{/number}","events_url":"https://api.github.com/repos/fletch-mkii/apex/events","assignees_url":"https://api.github.com/repos/fletch-mkii/apex/assignees{/user}","branches_url":"https://api.github.com/repos/fletch-mkii/apex/branches{/branch}","tags_url":"https://api.github.com/repos/fletch-mkii/apex/tags","blobs_url":"https://api.github.com/repos/fletch-mkii/apex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fletch-mkii/apex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fletch-mkii/apex/git/refs{/sha}","trees_url":"https://api.github.com/repos/fletch-mkii/apex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fletch-mkii/apex/statuses/{sha}","languages_url":"https://api.github.com/repos/fletch-mkii/apex/languages","stargazers_url":"https://api.github.com/repos/fletch-mkii/apex/stargazers","contributors_url":"https://api.github.com/repos/fletch-mkii/apex/contributors","subscribers_url":"https://api.github.com/repos/fletch-mkii/apex/subscribers","subscription_url":"https://api.github.com/repos/fletch-mkii/apex/subscription","commits_url":"https://api.github.com/repos/fletch-mkii/apex/commits{/sha}","git_commits_url":"https://api.github.com/repos/fletch-mkii/apex/git/commits{/sha}","comments_url":"https://api.github.com/repos/fletch-mkii/apex/comments{/number}","issue_comment_url":"https://api.github.com/repos/fletch-mkii/apex/issues/comments{/number}","contents_url":"https://api.github.com/repos/fletch-mkii/apex/contents/{+path}","compare_url":"https://api.github.com/repos/fletch-mkii/apex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fletch-mkii/apex/merges","archive_url":"https://api.github.com/repos/fletch-mkii/apex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fletch-mkii/apex/downloads","issues_url":"https://api.github.com/repos/fletch-mkii/apex/issues{/number}","pulls_url":"https://api.github.com/repos/fletch-mkii/apex/pulls{/number}","milestones_url":"https://api.github.com/repos/fletch-mkii/apex/milestones{/number}","notifications_url":"https://api.github.com/repos/fletch-mkii/apex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fletch-mkii/apex/labels{/name}","releases_url":"https://api.github.com/repos/fletch-mkii/apex/releases{/id}","deployments_url":"https://api.github.com/repos/fletch-mkii/apex/deployments","created_at":"2016-01-18T15:51:33Z","updated_at":"2016-01-18T15:52:07Z","pushed_at":"2016-01-22T21:07:55Z","git_url":"git://github.com/fletch-mkii/apex.git","ssh_url":"git@github.com:fletch-mkii/apex.git","clone_url":"https://github.com/fletch-mkii/apex.git","svn_url":"https://github.com/fletch-mkii/apex","homepage":null,"size":253,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"fletch-mkii:master","ref":"master","sha":"8acb5e96284c4183e578220e753d8150ce1888c7","user":{"login":"fletch-mkii","id":14324473,"avatar_url":"https://avatars.githubusercontent.com/u/14324473?v=3","gravatar_id":"","url":"https://api.github.com/users/fletch-mkii","html_url":"https://github.com/fletch-mkii","followers_url":"https://api.github.com/users/fletch-mkii/followers","following_url":"https://api.github.com/users/fletch-mkii/following{/other_user}","gists_url":"https://api.github.com/users/fletch-mkii/gists{/gist_id}","starred_url":"https://api.github.com/users/fletch-mkii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletch-mkii/subscriptions","organizations_url":"https://api.github.com/users/fletch-mkii/orgs","repos_url":"https://api.github.com/users/fletch-mkii/repos","events_url":"https://api.github.com/users/fletch-mkii/events{/privacy}","received_events_url":"https://api.github.com/users/fletch-mkii/received_events","type":"User","site_admin":false},"repo":{"id":49886984,"name":"apex","full_name":"fletch-mkii/apex","owner":{"login":"fletch-mkii","id":14324473,"avatar_url":"https://avatars.githubusercontent.com/u/14324473?v=3","gravatar_id":"","url":"https://api.github.com/users/fletch-mkii","html_url":"https://github.com/fletch-mkii","followers_url":"https://api.github.com/users/fletch-mkii/followers","following_url":"https://api.github.com/users/fletch-mkii/following{/other_user}","gists_url":"https://api.github.com/users/fletch-mkii/gists{/gist_id}","starred_url":"https://api.github.com/users/fletch-mkii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletch-mkii/subscriptions","organizations_url":"https://api.github.com/users/fletch-mkii/orgs","repos_url":"https://api.github.com/users/fletch-mkii/repos","events_url":"https://api.github.com/users/fletch-mkii/events{/privacy}","received_events_url":"https://api.github.com/users/fletch-mkii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fletch-mkii/apex","description":"Launch Academy Breakable Toy","fork":false,"url":"https://api.github.com/repos/fletch-mkii/apex","forks_url":"https://api.github.com/repos/fletch-mkii/apex/forks","keys_url":"https://api.github.com/repos/fletch-mkii/apex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fletch-mkii/apex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fletch-mkii/apex/teams","hooks_url":"https://api.github.com/repos/fletch-mkii/apex/hooks","issue_events_url":"https://api.github.com/repos/fletch-mkii/apex/issues/events{/number}","events_url":"https://api.github.com/repos/fletch-mkii/apex/events","assignees_url":"https://api.github.com/repos/fletch-mkii/apex/assignees{/user}","branches_url":"https://api.github.com/repos/fletch-mkii/apex/branches{/branch}","tags_url":"https://api.github.com/repos/fletch-mkii/apex/tags","blobs_url":"https://api.github.com/repos/fletch-mkii/apex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fletch-mkii/apex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fletch-mkii/apex/git/refs{/sha}","trees_url":"https://api.github.com/repos/fletch-mkii/apex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fletch-mkii/apex/statuses/{sha}","languages_url":"https://api.github.com/repos/fletch-mkii/apex/languages","stargazers_url":"https://api.github.com/repos/fletch-mkii/apex/stargazers","contributors_url":"https://api.github.com/repos/fletch-mkii/apex/contributors","subscribers_url":"https://api.github.com/repos/fletch-mkii/apex/subscribers","subscription_url":"https://api.github.com/repos/fletch-mkii/apex/subscription","commits_url":"https://api.github.com/repos/fletch-mkii/apex/commits{/sha}","git_commits_url":"https://api.github.com/repos/fletch-mkii/apex/git/commits{/sha}","comments_url":"https://api.github.com/repos/fletch-mkii/apex/comments{/number}","issue_comment_url":"https://api.github.com/repos/fletch-mkii/apex/issues/comments{/number}","contents_url":"https://api.github.com/repos/fletch-mkii/apex/contents/{+path}","compare_url":"https://api.github.com/repos/fletch-mkii/apex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fletch-mkii/apex/merges","archive_url":"https://api.github.com/repos/fletch-mkii/apex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fletch-mkii/apex/downloads","issues_url":"https://api.github.com/repos/fletch-mkii/apex/issues{/number}","pulls_url":"https://api.github.com/repos/fletch-mkii/apex/pulls{/number}","milestones_url":"https://api.github.com/repos/fletch-mkii/apex/milestones{/number}","notifications_url":"https://api.github.com/repos/fletch-mkii/apex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fletch-mkii/apex/labels{/name}","releases_url":"https://api.github.com/repos/fletch-mkii/apex/releases{/id}","deployments_url":"https://api.github.com/repos/fletch-mkii/apex/deployments","created_at":"2016-01-18T15:51:33Z","updated_at":"2016-01-18T15:52:07Z","pushed_at":"2016-01-22T21:07:55Z","git_url":"git://github.com/fletch-mkii/apex.git","ssh_url":"git@github.com:fletch-mkii/apex.git","clone_url":"https://github.com/fletch-mkii/apex.git","svn_url":"https://github.com/fletch-mkii/apex","homepage":null,"size":253,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/6"},"html":{"href":"https://github.com/fletch-mkii/apex/pull/6"},"issue":{"href":"https://api.github.com/repos/fletch-mkii/apex/issues/6"},"comments":{"href":"https://api.github.com/repos/fletch-mkii/apex/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fletch-mkii/apex/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/fletch-mkii/apex/statuses/43520895bc70a5d757be9438487cd221cc838755"}}}}