{"action":"created","comment":{"url":"https://api.github.com/repos/katherinlaine/donate/pulls/comments/22402843","id":22402843,"diff_hunk":"@@ -0,0 +1,51 @@\n+class CSVImporter\n+  def initialize(file, ids)\n+    @file = file\n+    @ids = ids\n+  end\n+\n+  def run_import\n+    CSV.foreach(@file.path, headers: true, encoding: \"ISO-8859-1\") do |row|\n+      row_data = row.to_hash","path":"app/models/csv_importer.rb","position":9,"original_position":9,"commit_id":"c73b96c5019a20cc13650c6ff70d489fbbf9c7a7","original_commit_id":"c73b96c5019a20cc13650c6ff70d489fbbf9c7a7","user":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"body":"nope. whoops. thnx :palm_tree: :walking: ","created_at":"2015-01-01T22:48:26Z","updated_at":"2015-01-01T22:48:26Z","html_url":"https://github.com/katherinlaine/donate/pull/8#discussion_r22402843","pull_request_url":"https://api.github.com/repos/katherinlaine/donate/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/katherinlaine/donate/pulls/comments/22402843"},"html":{"href":"https://github.com/katherinlaine/donate/pull/8#discussion_r22402843"},"pull_request":{"href":"https://api.github.com/repos/katherinlaine/donate/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/katherinlaine/donate/pulls/8","id":26747007,"html_url":"https://github.com/katherinlaine/donate/pull/8","diff_url":"https://github.com/katherinlaine/donate/pull/8.diff","patch_url":"https://github.com/katherinlaine/donate/pull/8.patch","issue_url":"https://api.github.com/repos/katherinlaine/donate/issues/8","number":8,"state":"open","locked":false,"title":"Implement CSV importer for agency data","user":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"body":"Give admin ability to import a large number of agencies at a time, using spreadsheet that includes agency address, contacts, etc. along with what kinds of food they can accept. \r\n*accepted food types are in the form of 0's and 1's, per each food type id determined by Feeding America. \r\n","created_at":"2015-01-01T22:18:52Z","updated_at":"2015-01-01T22:48:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ddc108745ca7d0da51932c57bf5c6358fe6b18b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/katherinlaine/donate/pulls/8/commits","review_comments_url":"https://api.github.com/repos/katherinlaine/donate/pulls/8/comments","review_comment_url":"https://api.github.com/repos/katherinlaine/donate/pulls/comments/{number}","comments_url":"https://api.github.com/repos/katherinlaine/donate/issues/8/comments","statuses_url":"https://api.github.com/repos/katherinlaine/donate/statuses/c73b96c5019a20cc13650c6ff70d489fbbf9c7a7","head":{"label":"katherinlaine:ks-upload-agency-data","ref":"ks-upload-agency-data","sha":"c73b96c5019a20cc13650c6ff70d489fbbf9c7a7","user":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"repo":{"id":26413532,"name":"donate","full_name":"katherinlaine/donate","owner":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katherinlaine/donate","description":"personal project - finding locations for people to make small food donations","fork":false,"url":"https://api.github.com/repos/katherinlaine/donate","forks_url":"https://api.github.com/repos/katherinlaine/donate/forks","keys_url":"https://api.github.com/repos/katherinlaine/donate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katherinlaine/donate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katherinlaine/donate/teams","hooks_url":"https://api.github.com/repos/katherinlaine/donate/hooks","issue_events_url":"https://api.github.com/repos/katherinlaine/donate/issues/events{/number}","events_url":"https://api.github.com/repos/katherinlaine/donate/events","assignees_url":"https://api.github.com/repos/katherinlaine/donate/assignees{/user}","branches_url":"https://api.github.com/repos/katherinlaine/donate/branches{/branch}","tags_url":"https://api.github.com/repos/katherinlaine/donate/tags","blobs_url":"https://api.github.com/repos/katherinlaine/donate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katherinlaine/donate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katherinlaine/donate/git/refs{/sha}","trees_url":"https://api.github.com/repos/katherinlaine/donate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katherinlaine/donate/statuses/{sha}","languages_url":"https://api.github.com/repos/katherinlaine/donate/languages","stargazers_url":"https://api.github.com/repos/katherinlaine/donate/stargazers","contributors_url":"https://api.github.com/repos/katherinlaine/donate/contributors","subscribers_url":"https://api.github.com/repos/katherinlaine/donate/subscribers","subscription_url":"https://api.github.com/repos/katherinlaine/donate/subscription","commits_url":"https://api.github.com/repos/katherinlaine/donate/commits{/sha}","git_commits_url":"https://api.github.com/repos/katherinlaine/donate/git/commits{/sha}","comments_url":"https://api.github.com/repos/katherinlaine/donate/comments{/number}","issue_comment_url":"https://api.github.com/repos/katherinlaine/donate/issues/comments/{number}","contents_url":"https://api.github.com/repos/katherinlaine/donate/contents/{+path}","compare_url":"https://api.github.com/repos/katherinlaine/donate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katherinlaine/donate/merges","archive_url":"https://api.github.com/repos/katherinlaine/donate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katherinlaine/donate/downloads","issues_url":"https://api.github.com/repos/katherinlaine/donate/issues{/number}","pulls_url":"https://api.github.com/repos/katherinlaine/donate/pulls{/number}","milestones_url":"https://api.github.com/repos/katherinlaine/donate/milestones{/number}","notifications_url":"https://api.github.com/repos/katherinlaine/donate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katherinlaine/donate/labels{/name}","releases_url":"https://api.github.com/repos/katherinlaine/donate/releases{/id}","created_at":"2014-11-09T23:47:35Z","updated_at":"2014-12-18T23:02:20Z","pushed_at":"2015-01-01T22:21:20Z","git_url":"git://github.com/katherinlaine/donate.git","ssh_url":"git@github.com:katherinlaine/donate.git","clone_url":"https://github.com/katherinlaine/donate.git","svn_url":"https://github.com/katherinlaine/donate","homepage":null,"size":1080,"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":"katherinlaine:master","ref":"master","sha":"01f8da5cd1d79426e56c8f4b873ca75b90e10dff","user":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"repo":{"id":26413532,"name":"donate","full_name":"katherinlaine/donate","owner":{"login":"katherinlaine","id":6817804,"avatar_url":"https://avatars.githubusercontent.com/u/6817804?v=3","gravatar_id":"","url":"https://api.github.com/users/katherinlaine","html_url":"https://github.com/katherinlaine","followers_url":"https://api.github.com/users/katherinlaine/followers","following_url":"https://api.github.com/users/katherinlaine/following{/other_user}","gists_url":"https://api.github.com/users/katherinlaine/gists{/gist_id}","starred_url":"https://api.github.com/users/katherinlaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katherinlaine/subscriptions","organizations_url":"https://api.github.com/users/katherinlaine/orgs","repos_url":"https://api.github.com/users/katherinlaine/repos","events_url":"https://api.github.com/users/katherinlaine/events{/privacy}","received_events_url":"https://api.github.com/users/katherinlaine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katherinlaine/donate","description":"personal project - finding locations for people to make small food donations","fork":false,"url":"https://api.github.com/repos/katherinlaine/donate","forks_url":"https://api.github.com/repos/katherinlaine/donate/forks","keys_url":"https://api.github.com/repos/katherinlaine/donate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katherinlaine/donate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katherinlaine/donate/teams","hooks_url":"https://api.github.com/repos/katherinlaine/donate/hooks","issue_events_url":"https://api.github.com/repos/katherinlaine/donate/issues/events{/number}","events_url":"https://api.github.com/repos/katherinlaine/donate/events","assignees_url":"https://api.github.com/repos/katherinlaine/donate/assignees{/user}","branches_url":"https://api.github.com/repos/katherinlaine/donate/branches{/branch}","tags_url":"https://api.github.com/repos/katherinlaine/donate/tags","blobs_url":"https://api.github.com/repos/katherinlaine/donate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katherinlaine/donate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katherinlaine/donate/git/refs{/sha}","trees_url":"https://api.github.com/repos/katherinlaine/donate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katherinlaine/donate/statuses/{sha}","languages_url":"https://api.github.com/repos/katherinlaine/donate/languages","stargazers_url":"https://api.github.com/repos/katherinlaine/donate/stargazers","contributors_url":"https://api.github.com/repos/katherinlaine/donate/contributors","subscribers_url":"https://api.github.com/repos/katherinlaine/donate/subscribers","subscription_url":"https://api.github.com/repos/katherinlaine/donate/subscription","commits_url":"https://api.github.com/repos/katherinlaine/donate/commits{/sha}","git_commits_url":"https://api.github.com/repos/katherinlaine/donate/git/commits{/sha}","comments_url":"https://api.github.com/repos/katherinlaine/donate/comments{/number}","issue_comment_url":"https://api.github.com/repos/katherinlaine/donate/issues/comments/{number}","contents_url":"https://api.github.com/repos/katherinlaine/donate/contents/{+path}","compare_url":"https://api.github.com/repos/katherinlaine/donate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katherinlaine/donate/merges","archive_url":"https://api.github.com/repos/katherinlaine/donate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katherinlaine/donate/downloads","issues_url":"https://api.github.com/repos/katherinlaine/donate/issues{/number}","pulls_url":"https://api.github.com/repos/katherinlaine/donate/pulls{/number}","milestones_url":"https://api.github.com/repos/katherinlaine/donate/milestones{/number}","notifications_url":"https://api.github.com/repos/katherinlaine/donate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katherinlaine/donate/labels{/name}","releases_url":"https://api.github.com/repos/katherinlaine/donate/releases{/id}","created_at":"2014-11-09T23:47:35Z","updated_at":"2014-12-18T23:02:20Z","pushed_at":"2015-01-01T22:21:20Z","git_url":"git://github.com/katherinlaine/donate.git","ssh_url":"git@github.com:katherinlaine/donate.git","clone_url":"https://github.com/katherinlaine/donate.git","svn_url":"https://github.com/katherinlaine/donate","homepage":null,"size":1080,"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/katherinlaine/donate/pulls/8"},"html":{"href":"https://github.com/katherinlaine/donate/pull/8"},"issue":{"href":"https://api.github.com/repos/katherinlaine/donate/issues/8"},"comments":{"href":"https://api.github.com/repos/katherinlaine/donate/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/katherinlaine/donate/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/katherinlaine/donate/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/katherinlaine/donate/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/katherinlaine/donate/statuses/c73b96c5019a20cc13650c6ff70d489fbbf9c7a7"}}}}