From 23a7684208ead2212368ee050044f1f07990d08b Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 14 Aug 2014 18:27:54 +0200 Subject: [PATCH] Removes mapnik dependency as it now relies on Windshaft to check mapnik version --- NEWS.md | 5 +++++ lib/cartodb/server_options.js | 11 +---------- npm-shrinkwrap.json | 8 ++------ package.json | 3 +-- test/acceptance/multilayer.js | 1 - test/acceptance/server.js | 3 +-- test/acceptance/templates.js | 1 - 7 files changed, 10 insertions(+), 22 deletions(-) diff --git a/NEWS.md b/NEWS.md index af75e5df..ff3463cb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ 1.15.1 -- 2014-mm-dd -------------------- +Enhancements: + - Removes mapnik dependency as it now relies on Windshaft to check mapnik version + + 1.15.0 -- 2014-08-13 -------------------- Enhancements: @@ -11,6 +15,7 @@ Enhancements: - Specifies name in the redis pool - Slow pool configuration in example configurations + 1.14.0 -- 2014-08-07 -------------------- diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index d28588ae..f9f49eec 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -3,7 +3,6 @@ var _ = require('underscore') , cartoData = require('cartodb-redis')(global.environment.redis) , Cache = require('./cache_validator') , QueryTablesApi = require('./api/query_tables_api') - , mapnik = require('mapnik') , crypto = require('crypto') , LZMA = require('lzma/lzma_worker.js').LZMA ; @@ -48,7 +47,7 @@ module.exports = function(){ }, datasource: global.environment.postgres, cachedir: global.environment.millstone.cache_basedir, - mapnik_version: global.environment.mapnik_version || mapnik.versions.mapnik, + mapnik_version: global.environment.mapnik_version, mapnik_tile_format: global.environment.mapnik_tile_format || 'png', default_layergroup_ttl: global.environment.mapConfigTTL || 7200, gc_prob: 0.01 // @deprecated since Windshaft-1.8.0 @@ -75,14 +74,6 @@ module.exports = function(){ // See http://github.com/CartoDB/Windshaft-cartodb/issues/161 me.redis.unwatchOnRelease = false; - // Be nice and warn if configured mapnik version - // is != instaled mapnik version - if ( mapnik.versions.mapnik != me.grainstore.mapnik_version ) { - console.warn("WARNING: detected mapnik version (" - + mapnik.versions.mapnik + ") != configured mapnik version (" - + me.grainstore.mapnik_version + ")"); - } - /* This whole block is about generating X-Cache-Channel { */ // TODO: review lifetime of elements of this cache diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4aa0fd56..c3de925d 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -10,8 +10,8 @@ "version": "1.3.3" }, "windshaft": { - "version": "0.24.0", - "from": "https://github.com/CartoDB/Windshaft/tarball/0.24.0", + "version": "0.24.1", + "from": "https://github.com/CartoDB/Windshaft/tarball/0.24.1", "dependencies": { "grainstore": { "version": "0.20.0", @@ -957,10 +957,6 @@ } } }, - "mapnik": { - "version": "0.7.26-cdb1", - "from": "http://github.com/Vizzuality/node-mapnik/tarball/0.7.26-cdb1" - }, "lzma": { "version": "1.2.3" }, diff --git a/package.json b/package.json index 7b3695dd..fd97c6a3 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,11 @@ "dependencies": { "node-varnish": "http://github.com/Vizzuality/node-varnish/tarball/0.3.0", "underscore" : "~1.3.3", - "windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.24.0", + "windshaft": "https://github.com/CartoDB/Windshaft/tarball/0.24.1", "step": "~0.0.5", "request": "2.9.202", "cartodb-redis": "git://github.com/CartoDB/node-cartodb-redis.git#0.9.0", "redis-mpool": "https://github.com/CartoDB/node-redis-mpool/tarball/0.1.0", - "mapnik": "http://github.com/Vizzuality/node-mapnik/tarball/0.7.26-cdb1", "lzma": "~1.2.3", "log4js": "~0.6.10", "rollbar": "~0.3.1" diff --git a/test/acceptance/multilayer.js b/test/acceptance/multilayer.js index 89e4c25d..3c2235c2 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer.js @@ -4,7 +4,6 @@ var _ = require('underscore'); var redis = require('redis'); var querystring = require('querystring'); var semver = require('semver'); -var mapnik = require('mapnik'); var Step = require('step'); var strftime = require('strftime'); var SQLAPIEmu = require(__dirname + '/../support/SQLAPIEmu.js'); diff --git a/test/acceptance/server.js b/test/acceptance/server.js index 0a430dd1..88ecee1b 100644 --- a/test/acceptance/server.js +++ b/test/acceptance/server.js @@ -4,7 +4,6 @@ var _ = require('underscore'); var redis = require('redis'); var querystring = require('querystring'); var semver = require('semver'); -var mapnik = require('mapnik'); var Step = require('step'); var http = require('http'); var SQLAPIEmu = require(__dirname + '/../support/SQLAPIEmu.js'); @@ -24,7 +23,7 @@ suite('server', function() { var redis_client = redis.createClient(global.environment.redis.port); var sqlapi_server; - var mapnik_version = global.environment.mapnik_version || mapnik.versions.mapnik; + var mapnik_version = server.getVersion().mapnik; var test_database = _.template(global.environment.postgres_auth_user, {user_id:1}) + '_db'; var default_style; if ( semver.satisfies(mapnik_version, '<2.1.0') ) { diff --git a/test/acceptance/templates.js b/test/acceptance/templates.js index 085afad1..f73f5706 100644 --- a/test/acceptance/templates.js +++ b/test/acceptance/templates.js @@ -3,7 +3,6 @@ var _ = require('underscore'); var redis = require('redis'); var querystring = require('querystring'); var semver = require('semver'); -var mapnik = require('mapnik'); var Step = require('step'); var strftime = require('strftime'); var SQLAPIEmu = require(__dirname + '/../support/SQLAPIEmu.js');