1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 07:47: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

@ -31,15 +31,6 @@ class FreshResume extends AbstractResume
###* Initialize the FreshResume from file. ###
open: ( file, opts ) ->
raw = FS.readFileSync file, 'utf8'
ret = this.parse raw, opts
@imp.file = file
ret
###* Initialize the the FreshResume from JSON string data. ###
parse: ( stringData, opts ) ->
@imp = @imp ? raw: stringData
@ -351,7 +342,7 @@ class FreshResume extends AbstractResume
Get the default (starter) sheet.
###
FreshResume.default = () ->
new FreshResume().parseJSON( require 'fresh-resume-starter' )
new FreshResume().parseJSON require('fresh-resume-starter').fresh

View File

@ -26,15 +26,6 @@ class JRSResume extends AbstractResume
###* Initialize the JSResume from file. ###
open: ( file, opts ) ->
raw = FS.readFileSync file, 'utf8'
ret = this.parse raw, opts
@imp.file = file
ret
###* Initialize the the JSResume from string. ###
parse: ( stringData, opts ) ->
@imp = @imp ? raw: stringData
@ -294,7 +285,7 @@ class JRSResume extends AbstractResume
###* Get the default (empty) sheet. ###
JRSResume.default = () ->
new JRSResume().open PATH.join( __dirname, 'empty-jrs.json'), 'Empty'
new JRSResume().parseJSON require('fresh-resume-starter').jrs