1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-09 19:51:07 +01:00

Cleanup and bug fixes.

Remove file-based open methods from resume classes; force clients to use
clean string-based or JSON overloads; fix processing glitch in
validate(); tweak outputs; adjust tests; update CHANGELOG; etc.
This commit is contained in:
hacksalot
2016-02-04 18:49:16 -05:00
parent 661fb91861
commit 2758038858
14 changed files with 90 additions and 62 deletions

View File

@ -70,7 +70,7 @@ _validateOne = (t, validator, schemas) ->
# Successfully read the resume. Now parse it as JSON.
json = obj.json
fmt = if json.basics then 'jrs' else 'fresh'
fmt = if json.basics then 'jars' else 'fresh'
errors = []
try
@ -78,6 +78,7 @@ _validateOne = (t, validator, schemas) ->
formats: { date: /^\d{4}(?:-(?:0[0-9]{1}|1[0-2]{1})(?:-[0-9]{2})?)?$/ }
};
ret.isValid = validate json
if !ret.isValid
errors = validate.errors
catch