From e2589b37307c16991a79ac0c89dab5632d396403 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Thu, 24 Dec 2015 03:23:56 -0500 Subject: [PATCH] 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. --- src/core/fresh-resume.js | 2 +- src/verbs/validate.js | 2 +- tests/test-fresh-sheet.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/fresh-resume.js b/src/core/fresh-resume.js index 261b1a8..68641f9 100644 --- a/src/core/fresh-resume.js +++ b/src/core/fresh-resume.js @@ -299,7 +299,7 @@ Definition of the FRESHResume class. Validate the sheet against the FRESH Resume schema. */ FreshResume.prototype.isValid = function( info ) { - var schemaObj = require('FRESCA'); + var schemaObj = require('fresca'); var validator = require('is-my-json-valid'); var validate = validator( schemaObj, { // Note [1] formats: { date: /^\d{4}(?:-(?:0[0-9]{1}|1[0-2]{1})(?:-[0-9]{2})?)?$/ } diff --git a/src/verbs/validate.js b/src/verbs/validate.js index f5fb3be..52bd6da 100644 --- a/src/verbs/validate.js +++ b/src/verbs/validate.js @@ -15,7 +15,7 @@ var validator = require('is-my-json-valid'); var schemas = { - fresh: require('FRESCA'), + fresh: require('fresca'), jars: require('../core/resume.json') }; diff --git a/tests/test-fresh-sheet.js b/tests/test-fresh-sheet.js index 955c924..f35487d 100644 --- a/tests/test-fresh-sheet.js +++ b/tests/test-fresh-sheet.js @@ -55,7 +55,7 @@ describe('jane-doe.json (FRESH)', function () { it('should validate against the FRESH resume schema', function() { var result = _sheet.isValid(); - // var schemaJson = require('FRESCA'); + // var schemaJson = require('fresca'); // var validate = validator( schemaJson, { verbose: true } ); // var result = validate( JSON.parse( _sheet.imp.raw ) ); result || console.log("\n\nOops, resume didn't validate. " +