phillipadsmith/everycandidate.org — pull request #24 by iirving (2014-10-04 20:33:07+00:00)
Title: validate_domains now with more cow bells

how things original worked still works but will a bunch of new features, summarized thusly :

1. now it also checks the email and alt email have a valid email structure (didn't go too crazy but must be string@string.com) and the email domain exists.

2. a "list" flag ( -l 3,17,123 ) which only runs on the file rows listed in the comma separated list, so if you really only want to test a row you just fixed up.

3. a "skip flag ( -s 3,17,123 ) which skip those rows listed, when you really want to skip row numbers listed known to be trouble or blownup-y.

4. a "verbosely" flag ( -v ) which spits out a lot more details, may help you figure out why it thinks there is a error.

5. a "mail" flag ( -m ) only runs the email address field checks on users.

6. a "urll" flag ( -u ) only runs the url checks on users.

7. a "-h" flag which displays all the options

Note that all these flags can be used in combination with each other, like :+1:

$ruby _scripts/validate_domains.rb tdsb -l 2,3,4 -v -m -s 3

which would run the tdsb file but only rows 2 and 4 (skipping 3), only looks at email and give verbose output

hope this helps!