Rename sqlapi.host configuration to sqlapi.domain. Closes #79.

Support for "host" is retained for backward compatibility.
This commit is contained in:
Sandro Santilli 2013-08-21 10:11:30 +02:00
parent db951234aa
commit 633e8d164b
6 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,9 @@
1.3.4
------
NOTE: configuration sqlapi.host renamed to sqlapi.domain
(support for "sqlapi.host" is retained for backward compatibility)
* Improve empty CartoCSS error message
* Improve invalid mapnik-geometry-type CSS error message

View File

@ -55,7 +55,7 @@ var config = {
}
,sqlapi: {
protocol: 'http',
host: 'localhost.lan',
domain: 'localhost.lan',
port: 8080,
version: 'v1'
}

View File

@ -49,7 +49,7 @@ var config = {
}
,sqlapi: {
protocol: 'https',
host: 'cartodb.com',
domain: 'cartodb.com',
port: 8080,
version: 'v2'
}

View File

@ -49,7 +49,7 @@ var config = {
}
,sqlapi: {
protocol: 'https',
host: 'cartodb.com',
domain: 'cartodb.com',
port: 8080,
version: 'v2'
}

View File

@ -49,7 +49,7 @@ var config = {
}
,sqlapi: {
protocol: 'http',
host: '',
domain: '',
// This port will be used by "make check" for testing purposes
// It must be available
port: 1080,

View File

@ -8,6 +8,9 @@ var _ = require('underscore')
, LZMA = require('lzma/lzma_worker.js').LZMA
;
// This is for backward compatibility with 1.3.3
if ( ! global.environment.sqlapi.domain ) global.environment.sqlapi.host;
module.exports = function(){
var rendererConfig = _.defaults(global.environment.renderer || {}, {
@ -62,7 +65,7 @@ module.exports = function(){
var api = global.environment.sqlapi;
// build up api string
var sqlapi = api.protocol + '://' + username + '.' + api.host + ':' + api.port + '/api/' + api.version + '/sql'
var sqlapi = api.protocol + '://' + username + '.' + api.domain + ':' + api.port + '/api/' + api.version + '/sql'
var qs = { q: sql }