{"action":"created","comment":{"url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/comments/34590065","id":34590065,"diff_hunk":"@@ -372,6 +372,12 @@ class ImportUserCSVByFirstName\n     expect { import.run! }.to_not raise_error\n   end\n \n+  it \"can change quote_char value\" do\n+    import = ImportUserCSV.new(content: \"\", quote_char: \"\\x00\")\n+\n+    expect(import.csv.quote_char).to eq \"\\x00\"\n+  end\n+","path":"spec/csv_importer_spec.rb","position":9,"original_position":9,"commit_id":"12a555b188227207486af1df18e48d5fd52c5189","original_commit_id":"12a555b188227207486af1df18e48d5fd52c5189","user":{"login":"pcreux","id":45299,"avatar_url":"https://avatars.githubusercontent.com/u/45299?v=3","gravatar_id":"","url":"https://api.github.com/users/pcreux","html_url":"https://github.com/pcreux","followers_url":"https://api.github.com/users/pcreux/followers","following_url":"https://api.github.com/users/pcreux/following{/other_user}","gists_url":"https://api.github.com/users/pcreux/gists{/gist_id}","starred_url":"https://api.github.com/users/pcreux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcreux/subscriptions","organizations_url":"https://api.github.com/users/pcreux/orgs","repos_url":"https://api.github.com/users/pcreux/repos","events_url":"https://api.github.com/users/pcreux/events{/privacy}","received_events_url":"https://api.github.com/users/pcreux/received_events","type":"User","site_admin":false},"body":"You're right, it would be better to test that things are properly wired up. This file contains high level specs where we test the behaviour of CSVImporter instead of the internals. You could something similar to https://github.com/BrewhouseTeam/csv-importer/pull/26/files#diff-699b1882c566f8988f2b16f89a4bda93R336\r\n\r\n```ruby\r\nimport = ImportUserCSV.new(content: %|first_name,last_name\\nbob \"the\" second,last_name|, quote_char: \"\\x00\")\r\n\r\nimport.run!\r\n\r\n# assert first imported model attributes here\r\n```","created_at":"2015-07-14T16:45:05Z","updated_at":"2015-07-14T16:45:05Z","html_url":"https://github.com/BrewhouseTeam/csv-importer/pull/26#discussion_r34590065","pull_request_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/comments/34590065"},"html":{"href":"https://github.com/BrewhouseTeam/csv-importer/pull/26#discussion_r34590065"},"pull_request":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26","id":39746399,"html_url":"https://github.com/BrewhouseTeam/csv-importer/pull/26","diff_url":"https://github.com/BrewhouseTeam/csv-importer/pull/26.diff","patch_url":"https://github.com/BrewhouseTeam/csv-importer/pull/26.patch","issue_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/26","number":26,"state":"open","locked":false,"title":"Add quote_char option","user":{"login":"shvetsovdm","id":3574904,"avatar_url":"https://avatars.githubusercontent.com/u/3574904?v=3","gravatar_id":"","url":"https://api.github.com/users/shvetsovdm","html_url":"https://github.com/shvetsovdm","followers_url":"https://api.github.com/users/shvetsovdm/followers","following_url":"https://api.github.com/users/shvetsovdm/following{/other_user}","gists_url":"https://api.github.com/users/shvetsovdm/gists{/gist_id}","starred_url":"https://api.github.com/users/shvetsovdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shvetsovdm/subscriptions","organizations_url":"https://api.github.com/users/shvetsovdm/orgs","repos_url":"https://api.github.com/users/shvetsovdm/repos","events_url":"https://api.github.com/users/shvetsovdm/events{/privacy}","received_events_url":"https://api.github.com/users/shvetsovdm/received_events","type":"User","site_admin":false},"body":"Complex quoting (Illegal quoting problem)\r\n\r\n```ruby\r\nCSV.parse(\"1,Glk,Lev \\\"The Black Spider\\\" Yashin,USSR\")\r\n  # => CSV::MalformedCSVError: Illegal quoting in line 1.\r\n```\r\n\r\nThe problem is that the CSV comma-delimited text should entirely surround by `\"` not in part or do not contain `\"` at all.\r\n\r\nYou can pass quote_char option, to solve the problem:\r\n```ruby\r\nCSV.parse(\"1,Glk,Lev \\\"The Black Spider\\\" Yashin,USSR\", quote_char: \"\\x00\")\r\n  # => [ [\"1\", \"Glk\", \"Lev \\\"The Black Spider\\\" Yashin\", \"USSR\"] ]\r\n```","created_at":"2015-07-11T14:08:44Z","updated_at":"2015-07-14T16:45:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a89937acb95dccbae83713d5f7700d344ec4ab3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26/commits","review_comments_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26/comments","review_comment_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/26/comments","statuses_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/statuses/12a555b188227207486af1df18e48d5fd52c5189","head":{"label":"farpostdesign:master","ref":"master","sha":"12a555b188227207486af1df18e48d5fd52c5189","user":{"login":"farpostdesign","id":9072801,"avatar_url":"https://avatars.githubusercontent.com/u/9072801?v=3","gravatar_id":"","url":"https://api.github.com/users/farpostdesign","html_url":"https://github.com/farpostdesign","followers_url":"https://api.github.com/users/farpostdesign/followers","following_url":"https://api.github.com/users/farpostdesign/following{/other_user}","gists_url":"https://api.github.com/users/farpostdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/farpostdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farpostdesign/subscriptions","organizations_url":"https://api.github.com/users/farpostdesign/orgs","repos_url":"https://api.github.com/users/farpostdesign/repos","events_url":"https://api.github.com/users/farpostdesign/events{/privacy}","received_events_url":"https://api.github.com/users/farpostdesign/received_events","type":"Organization","site_admin":false},"repo":{"id":38796629,"name":"csv-importer","full_name":"farpostdesign/csv-importer","owner":{"login":"farpostdesign","id":9072801,"avatar_url":"https://avatars.githubusercontent.com/u/9072801?v=3","gravatar_id":"","url":"https://api.github.com/users/farpostdesign","html_url":"https://github.com/farpostdesign","followers_url":"https://api.github.com/users/farpostdesign/followers","following_url":"https://api.github.com/users/farpostdesign/following{/other_user}","gists_url":"https://api.github.com/users/farpostdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/farpostdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farpostdesign/subscriptions","organizations_url":"https://api.github.com/users/farpostdesign/orgs","repos_url":"https://api.github.com/users/farpostdesign/repos","events_url":"https://api.github.com/users/farpostdesign/events{/privacy}","received_events_url":"https://api.github.com/users/farpostdesign/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/farpostdesign/csv-importer","description":"CSV Import for humans","fork":true,"url":"https://api.github.com/repos/farpostdesign/csv-importer","forks_url":"https://api.github.com/repos/farpostdesign/csv-importer/forks","keys_url":"https://api.github.com/repos/farpostdesign/csv-importer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/farpostdesign/csv-importer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/farpostdesign/csv-importer/teams","hooks_url":"https://api.github.com/repos/farpostdesign/csv-importer/hooks","issue_events_url":"https://api.github.com/repos/farpostdesign/csv-importer/issues/events{/number}","events_url":"https://api.github.com/repos/farpostdesign/csv-importer/events","assignees_url":"https://api.github.com/repos/farpostdesign/csv-importer/assignees{/user}","branches_url":"https://api.github.com/repos/farpostdesign/csv-importer/branches{/branch}","tags_url":"https://api.github.com/repos/farpostdesign/csv-importer/tags","blobs_url":"https://api.github.com/repos/farpostdesign/csv-importer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/farpostdesign/csv-importer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/farpostdesign/csv-importer/git/refs{/sha}","trees_url":"https://api.github.com/repos/farpostdesign/csv-importer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/farpostdesign/csv-importer/statuses/{sha}","languages_url":"https://api.github.com/repos/farpostdesign/csv-importer/languages","stargazers_url":"https://api.github.com/repos/farpostdesign/csv-importer/stargazers","contributors_url":"https://api.github.com/repos/farpostdesign/csv-importer/contributors","subscribers_url":"https://api.github.com/repos/farpostdesign/csv-importer/subscribers","subscription_url":"https://api.github.com/repos/farpostdesign/csv-importer/subscription","commits_url":"https://api.github.com/repos/farpostdesign/csv-importer/commits{/sha}","git_commits_url":"https://api.github.com/repos/farpostdesign/csv-importer/git/commits{/sha}","comments_url":"https://api.github.com/repos/farpostdesign/csv-importer/comments{/number}","issue_comment_url":"https://api.github.com/repos/farpostdesign/csv-importer/issues/comments{/number}","contents_url":"https://api.github.com/repos/farpostdesign/csv-importer/contents/{+path}","compare_url":"https://api.github.com/repos/farpostdesign/csv-importer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/farpostdesign/csv-importer/merges","archive_url":"https://api.github.com/repos/farpostdesign/csv-importer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/farpostdesign/csv-importer/downloads","issues_url":"https://api.github.com/repos/farpostdesign/csv-importer/issues{/number}","pulls_url":"https://api.github.com/repos/farpostdesign/csv-importer/pulls{/number}","milestones_url":"https://api.github.com/repos/farpostdesign/csv-importer/milestones{/number}","notifications_url":"https://api.github.com/repos/farpostdesign/csv-importer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/farpostdesign/csv-importer/labels{/name}","releases_url":"https://api.github.com/repos/farpostdesign/csv-importer/releases{/id}","created_at":"2015-07-09T04:14:59Z","updated_at":"2015-07-10T00:49:41Z","pushed_at":"2015-07-11T13:57:49Z","git_url":"git://github.com/farpostdesign/csv-importer.git","ssh_url":"git@github.com:farpostdesign/csv-importer.git","clone_url":"https://github.com/farpostdesign/csv-importer.git","svn_url":"https://github.com/farpostdesign/csv-importer","homepage":"","size":138,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"BrewhouseTeam:master","ref":"master","sha":"040f4de825411fc65253972bd087476a69fff8b2","user":{"login":"BrewhouseTeam","id":6540110,"avatar_url":"https://avatars.githubusercontent.com/u/6540110?v=3","gravatar_id":"","url":"https://api.github.com/users/BrewhouseTeam","html_url":"https://github.com/BrewhouseTeam","followers_url":"https://api.github.com/users/BrewhouseTeam/followers","following_url":"https://api.github.com/users/BrewhouseTeam/following{/other_user}","gists_url":"https://api.github.com/users/BrewhouseTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/BrewhouseTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrewhouseTeam/subscriptions","organizations_url":"https://api.github.com/users/BrewhouseTeam/orgs","repos_url":"https://api.github.com/users/BrewhouseTeam/repos","events_url":"https://api.github.com/users/BrewhouseTeam/events{/privacy}","received_events_url":"https://api.github.com/users/BrewhouseTeam/received_events","type":"Organization","site_admin":false},"repo":{"id":35689199,"name":"csv-importer","full_name":"BrewhouseTeam/csv-importer","owner":{"login":"BrewhouseTeam","id":6540110,"avatar_url":"https://avatars.githubusercontent.com/u/6540110?v=3","gravatar_id":"","url":"https://api.github.com/users/BrewhouseTeam","html_url":"https://github.com/BrewhouseTeam","followers_url":"https://api.github.com/users/BrewhouseTeam/followers","following_url":"https://api.github.com/users/BrewhouseTeam/following{/other_user}","gists_url":"https://api.github.com/users/BrewhouseTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/BrewhouseTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrewhouseTeam/subscriptions","organizations_url":"https://api.github.com/users/BrewhouseTeam/orgs","repos_url":"https://api.github.com/users/BrewhouseTeam/repos","events_url":"https://api.github.com/users/BrewhouseTeam/events{/privacy}","received_events_url":"https://api.github.com/users/BrewhouseTeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BrewhouseTeam/csv-importer","description":"CSV Import for humans","fork":false,"url":"https://api.github.com/repos/BrewhouseTeam/csv-importer","forks_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/forks","keys_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/teams","hooks_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/hooks","issue_events_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/events{/number}","events_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/events","assignees_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/assignees{/user}","branches_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/branches{/branch}","tags_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/tags","blobs_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/statuses/{sha}","languages_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/languages","stargazers_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/stargazers","contributors_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/contributors","subscribers_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/subscribers","subscription_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/subscription","commits_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/contents/{+path}","compare_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/merges","archive_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/downloads","issues_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues{/number}","pulls_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls{/number}","milestones_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/milestones{/number}","notifications_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/labels{/name}","releases_url":"https://api.github.com/repos/BrewhouseTeam/csv-importer/releases{/id}","created_at":"2015-05-15T18:09:31Z","updated_at":"2015-07-12T22:11:44Z","pushed_at":"2015-07-11T14:08:44Z","git_url":"git://github.com/BrewhouseTeam/csv-importer.git","ssh_url":"git@github.com:BrewhouseTeam/csv-importer.git","clone_url":"https://github.com/BrewhouseTeam/csv-importer.git","svn_url":"https://github.com/BrewhouseTeam/csv-importer","homepage":"","size":362,"stargazers_count":256,"watchers_count":256,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":11,"forks":9,"open_issues":11,"watchers":256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26"},"html":{"href":"https://github.com/BrewhouseTeam/csv-importer/pull/26"},"issue":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/26"},"comments":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/BrewhouseTeam/csv-importer/statuses/12a555b188227207486af1df18e48d5fd52c5189"}}}}