From 39dce5b2495b99b05d7f2694b91d22935a72af1e Mon Sep 17 00:00:00 2001 From: moos Date: Wed, 30 May 2012 17:10:44 -0700 Subject: [PATCH] fix relative paths --- bin/wordpos-cli.js | 5 ++--- spec/validate_spec.js | 11 ++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/wordpos-cli.js b/bin/wordpos-cli.js index a19e506..e024c38 100644 --- a/bin/wordpos-cli.js +++ b/bin/wordpos-cli.js @@ -17,9 +17,8 @@ var program = require('commander'), _ = require('underscore')._, fs = require('fs'), POS = {noun:'Noun', adj:'Adjective', verb:'Verb', adv:'Adverb'}, - version = JSON.parse(fs.readFileSync('../package.json', 'utf8')).version - nWords, - ; + version = JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version, + nWords; program .version(version) diff --git a/spec/validate_spec.js b/spec/validate_spec.js index 02eb6e0..5c01a16 100644 --- a/spec/validate_spec.js +++ b/spec/validate_spec.js @@ -13,27 +13,28 @@ * Released under MIT license */ var - exec = require('child_process').exec; + exec = require('child_process').exec, + cmd = 'node ' + __dirname + '/../tools/validate '; describe('validate isX() using fastIndex', function() { it('should validate index.noun', function() { - exec('node ../tools/validate index.noun', callback); + exec(cmd + 'index.noun', callback); asyncSpecWait(); }); it('should validate index.verb', function() { - exec('node ../tools/validate index.verb', callback); + exec(cmd + 'index.verb', callback); asyncSpecWait(); }); it('should validate index.adv', function() { - exec('node ../tools/validate index.adv', callback); + exec(cmd + 'index.adv', callback); asyncSpecWait(); }); it('should validate index.adj', function() { - exec('node ../tools/validate index.adj', callback); + exec(cmd + 'index.adj', callback); asyncSpecWait(); });