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:
@ -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
|
||||
|
Reference in New Issue
Block a user