immp
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "immp", | ||
"description": "Image Manipulation Middleware Proxy", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"repository": "garrows/IMMP", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -73,3 +73,2 @@ var _ = require('underscore'), | ||
if (stat && now - createdAt < config.ttl) { | ||
_res.statusCode = 304; | ||
gm(config.cacheFolder + '/' + image.hash) | ||
@@ -76,0 +75,0 @@ .options(gmOptions) |
@@ -225,41 +225,2 @@ var async = require('async'), | ||
it('should invalidate the cache by using adding a timestamp to the query object', function(_done) { | ||
this.slow(5000); | ||
this.timeout(10000); | ||
var requestUrl = 'http://localhost:3000/im/?image=/images/robot.jpg&crop=16x19&resize=300x300'; | ||
async.waterfall([ | ||
function(_callback) { | ||
http.get(requestUrl, function(_httpResponse) { | ||
_httpResponse.statusCode.should.eql(200); | ||
_callback(); | ||
}); | ||
}, | ||
function(_callback) { | ||
http.get(requestUrl, function(_httpResponse) { | ||
_httpResponse.statusCode.should.eql(304); | ||
_callback(); | ||
}); | ||
}, | ||
function(_callback) { | ||
http.get(requestUrl + '&c=1', function(_httpResponse) { | ||
_httpResponse.statusCode.should.eql(200); | ||
_callback(); | ||
}); | ||
} | ||
], _done); | ||
}); | ||
}); |
14341
326