From a7cc7ceeb83eed030080f18f39bacceb1e8e4cd8 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 12 Sep 2013 17:32:10 +0200 Subject: [PATCH] Fix error for invalid text-name in CartoCSS. Closes #81. --- NEWS.md | 1 + npm-shrinkwrap.json | 53 +++++++++++++++++++++++++++++++---- package.json | 2 +- test/acceptance/multilayer.js | 26 +++++++++++++++++ 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index ba28eb3f..aaff3a15 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * Fix "sql/table must contain zoom variable" error when using "[ zoom > 3]" CartoCSS snippets (note the space) * Fix backward compatibility handling of sqlapi.host configuration (#82) +* Fix error for invalid text-name in CartoCSS (#81) 1.3.4 ------ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 650bdd6a..707fc4ab 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -9,14 +9,14 @@ "version": "1.3.3" }, "windshaft": { - "version": "0.13.5", + "version": "0.13.6", "dependencies": { "grainstore": { - "version": "0.13.9", + "version": "0.13.10", "dependencies": { "carto": { - "version": "0.9.3-cdb4", - "from": "git://github.com/CartoDB/carto.git#cdb-0.9.3-cdb4", + "version": "0.9.3-cdb5", + "from": "git://github.com/CartoDB/carto.git#cdb-0.9.3-cdb5", "dependencies": { "mapnik-reference": { "version": "5.0.0-cdb1", @@ -125,7 +125,50 @@ "version": "0.4.0" }, "sqlite3": { - "version": "2.1.15" + "version": "2.1.17", + "dependencies": { + "progress": { + "version": "1.0.1" + }, + "tar.gz": { + "version": "0.1.1", + "dependencies": { + "fstream": { + "version": "0.1.24", + "dependencies": { + "rimraf": { + "version": "2.2.2" + }, + "graceful-fs": { + "version": "2.0.1" + }, + "inherits": { + "version": "2.0.1" + } + } + }, + "tar": { + "version": "0.1.18", + "dependencies": { + "inherits": { + "version": "2.0.1" + }, + "block-stream": { + "version": "0.0.7" + } + } + }, + "commander": { + "version": "1.1.1", + "dependencies": { + "keypress": { + "version": "0.1.0" + } + } + } + } + } + } }, "mime": { "version": "1.2.11" diff --git a/package.json b/package.json index a8deef6e..ef81f79d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "node-varnish": "0.1.1", "underscore" : "~1.3.3", - "windshaft" : "~0.13.5", + "windshaft" : "~0.13.6", "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 d9e15e6d..79650997 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer.js @@ -578,6 +578,32 @@ suite('multilayer', function() { ); }); + test("ticket #81", function(done) { + + var layergroup = { + version: '1.0.1', + layers: [ + { options: { + sql: "select 1 as cartodb_id, 'SRID=3857;POINT(0 0)'::geometry as the_geom_webmercator", + cartocss: '#sample { text-name: cartodb_id; text-face-name: "Dejagnu"; }', + cartocss_version: '2.1.1', + } } + ] + }; + + 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, 400, res.statusCode + ': ' + res.body); + var parsed = JSON.parse(res.body); + assert.deepEqual(parsed, {"errors":["style0:1:10 Invalid value for text-name, the type expression is expected. cartodb_id (of type keyword) was given."]}); + done(); + }); + }); + suiteTeardown(function(done) { // This test will add map_style records, like