Fix use of blank-prefixed "zoom" variable in CartoCSS

This commit is contained in:
Sandro Santilli 2013-09-09 11:58:51 +02:00
parent 0f3a5501d4
commit 0414307679
4 changed files with 27 additions and 7 deletions

View File

@ -1,6 +1,9 @@
1.3.5
------
* Fix "sql/table must contain zoom variable" error when using
"[ zoom > 3]" CartoCSS snippets (note the space)
1.3.4
------

12
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "windshaft-cartodb",
"version": "1.3.4",
"version": "1.3.5",
"dependencies": {
"node-varnish": {
"version": "0.1.1"
@ -9,14 +9,14 @@
"version": "1.3.3"
},
"windshaft": {
"version": "0.13.4",
"version": "0.13.5",
"dependencies": {
"grainstore": {
"version": "0.13.8",
"version": "0.13.9",
"dependencies": {
"carto": {
"version": "0.9.3-cdb3",
"from": "git://github.com/CartoDB/carto.git#cdb-0.9.3-cdb3",
"version": "0.9.3-cdb4",
"from": "git://github.com/CartoDB/carto.git#cdb-0.9.3-cdb4",
"dependencies": {
"mapnik-reference": {
"version": "5.0.0-cdb1",
@ -40,7 +40,7 @@
"from": "git://github.com/CartoDB/millstone.git#cdb-0.6.0-cdb1",
"dependencies": {
"underscore": {
"version": "1.5.1"
"version": "1.5.2"
},
"request": {
"version": "2.26.0",

View File

@ -21,7 +21,7 @@
"dependencies": {
"node-varnish": "0.1.1",
"underscore" : "~1.3.3",
"windshaft" : "~0.13.4",
"windshaft" : "~0.13.5",
"step": "0.0.x",
"generic-pool": "~2.0.3",
"redis": "~0.8.3",

View File

@ -1020,6 +1020,23 @@ suite('server', function() {
);
});
// Zoom is a special variable
test("Specifying zoom level in CartoCSS does not need a 'zoom' variable in SQL output", function(done){
// NOTE: may fail if grainstore < 0.3.0 is used by Windshaft
var query = querystring.stringify({
sql: "SELECT 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator, 1::int as cartodb_id",
style: '#gadm4 [ zoom>=3] { marker-fill:red; }'
});
assert.response(server, {
headers: {host: 'localhost'},
url: '/tiles/gadm4/0/0/0.png?' + query,
method: 'GET'
},{}, function(res) {
assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body);
done();
});
});
/////////////////////////////////////////////////////////////////////////////////
//
// DELETE CACHE