From 3e6070bd9bcfd58d00f47d62894c43442cd550b5 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 8 Nov 2013 12:34:34 +0100 Subject: [PATCH] Fix support for exponential notation in CartoCSS filter values Closes #87. Includes testcase --- NEWS.md | 2 ++ npm-shrinkwrap.json | 17 +++++++---------- package.json | 2 +- test/acceptance/multilayer.js | 23 +++++++++++++++++++++++ 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2e825292..2a7a5838 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ 1.4.1 -- 2013-MM-DD ------------------- +* Fix support for exponential notation in CartoCSS filter values (#87) + 1.4.0 -- 2013-10-31 ------------------- diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 924362be..3de2c43e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "windshaft-cartodb", - "version": "1.4.0", + "version": "1.4.1", "dependencies": { "node-varnish": { "version": "0.1.1" @@ -9,14 +9,14 @@ "version": "1.3.3" }, "windshaft": { - "version": "0.14.1", + "version": "0.14.2", "dependencies": { "grainstore": { - "version": "0.14.1", + "version": "0.14.2", "dependencies": { "carto": { - "version": "0.9.5-cdb1", - "from": "git://github.com/CartoDB/carto.git#0.9.5-cdb1", + "version": "0.9.5-cdb2", + "from": "git://github.com/CartoDB/carto.git#0.9.5-cdb2", "dependencies": { "underscore": { "version": "1.4.4" @@ -128,17 +128,14 @@ } }, "srs": { - "version": "0.3.6" + "version": "0.3.8" }, "zipfile": { "version": "0.4.2" }, "sqlite3": { - "version": "2.1.18", + "version": "2.1.19", "dependencies": { - "progress": { - "version": "1.0.1" - }, "tar.gz": { "version": "0.1.1", "dependencies": { diff --git a/package.json b/package.json index e6426a71..dab62462 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "node-varnish": "0.1.1", "underscore" : "~1.3.3", - "windshaft" : "~0.14.1", + "windshaft" : "~0.14.2", "step": "0.0.x", "generic-pool": "~2.0.3", "redis": "~0.8.3", diff --git a/test/acceptance/multilayer.js b/test/acceptance/multilayer.js index bd6957c5..516401a8 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer.js @@ -682,6 +682,29 @@ suite('multilayer', function() { }); }); + // See https://github.com/CartoDB/Windshaft-cartodb/issues/87 + test("exponential notation in CartoCSS filter values", function(done) { + var layergroup = { + version: '1.0.1', + layers: [ + { options: { + sql: "select .4 as n, 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator", + cartocss: '#s [n<=.2e-2] { marker-fill:red; }', + cartocss_version: '2.1.0', + } } + ] + }; + assert.response(server, { + url: '/tiles/layergroup?', + method: 'POST', + headers: {host: 'localhost', 'Content-Type': 'application/json' }, + data: JSON.stringify(layergroup) + }, {}, function(res) { + assert.equal(res.statusCode, 200, res.statusCode + ': ' + res.body); + done(); + }); + }); + suiteTeardown(function(done) { // This test will add map_style records, like