Comparing version 1.3.8 to 1.3.9
@@ -52,3 +52,3 @@ /* wrench.js | ||
var fileList = readdirSyncRecursive(baseDir).map(function(val){ | ||
return val.replace(baseDir + '/', ''); | ||
return _path.relative(baseDir, val); | ||
}); | ||
@@ -110,3 +110,3 @@ | ||
// convert absolute paths to relative | ||
return val.replace(baseDir + '/', ''); | ||
return _path.relative(baseDir, val); | ||
})); | ||
@@ -113,0 +113,0 @@ |
{ | ||
"name": "wrench", | ||
"description": "Recursive filesystem (and other) operations that Node *should* have.", | ||
"version": "1.3.8", | ||
"version": "1.3.9", | ||
"author": "Ryan McGrath <ryan@venodesigns.net>", | ||
@@ -24,4 +24,3 @@ | ||
"devDependencies": { | ||
"nodeunit": ">= 0.6.4", | ||
"underscore": ">= 1.3.1" | ||
"nodeunit": ">= 0.6.4" | ||
}, | ||
@@ -35,3 +34,3 @@ | ||
"scripts": { "test": "./node_modules/nodeunit/bin/nodeunit tests/runner.js" }, | ||
"scripts": { "test": "nodeunit tests/runner.js" }, | ||
@@ -38,0 +37,0 @@ "licenses": [{ |
@@ -5,3 +5,2 @@ var testCase = require('nodeunit').testCase; | ||
var path = require('path'); | ||
var _und = require("underscore"); | ||
@@ -13,14 +12,10 @@ | ||
'foo', | ||
'foo/bar', | ||
'foo/dolor.md', | ||
'foo/lorem.txt', | ||
'foo/bar/ipsum.js' | ||
path.join('foo', 'bar'), | ||
path.join('foo', 'dolor.md'), | ||
path.join('foo', 'lorem.txt'), | ||
path.join('foo', 'bar', 'ipsum.js') | ||
]; | ||
test.equals(files.length, check.length, 'number of paths is correct'); | ||
test.deepEqual(files, check); | ||
_und.each(check, function(it) { | ||
test.ok(_und.include(files, it), 'path ' + it + ' should be returned'); | ||
}); | ||
test.done(); | ||
@@ -31,3 +26,3 @@ } | ||
test_readdirSyncRecursive: function(test) { | ||
var dir = __dirname + '/readdir'; | ||
var dir = path.join(__dirname, 'readdir'); | ||
@@ -42,3 +37,3 @@ test.ok(path.existsSync(dir), 'Folders should exist'); | ||
test_readdirRecursive: function(test) { | ||
var dir = __dirname + '/readdir'; | ||
var dir = path.join(__dirname, 'readdir'); | ||
@@ -45,0 +40,0 @@ test.ok(path.existsSync(dir), 'Folders should exist'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
19253
395