Comparing version 0.0.5 to 0.0.6
@@ -71,3 +71,6 @@ var fs = require('graceful-fs'); | ||
tree.forEach(function(item) { | ||
var to = options.toHash[item]; | ||
dirs[path.dirname(item)] = true; | ||
options.stats[path.dirname(item)] = fs.statSync(path.dirname(item)); | ||
options.toHash[path.dirname(item)] = path.dirname(to); | ||
}); | ||
@@ -84,2 +87,3 @@ | ||
var createDirs = function(dirs, to, options, callback) { | ||
@@ -246,5 +250,8 @@ var stack = new Stack(); | ||
proc(); | ||
} | ||
} else { | ||
callback('From should be a directory'); | ||
} | ||
}); | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"author": "Dav Glass <davglass@gmail.com>", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"dependencies": { | ||
@@ -23,4 +23,5 @@ "graceful-fs": "~1.1.14", | ||
"scripts": { | ||
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/*.js", | ||
"test": "istanbul cover --print both -- vows --spec ./tests/*.js" | ||
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/", | ||
"windows-test": "vows --spec ./tests/full.js", | ||
"test": "istanbul cover --print both -- vows --spec ./tests/full.js" | ||
}, | ||
@@ -27,0 +28,0 @@ "bugs": { "url" : "http://github.com/davglass/cpr/issues" }, |
@@ -226,2 +226,18 @@ var vows = require('vows'), | ||
} | ||
}, | ||
"should fail on from not a dir": { | ||
topic: function() { | ||
var self = this; | ||
cpr.cpr(__filename, path.join(to, 'does/not/matter'), function(err, status) { | ||
self.callback(null, { | ||
err: err, | ||
status: status | ||
}); | ||
}); | ||
}, | ||
"should return an error in the callback": function(topic) { | ||
assert.isUndefined(topic.status); | ||
assert.ok(topic.err); | ||
assert.equal('From should be a directory', topic.err); | ||
} | ||
} | ||
@@ -228,0 +244,0 @@ }; |
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
21942
492