pcreux / csv-importer

CSV Import for humans on Ruby / Ruby on Rails
MIT License
590 stars 67 forks source link

Make valid_header? handle MalformedCSVErrors #85

Closed mltsy closed 5 years ago

mltsy commented 5 years ago

When you call run! on an import with an invalid CSV, it handles MalformedCSVErrors nicely, by returning a report with an error status. When you call valid_headers? it just raises an exception. This is not what I'd expect. I'd expect a false response, and a report with a similar error status. So this does that!

pcreux commented 5 years ago

Sweet! Thank you for fixing this? If it's easy to add a regression test for that... please do!

mltsy commented 5 years ago

(Sorry I wasn't able to add tests for these PRs - I saved the e-mail thinking I'd find some time, but I didn't and they fell off my radar!)

pcreux commented 5 years ago

@mltsy Don't worry, I'm not good at that either. Thank you for your contribution!