Merge branch 'develop0.8'

This commit is contained in:
Luis Bosque
2012-10-03 16:42:03 +02:00
5 changed files with 399 additions and 16 deletions
+4
View File
@@ -1,3 +1,7 @@
1.0.0 (03/10/12)
-----
* Migrated to node 0.8.x.
0.9.0 (25/09/12)
-----
* External resources in CartoCSS
+15 -8
View File
@@ -7,7 +7,7 @@
* environments: [development, production]
*/
var cluster = require('cluster');
var Cluster = require('cluster2');
// sanity check
var ENV = process.argv[2]
@@ -34,12 +34,19 @@ var cartoData = require('./lib/cartodb/carto_data');
var Windshaft = require('windshaft');
var serverOptions = require('./lib/cartodb/server_options');
ws = CartodbWindshaft(serverOptions);
cluster(ws)
.use(cluster.logger('logs'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))
.set('workers', 1)
.listen(global.environment.port, global.environment.host);
var ws = CartodbWindshaft(serverOptions);
//.use(cluster.logger('logs'))
//.use(cluster.stats())
//.use(cluster.pidfiles('pids'))
var cluster = new Cluster({
port: global.environment.port,
monPort: global.environment.port+1,
noWorkers: 1 // .set('workers', 1)
});
cluster.listen(function(cb) {
cb(ws);
});
console.log("Windshaft tileserver started on port " + global.environment.port);
+356
View File
@@ -0,0 +1,356 @@
{
"name": "windshaft-cartodb",
"version": "0.2.0-dev",
"dependencies": {
"cluster2": {
"version": "0.3.5",
"dependencies": {
"express": {
"version": "2.5.11",
"dependencies": {
"connect": {
"version": "1.9.2",
"dependencies": {
"formidable": {
"version": "1.0.11"
}
}
},
"mime": {
"version": "1.2.4"
},
"qs": {
"version": "0.4.2"
},
"mkdirp": {
"version": "0.3.0"
}
}
},
"ejs": {
"version": "0.8.3"
},
"npm": {
"version": "1.1.62",
"dependencies": {
"semver": {
"version": "1.0.14"
},
"ini": {
"version": "1.0.4"
},
"slide": {
"version": "1.1.3"
},
"abbrev": {
"version": "1.0.3"
},
"graceful-fs": {
"version": "1.1.14"
},
"minimatch": {
"version": "0.2.6"
},
"nopt": {
"version": "2.0.0"
},
"rimraf": {
"version": "2.0.2"
},
"request": {
"version": "2.9.203",
"from": "git://github.com/isaacs/request"
},
"which": {
"version": "1.0.5"
},
"tar": {
"version": "0.1.13"
},
"fstream": {
"version": "0.1.19"
},
"block-stream": {
"version": "0.0.6"
},
"inherits": {
"version": "1.0.0",
"from": "git://github.com/isaacs/inherits"
},
"mkdirp": {
"version": "0.3.4"
},
"read": {
"version": "1.0.4",
"dependencies": {
"mute-stream": {
"version": "0.0.3"
}
}
},
"lru-cache": {
"version": "2.0.4"
},
"node-gyp": {
"version": "0.6.11"
},
"fstream-npm": {
"version": "0.1.2",
"dependencies": {
"fstream-ignore": {
"version": "0.0.5"
}
}
},
"uid-number": {
"version": "0.0.3"
},
"archy": {
"version": "0.0.2"
},
"chownr": {
"version": "0.0.1"
},
"npmlog": {
"version": "0.0.2"
},
"ansi": {
"version": "0.1.2"
},
"npm-registry-client": {
"version": "0.2.7"
},
"read-package-json": {
"version": "0.1.5"
},
"read-installed": {
"version": "0.0.2"
},
"glob": {
"version": "3.1.12"
},
"init-package-json": {
"version": "0.0.5",
"dependencies": {
"promzard": {
"version": "0.2.0"
}
}
},
"osenv": {
"version": "0.0.3"
},
"lockfile": {
"version": "0.2.1"
},
"retry": {
"version": "0.6.0"
},
"couch-login": {
"version": "0.1.12"
},
"once": {
"version": "1.1.1"
},
"npmconf": {
"version": "0.0.16",
"dependencies": {
"config-chain": {
"version": "1.1.2",
"dependencies": {
"proto-list": {
"version": "1.2.2"
}
}
}
}
},
"opener": {
"version": "1.3.0"
}
}
}
}
},
"node-varnish": {
"version": "0.1.1"
},
"underscore": {
"version": "1.1.7"
},
"grainstore": {
"version": "0.6.4",
"dependencies": {
"carto": {
"version": "0.8.2-cdb-dev-3",
"from": "git://github.com/CartoDB/carto.git#cdb-0.8",
"dependencies": {
"underscore": {
"version": "1.3.3"
},
"mapnik-reference": {
"version": "4.0.5"
},
"xml2js": {
"version": "0.1.14",
"dependencies": {
"sax": {
"version": "0.4.2"
}
}
}
}
},
"millstone": {
"version": "0.5.10-cdb-01",
"from": "git://github.com/CartoDB/millstone.git#cdb-node04-devel",
"dependencies": {
"underscore": {
"version": "1.3.3"
},
"request": {
"version": "2.11.4",
"dependencies": {
"form-data": {
"version": "0.0.3",
"dependencies": {
"combined-stream": {
"version": "0.0.3",
"dependencies": {
"delayed-stream": {
"version": "0.0.5"
}
}
},
"async": {
"version": "0.1.9"
}
}
},
"mime": {
"version": "1.2.7"
}
}
},
"srs": {
"version": "0.2.16"
},
"zipfile": {
"version": "0.3.2"
},
"sqlite3": {
"version": "2.1.5"
},
"mime": {
"version": "1.2.7"
},
"mkdirp": {
"version": "0.3.4"
}
}
}
}
},
"windshaft": {
"version": "0.5.8",
"dependencies": {
"underscore": {
"version": "1.3.3"
},
"express": {
"version": "2.5.11",
"dependencies": {
"connect": {
"version": "1.9.2",
"dependencies": {
"formidable": {
"version": "1.0.11"
}
}
},
"mime": {
"version": "1.2.4"
},
"qs": {
"version": "0.4.2"
},
"mkdirp": {
"version": "0.3.0"
}
}
},
"tilelive": {
"version": "4.3.1",
"dependencies": {
"optimist": {
"version": "0.3.4",
"dependencies": {
"wordwrap": {
"version": "0.0.2"
}
}
},
"sphericalmercator": {
"version": "1.0.2"
}
}
},
"tilelive-mapnik": {
"version": "0.3.3-dev",
"from": "git://github.com/Vizzuality/tilelive-mapnik.git#7df70554",
"dependencies": {
"mapnik": {
"version": "0.7.14"
},
"eio": {
"version": "0.1.0"
},
"sphericalmercator": {
"version": "1.0.2"
}
}
}
}
},
"step": {
"version": "0.0.5"
},
"generic-pool": {
"version": "1.0.12"
},
"redis": {
"version": "0.7.2"
},
"hiredis": {
"version": "0.1.14"
},
"request": {
"version": "2.9.202"
},
"mocha": {
"version": "1.2.1",
"dependencies": {
"commander": {
"version": "0.6.1"
},
"growl": {
"version": "1.5.1"
},
"jade": {
"version": "0.26.3",
"dependencies": {
"mkdirp": {
"version": "0.3.0"
}
}
},
"diff": {
"version": "1.0.2"
},
"debug": {
"version": "0.7.0"
}
}
}
}
}
+4 -5
View File
@@ -1,7 +1,7 @@
{
"private": true,
"name": "windshaft-cartodb",
"version": "0.1.0",
"version": "0.2.0-dev",
"description": "A map tile server for CartoDB",
"url": "https://github.com/Vizzuality/Windshaft-cartodb",
"licenses": [{
@@ -18,16 +18,15 @@
"email": "simon@vizzuality.com"
},
"dependencies": {
"connect": "1.8.7",
"cluster": "0.6.4",
"cluster2": "~0.3.1",
"node-varnish": "0.1.1",
"underscore" : "1.1.x",
"grainstore" : "~0.6.2",
"windshaft" : "~0.4.16",
"windshaft" : "~0.5.8",
"step": "0.0.x",
"generic-pool": "1.0.x",
"redis": "0.7.2",
"hiredis": "~0.1.12",
"hiredis": "~0.1.14",
"request": "2.9.202"
},
"devDependencies": {
+20 -3
View File
@@ -101,7 +101,19 @@ suite('server', function() {
data: querystring.stringify({style: '#my_table3{backgxxxxxround-color:#fff;}'})
},{
status: 500, // FIXME: should be 400 !
body: JSON.stringify(['style.mss:1:11 Unrecognized rule: backgxxxxxround-color'])
body: /Unrecognized rule: backgxxxxxround-color/
}, function() { done(); });
});
test("post'ing unparseable style returns 400 with error", function(done){
assert.response(server, {
url: '/tiles/my_table3/style?map_key=1234',
method: 'POST',
headers: {host: 'vizzuality.localhost.lan', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: '#my_table3{'})
},{
status: 500, // FIXME: should be 400 !
body: /Missing closing/
}, function() { done(); });
});
@@ -113,8 +125,13 @@ suite('server', function() {
data: querystring.stringify({style: '#my_table4{backgxxxxxround-color:#fff;foo:bar}'})
},{
status: 500, // FIXME: should be 400 !
body: JSON.stringify([ 'style.mss:1:11 Unrecognized rule: backgxxxxxround-color', 'style.mss:1:38 Unrecognized rule: foo' ])
}, function() { done(); });
}, function(res) {
var parsed = JSON.parse(res.body);
assert.equal(parsed.length, 2);
assert.ok( RegExp(/Unrecognized rule: backgxxxxxround-color/).test(parsed[0]) );
assert.ok( RegExp(/Unrecognized rule: foo/).test(parsed[1]) );
done();
});
});
test("post'ing good style returns 200", function(done){