1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-25 18:00:11 +00:00

Fix validate command error.

Still hitting some inconsistent behavior in different NPM
versions/platforms with invalid uppercase dependency names per
https://github.com/npm/npm/issues/3692. Partial fix for #33.
This commit is contained in:
hacksalot 2015-12-24 03:23:56 -05:00
parent ebad1677bc
commit e2589b3730
3 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ Definition of the FRESHResume class.
Validate the sheet against the FRESH Resume schema. Validate the sheet against the FRESH Resume schema.
*/ */
FreshResume.prototype.isValid = function( info ) { FreshResume.prototype.isValid = function( info ) {
var schemaObj = require('FRESCA'); var schemaObj = require('fresca');
var validator = require('is-my-json-valid'); var validator = require('is-my-json-valid');
var validate = validator( schemaObj, { // Note [1] var validate = validator( schemaObj, { // Note [1]
formats: { date: /^\d{4}(?:-(?:0[0-9]{1}|1[0-2]{1})(?:-[0-9]{2})?)?$/ } formats: { date: /^\d{4}(?:-(?:0[0-9]{1}|1[0-2]{1})(?:-[0-9]{2})?)?$/ }

View File

@ -15,7 +15,7 @@
var validator = require('is-my-json-valid'); var validator = require('is-my-json-valid');
var schemas = { var schemas = {
fresh: require('FRESCA'), fresh: require('fresca'),
jars: require('../core/resume.json') jars: require('../core/resume.json')
}; };

View File

@ -55,7 +55,7 @@ describe('jane-doe.json (FRESH)', function () {
it('should validate against the FRESH resume schema', function() { it('should validate against the FRESH resume schema', function() {
var result = _sheet.isValid(); var result = _sheet.isValid();
// var schemaJson = require('FRESCA'); // var schemaJson = require('fresca');
// var validate = validator( schemaJson, { verbose: true } ); // var validate = validator( schemaJson, { verbose: true } );
// var result = validate( JSON.parse( _sheet.imp.raw ) ); // var result = validate( JSON.parse( _sheet.imp.raw ) );
result || console.log("\n\nOops, resume didn't validate. " + result || console.log("\n\nOops, resume didn't validate. " +