Comparing version 0.0.7 to 0.0.8
0.0.8 / 2014-01-05 | ||
================== | ||
* Fix Node 0.11 error when path is frozen. | ||
0.0.7 / 2013-09-25 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -23,5 +23,5 @@ /** | ||
var normalize = function(path) { | ||
var last = Array.prototype.pop.apply(path); | ||
var last = path[path.length - 1]; | ||
if (process.platform !== "win32") { | ||
if (detector.platform() !== "win32") { | ||
if (last !== '/') { | ||
@@ -53,3 +53,3 @@ path += '/'; | ||
|| process.env.TEMP | ||
|| (process.platform === "win32" ? "c:\\windows\\temp\\" : "/tmp/") | ||
|| (detector.platform() === "win32" ? "c:\\windows\\temp\\" : "/tmp/") | ||
@@ -59,2 +59,11 @@ return normalize(temp); | ||
/** | ||
* Returns the platform. Allows Tests to verify all behaviors. | ||
* | ||
* @returns {String} platform. | ||
*/ | ||
detector.platform = function() { | ||
return process.platform; | ||
}; | ||
detector._normalize = normalize; |
{ | ||
"name": "temporary" | ||
, "version": "0.0.7" | ||
, "version": "0.0.8" | ||
, "description": "The lord of tmp." | ||
@@ -5,0 +5,0 @@ , "keywords": ["tmp", "temp", "tempfile", "tempdirectory"] |
@@ -24,5 +24,7 @@ /** | ||
it('should normalize windows paths correctly', function () { | ||
var platform_noConflict = process.platform; | ||
var platform_noConflict = detector.platform; | ||
process.platform = 'win32'; | ||
detector.platform = function() { | ||
return 'win32'; | ||
}; | ||
detector._normalize('c:\\windows\\foo\\bar\\') | ||
@@ -36,3 +38,3 @@ .should.eql('c:\\windows\\foo\\bar\\/'); | ||
.should.eql('c:\\windows\\foo\\bar/'); | ||
process.platform = platform_noConflict; | ||
detector.platform = platform_noConflict; | ||
}); | ||
@@ -39,0 +41,0 @@ |
Sorry, the diff of this file is not supported yet
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
19400
644