diff --git a/README.md b/README.md index 79a17cbd..f6f0bdde 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Create the config/environments/.js files (there are .example files to start from). You can optionally use the ./configure script for this, see ```./configure --help``` to see available options. -Look at lib/cartodb/server_options.js for more on config +Look at lib/cartodb/server-options.js for more on config Upgrading --------- diff --git a/app.js b/app.js index 0864c7fc..e8cd445b 100755 --- a/app.js +++ b/app.js @@ -6,7 +6,7 @@ var path = require('path'); var fs = require('fs'); var _ = require('underscore'); var semver = require('semver'); -const setICUEnvVariable = require('./lib/cartodb/utils/icu_data_env_setter'); +const setICUEnvVariable = require('./lib/utils/icu-data-env-setter'); // jshint undef:false var log = console.log.bind(console); @@ -24,11 +24,11 @@ if (!semver.satisfies(nodejsVersion, engines.node)) { setICUEnvVariable(); var argv = require('yargs') - .usage('Usage: $0 [options]') + .usage('Usage: node $0 [options]') .help('h') .example( - '$0 production -c /etc/sql-api/config.js', - 'start server in production environment with /etc/sql-api/config.js as config file' + 'node $0 production -c /etc/windshaft-cartodb/config.js', + 'start server in production environment with /etc/windshaft-cartodb/config.js as config file' ) .alias('h', 'help') .alias('c', 'config') @@ -105,8 +105,8 @@ global.logger = global.log4js.getLogger(); // Include cartodb_windshaft only _after_ the "global" variable is set // See https://github.com/Vizzuality/Windshaft-cartodb/issues/28 -var cartodbWindshaft = require('./lib/cartodb/server'); -var serverOptions = require('./lib/cartodb/server_options'); +var cartodbWindshaft = require('./lib/server'); +var serverOptions = require('./lib/server-options'); var server = cartodbWindshaft(serverOptions); diff --git a/lib/cartodb/api/api-router.js b/lib/api/api-router.js similarity index 96% rename from lib/cartodb/api/api-router.js rename to lib/api/api-router.js index 08e5072d..9349a515 100644 --- a/lib/cartodb/api/api-router.js +++ b/lib/api/api-router.js @@ -7,12 +7,12 @@ const cartodbRedis = require('cartodb-redis'); const windshaft = require('windshaft'); -const PgConnection = require('../backends/pg_connection'); +const PgConnection = require('../backends/pg-connection'); const AnalysisBackend = require('../backends/analysis'); const AnalysisStatusBackend = require('../backends/analysis-status'); const DataviewBackend = require('../backends/dataview'); -const TemplateMaps = require('../backends/template_maps.js'); -const PgQueryRunner = require('../backends/pg_query_runner'); +const TemplateMaps = require('../backends/template-maps'); +const PgQueryRunner = require('../backends/pg-query-runner'); const StatsBackend = require('../backends/stats'); const AuthBackend = require('../backends/auth'); @@ -23,12 +23,12 @@ const TablesExtentBackend = require('../backends/tables-extent'); const ClusterBackend = require('../backends/cluster'); -const LayergroupAffectedTablesCache = require('../cache/layergroup_affected_tables'); -const SurrogateKeysCache = require('../cache/surrogate_keys_cache'); -const VarnishHttpCacheBackend = require('../cache/backend/varnish_http'); +const LayergroupAffectedTablesCache = require('../cache/layergroup-affected-tables'); +const SurrogateKeysCache = require('../cache/surrogate-keys-cache'); +const VarnishHttpCacheBackend = require('../cache/backend/varnish-http'); const FastlyCacheBackend = require('../cache/backend/fastly'); -const NamedMapProviderCache = require('../cache/named_map_provider_cache'); -const NamedMapsCacheEntry = require('../cache/model/named_maps_entry'); +const NamedMapProviderCache = require('../cache/named-map-provider-cache'); +const NamedMapsCacheEntry = require('../cache/model/named-maps-entry'); const NamedMapProviderReporter = require('../stats/reporter/named-map-provider'); const SqlWrapMapConfigAdapter = require('../models/mapconfig/adapter/sql-wrap-mapconfig-adapter'); @@ -282,7 +282,7 @@ function createSurrogateKeysCacheBackends(serverOptions) { return cacheBackends; } -const timeoutErrorTilePath = __dirname + '/../../../assets/render-timeout-fallback.png'; +const timeoutErrorTilePath = __dirname + '/../../assets/render-timeout-fallback.png'; const timeoutErrorTile = require('fs').readFileSync(timeoutErrorTilePath, {encoding: null}); function createRendererFactory ({ redisPool, serverOptions, environmentOptions }) { diff --git a/lib/cartodb/api/map/analyses-catalog-controller.js b/lib/api/map/analyses-catalog-controller.js similarity index 100% rename from lib/cartodb/api/map/analyses-catalog-controller.js rename to lib/api/map/analyses-catalog-controller.js diff --git a/lib/cartodb/api/map/analysis-layergroup-controller.js b/lib/api/map/analysis-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/analysis-layergroup-controller.js rename to lib/api/map/analysis-layergroup-controller.js diff --git a/lib/cartodb/api/map/anonymous-map-controller.js b/lib/api/map/anonymous-map-controller.js similarity index 100% rename from lib/cartodb/api/map/anonymous-map-controller.js rename to lib/api/map/anonymous-map-controller.js diff --git a/lib/cartodb/api/map/attributes-layergroup-controller.js b/lib/api/map/attributes-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/attributes-layergroup-controller.js rename to lib/api/map/attributes-layergroup-controller.js diff --git a/lib/cartodb/api/map/clustered-features-layergroup-controller.js b/lib/api/map/clustered-features-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/clustered-features-layergroup-controller.js rename to lib/api/map/clustered-features-layergroup-controller.js diff --git a/lib/cartodb/api/map/dataview-layergroup-controller.js b/lib/api/map/dataview-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/dataview-layergroup-controller.js rename to lib/api/map/dataview-layergroup-controller.js diff --git a/lib/cartodb/api/map/map-router.js b/lib/api/map/map-router.js similarity index 100% rename from lib/cartodb/api/map/map-router.js rename to lib/api/map/map-router.js diff --git a/lib/cartodb/api/map/preview-layergroup-controller.js b/lib/api/map/preview-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/preview-layergroup-controller.js rename to lib/api/map/preview-layergroup-controller.js diff --git a/lib/cartodb/api/map/preview-template-controller.js b/lib/api/map/preview-template-controller.js similarity index 100% rename from lib/cartodb/api/map/preview-template-controller.js rename to lib/api/map/preview-template-controller.js diff --git a/lib/cartodb/api/map/tile-layergroup-controller.js b/lib/api/map/tile-layergroup-controller.js similarity index 100% rename from lib/cartodb/api/map/tile-layergroup-controller.js rename to lib/api/map/tile-layergroup-controller.js diff --git a/lib/cartodb/api/middlewares/augment-layergroup-data.js b/lib/api/middlewares/augment-layergroup-data.js similarity index 100% rename from lib/cartodb/api/middlewares/augment-layergroup-data.js rename to lib/api/middlewares/augment-layergroup-data.js diff --git a/lib/cartodb/api/middlewares/authorize.js b/lib/api/middlewares/authorize.js similarity index 100% rename from lib/cartodb/api/middlewares/authorize.js rename to lib/api/middlewares/authorize.js diff --git a/lib/cartodb/api/middlewares/cache-channel-header.js b/lib/api/middlewares/cache-channel-header.js similarity index 100% rename from lib/cartodb/api/middlewares/cache-channel-header.js rename to lib/api/middlewares/cache-channel-header.js diff --git a/lib/cartodb/api/middlewares/cache-control-header.js b/lib/api/middlewares/cache-control-header.js similarity index 100% rename from lib/cartodb/api/middlewares/cache-control-header.js rename to lib/api/middlewares/cache-control-header.js diff --git a/lib/cartodb/api/middlewares/check-json-content-type.js b/lib/api/middlewares/check-json-content-type.js similarity index 100% rename from lib/cartodb/api/middlewares/check-json-content-type.js rename to lib/api/middlewares/check-json-content-type.js diff --git a/lib/cartodb/api/middlewares/check-static-image-format.js b/lib/api/middlewares/check-static-image-format.js similarity index 100% rename from lib/cartodb/api/middlewares/check-static-image-format.js rename to lib/api/middlewares/check-static-image-format.js diff --git a/lib/cartodb/api/middlewares/clean-up-query-params.js b/lib/api/middlewares/clean-up-query-params.js similarity index 100% rename from lib/cartodb/api/middlewares/clean-up-query-params.js rename to lib/api/middlewares/clean-up-query-params.js diff --git a/lib/cartodb/api/middlewares/coordinates.js b/lib/api/middlewares/coordinates.js similarity index 100% rename from lib/cartodb/api/middlewares/coordinates.js rename to lib/api/middlewares/coordinates.js diff --git a/lib/cartodb/api/middlewares/cors.js b/lib/api/middlewares/cors.js similarity index 100% rename from lib/cartodb/api/middlewares/cors.js rename to lib/api/middlewares/cors.js diff --git a/lib/cartodb/api/middlewares/credentials.js b/lib/api/middlewares/credentials.js similarity index 100% rename from lib/cartodb/api/middlewares/credentials.js rename to lib/api/middlewares/credentials.js diff --git a/lib/cartodb/api/middlewares/db-conn-setup.js b/lib/api/middlewares/db-conn-setup.js similarity index 100% rename from lib/cartodb/api/middlewares/db-conn-setup.js rename to lib/api/middlewares/db-conn-setup.js diff --git a/lib/cartodb/api/middlewares/error-middleware.js b/lib/api/middlewares/error-middleware.js similarity index 100% rename from lib/cartodb/api/middlewares/error-middleware.js rename to lib/api/middlewares/error-middleware.js diff --git a/lib/cartodb/api/middlewares/increment-map-view-count.js b/lib/api/middlewares/increment-map-view-count.js similarity index 100% rename from lib/cartodb/api/middlewares/increment-map-view-count.js rename to lib/api/middlewares/increment-map-view-count.js diff --git a/lib/cartodb/api/middlewares/init-profiler.js b/lib/api/middlewares/init-profiler.js similarity index 100% rename from lib/cartodb/api/middlewares/init-profiler.js rename to lib/api/middlewares/init-profiler.js diff --git a/lib/cartodb/api/middlewares/initialize-status-code.js b/lib/api/middlewares/initialize-status-code.js similarity index 100% rename from lib/cartodb/api/middlewares/initialize-status-code.js rename to lib/api/middlewares/initialize-status-code.js diff --git a/lib/cartodb/api/middlewares/last-modified-header.js b/lib/api/middlewares/last-modified-header.js similarity index 100% rename from lib/cartodb/api/middlewares/last-modified-header.js rename to lib/api/middlewares/last-modified-header.js diff --git a/lib/cartodb/api/middlewares/last-updated-time-layergroup.js b/lib/api/middlewares/last-updated-time-layergroup.js similarity index 100% rename from lib/cartodb/api/middlewares/last-updated-time-layergroup.js rename to lib/api/middlewares/last-updated-time-layergroup.js diff --git a/lib/cartodb/api/middlewares/layer-stats.js b/lib/api/middlewares/layer-stats.js similarity index 100% rename from lib/cartodb/api/middlewares/layer-stats.js rename to lib/api/middlewares/layer-stats.js diff --git a/lib/cartodb/api/middlewares/layergroup-id-header.js b/lib/api/middlewares/layergroup-id-header.js similarity index 100% rename from lib/cartodb/api/middlewares/layergroup-id-header.js rename to lib/api/middlewares/layergroup-id-header.js diff --git a/lib/cartodb/api/middlewares/layergroup-metadata.js b/lib/api/middlewares/layergroup-metadata.js similarity index 100% rename from lib/cartodb/api/middlewares/layergroup-metadata.js rename to lib/api/middlewares/layergroup-metadata.js diff --git a/lib/cartodb/api/middlewares/layergroup-token.js b/lib/api/middlewares/layergroup-token.js similarity index 100% rename from lib/cartodb/api/middlewares/layergroup-token.js rename to lib/api/middlewares/layergroup-token.js diff --git a/lib/cartodb/api/middlewares/logger.js b/lib/api/middlewares/logger.js similarity index 100% rename from lib/cartodb/api/middlewares/logger.js rename to lib/api/middlewares/logger.js diff --git a/lib/cartodb/api/middlewares/lzma.js b/lib/api/middlewares/lzma.js similarity index 100% rename from lib/cartodb/api/middlewares/lzma.js rename to lib/api/middlewares/lzma.js diff --git a/lib/cartodb/api/middlewares/map-error.js b/lib/api/middlewares/map-error.js similarity index 100% rename from lib/cartodb/api/middlewares/map-error.js rename to lib/api/middlewares/map-error.js diff --git a/lib/cartodb/api/middlewares/map-store-map-config-provider.js b/lib/api/middlewares/map-store-map-config-provider.js similarity index 100% rename from lib/cartodb/api/middlewares/map-store-map-config-provider.js rename to lib/api/middlewares/map-store-map-config-provider.js diff --git a/lib/cartodb/api/middlewares/named-map-provider.js b/lib/api/middlewares/named-map-provider.js similarity index 100% rename from lib/cartodb/api/middlewares/named-map-provider.js rename to lib/api/middlewares/named-map-provider.js diff --git a/lib/cartodb/api/middlewares/noop.js b/lib/api/middlewares/noop.js similarity index 100% rename from lib/cartodb/api/middlewares/noop.js rename to lib/api/middlewares/noop.js diff --git a/lib/cartodb/api/middlewares/rate-limit.js b/lib/api/middlewares/rate-limit.js similarity index 100% rename from lib/cartodb/api/middlewares/rate-limit.js rename to lib/api/middlewares/rate-limit.js diff --git a/lib/cartodb/api/middlewares/send-response.js b/lib/api/middlewares/send-response.js similarity index 100% rename from lib/cartodb/api/middlewares/send-response.js rename to lib/api/middlewares/send-response.js diff --git a/lib/cartodb/api/middlewares/served-by-host-header.js b/lib/api/middlewares/served-by-host-header.js similarity index 100% rename from lib/cartodb/api/middlewares/served-by-host-header.js rename to lib/api/middlewares/served-by-host-header.js diff --git a/lib/cartodb/api/middlewares/stats.js b/lib/api/middlewares/stats.js similarity index 93% rename from lib/cartodb/api/middlewares/stats.js rename to lib/api/middlewares/stats.js index 51dbdf53..24facbcf 100644 --- a/lib/cartodb/api/middlewares/stats.js +++ b/lib/api/middlewares/stats.js @@ -1,6 +1,6 @@ 'use strict'; -const Profiler = require('../../stats/profiler_proxy'); +const Profiler = require('../../stats/profiler-proxy'); const debug = require('debug')('windshaft:cartodb:stats'); const onHeaders = require('on-headers'); diff --git a/lib/cartodb/api/middlewares/surrogate-key-header.js b/lib/api/middlewares/surrogate-key-header.js similarity index 93% rename from lib/cartodb/api/middlewares/surrogate-key-header.js rename to lib/api/middlewares/surrogate-key-header.js index f616b009..b4b6c922 100644 --- a/lib/cartodb/api/middlewares/surrogate-key-header.js +++ b/lib/api/middlewares/surrogate-key-header.js @@ -1,6 +1,6 @@ 'use strict'; -const NamedMapsCacheEntry = require('../../cache/model/named_maps_entry'); +const NamedMapsCacheEntry = require('../../cache/model/named-maps-entry'); const NamedMapMapConfigProvider = require('../../models/mapconfig/provider/named-map-provider'); module.exports = function setSurrogateKeyHeader ({ surrogateKeysCache }) { diff --git a/lib/cartodb/api/middlewares/syntax-error.js b/lib/api/middlewares/syntax-error.js similarity index 100% rename from lib/cartodb/api/middlewares/syntax-error.js rename to lib/api/middlewares/syntax-error.js diff --git a/lib/cartodb/api/middlewares/user.js b/lib/api/middlewares/user.js similarity index 80% rename from lib/cartodb/api/middlewares/user.js rename to lib/api/middlewares/user.js index 4dda75e7..17a85260 100644 --- a/lib/cartodb/api/middlewares/user.js +++ b/lib/api/middlewares/user.js @@ -1,6 +1,6 @@ 'use strict'; -const CdbRequest = require('../../models/cdb_request'); +const CdbRequest = require('../../models/cdb-request'); module.exports = function user () { const cdbRequest = new CdbRequest(); diff --git a/lib/cartodb/api/middlewares/vector-error.js b/lib/api/middlewares/vector-error.js similarity index 95% rename from lib/cartodb/api/middlewares/vector-error.js rename to lib/api/middlewares/vector-error.js index 4de1ebce..6e69f982 100644 --- a/lib/cartodb/api/middlewares/vector-error.js +++ b/lib/api/middlewares/vector-error.js @@ -1,7 +1,7 @@ 'use strict'; const fs = require('fs'); -const timeoutErrorVectorTile = fs.readFileSync(__dirname + '/../../../../assets/render-timeout-fallback.mvt'); +const timeoutErrorVectorTile = fs.readFileSync(__dirname + '/../../../assets/render-timeout-fallback.mvt'); module.exports = function vectorError() { return function vectorErrorMiddleware(err, req, res, next) { diff --git a/lib/cartodb/api/template/admin-template-controller.js b/lib/api/template/admin-template-controller.js similarity index 99% rename from lib/cartodb/api/template/admin-template-controller.js rename to lib/api/template/admin-template-controller.js index 2416afe2..082d4f34 100644 --- a/lib/cartodb/api/template/admin-template-controller.js +++ b/lib/api/template/admin-template-controller.js @@ -1,6 +1,6 @@ 'use strict'; -const { templateName } = require('../../backends/template_maps'); +const { templateName } = require('../../backends/template-maps'); const credentials = require('../middlewares/credentials'); const rateLimit = require('../middlewares/rate-limit'); const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimit; diff --git a/lib/cartodb/api/template/named-template-controller.js b/lib/api/template/named-template-controller.js similarity index 100% rename from lib/cartodb/api/template/named-template-controller.js rename to lib/api/template/named-template-controller.js diff --git a/lib/cartodb/api/template/template-router.js b/lib/api/template/template-router.js similarity index 100% rename from lib/cartodb/api/template/template-router.js rename to lib/api/template/template-router.js diff --git a/lib/cartodb/api/template/tile-template-controller.js b/lib/api/template/tile-template-controller.js similarity index 100% rename from lib/cartodb/api/template/tile-template-controller.js rename to lib/api/template/tile-template-controller.js diff --git a/lib/cartodb/backends/analysis-status.js b/lib/backends/analysis-status.js similarity index 100% rename from lib/cartodb/backends/analysis-status.js rename to lib/backends/analysis-status.js diff --git a/lib/cartodb/backends/analysis.js b/lib/backends/analysis.js similarity index 100% rename from lib/cartodb/backends/analysis.js rename to lib/backends/analysis.js diff --git a/lib/cartodb/backends/auth.js b/lib/backends/auth.js similarity index 100% rename from lib/cartodb/backends/auth.js rename to lib/backends/auth.js diff --git a/lib/cartodb/backends/cluster.js b/lib/backends/cluster.js similarity index 100% rename from lib/cartodb/backends/cluster.js rename to lib/backends/cluster.js diff --git a/lib/cartodb/backends/dataview.js b/lib/backends/dataview.js similarity index 99% rename from lib/cartodb/backends/dataview.js rename to lib/backends/dataview.js index acdf24a7..86ead292 100644 --- a/lib/cartodb/backends/dataview.js +++ b/lib/backends/dataview.js @@ -6,7 +6,7 @@ var BBoxFilter = require('../models/filter/bbox'); var DataviewFactory = require('../models/dataview/factory'); var DataviewFactoryWithOverviews = require('../models/dataview/overviews/factory'); const dbParamsFromReqParams = require('../utils/database-params'); -var OverviewsQueryRewriter = require('../utils/overviews_query_rewriter'); +var OverviewsQueryRewriter = require('../utils/overviews-query-rewriter'); var overviewsQueryRewriter = new OverviewsQueryRewriter({ zoom_level: 'CDB_ZoomFromScale(!scale_denominator!)' }); diff --git a/lib/cartodb/backends/filter-stats.js b/lib/backends/filter-stats.js similarity index 100% rename from lib/cartodb/backends/filter-stats.js rename to lib/backends/filter-stats.js diff --git a/lib/cartodb/backends/layer-stats/empty-layer-stats.js b/lib/backends/layer-stats/empty-layer-stats.js similarity index 100% rename from lib/cartodb/backends/layer-stats/empty-layer-stats.js rename to lib/backends/layer-stats/empty-layer-stats.js diff --git a/lib/cartodb/backends/layer-stats/factory.js b/lib/backends/layer-stats/factory.js similarity index 100% rename from lib/cartodb/backends/layer-stats/factory.js rename to lib/backends/layer-stats/factory.js diff --git a/lib/cartodb/backends/layer-stats/layer-stats.js b/lib/backends/layer-stats/layer-stats.js similarity index 100% rename from lib/cartodb/backends/layer-stats/layer-stats.js rename to lib/backends/layer-stats/layer-stats.js diff --git a/lib/cartodb/backends/layer-stats/mapnik-layer-stats.js b/lib/backends/layer-stats/mapnik-layer-stats.js similarity index 100% rename from lib/cartodb/backends/layer-stats/mapnik-layer-stats.js rename to lib/backends/layer-stats/mapnik-layer-stats.js diff --git a/lib/cartodb/backends/layer-stats/torque-layer-stats.js b/lib/backends/layer-stats/torque-layer-stats.js similarity index 100% rename from lib/cartodb/backends/layer-stats/torque-layer-stats.js rename to lib/backends/layer-stats/torque-layer-stats.js diff --git a/lib/cartodb/backends/overviews-metadata.js b/lib/backends/overviews-metadata.js similarity index 100% rename from lib/cartodb/backends/overviews-metadata.js rename to lib/backends/overviews-metadata.js diff --git a/lib/cartodb/backends/pg_connection.js b/lib/backends/pg-connection.js similarity index 100% rename from lib/cartodb/backends/pg_connection.js rename to lib/backends/pg-connection.js diff --git a/lib/cartodb/backends/pg_query_runner.js b/lib/backends/pg-query-runner.js similarity index 100% rename from lib/cartodb/backends/pg_query_runner.js rename to lib/backends/pg-query-runner.js diff --git a/lib/cartodb/backends/stats.js b/lib/backends/stats.js similarity index 100% rename from lib/cartodb/backends/stats.js rename to lib/backends/stats.js diff --git a/lib/cartodb/backends/tables-extent.js b/lib/backends/tables-extent.js similarity index 100% rename from lib/cartodb/backends/tables-extent.js rename to lib/backends/tables-extent.js diff --git a/lib/cartodb/backends/template_maps.js b/lib/backends/template-maps.js similarity index 100% rename from lib/cartodb/backends/template_maps.js rename to lib/backends/template-maps.js diff --git a/lib/cartodb/backends/turbo-carto-postgres-datasource.js b/lib/backends/turbo-carto-postgres-datasource.js similarity index 100% rename from lib/cartodb/backends/turbo-carto-postgres-datasource.js rename to lib/backends/turbo-carto-postgres-datasource.js diff --git a/lib/cartodb/backends/user-limits.js b/lib/backends/user-limits.js similarity index 100% rename from lib/cartodb/backends/user-limits.js rename to lib/backends/user-limits.js diff --git a/lib/cartodb/cache/backend/fastly.js b/lib/cache/backend/fastly.js similarity index 100% rename from lib/cartodb/cache/backend/fastly.js rename to lib/cache/backend/fastly.js diff --git a/lib/cartodb/cache/backend/varnish_http.js b/lib/cache/backend/varnish-http.js similarity index 100% rename from lib/cartodb/cache/backend/varnish_http.js rename to lib/cache/backend/varnish-http.js diff --git a/lib/cartodb/cache/layergroup_affected_tables.js b/lib/cache/layergroup-affected-tables.js similarity index 100% rename from lib/cartodb/cache/layergroup_affected_tables.js rename to lib/cache/layergroup-affected-tables.js diff --git a/lib/cartodb/cache/model/named_maps_entry.js b/lib/cache/model/named-maps-entry.js similarity index 100% rename from lib/cartodb/cache/model/named_maps_entry.js rename to lib/cache/model/named-maps-entry.js diff --git a/lib/cartodb/cache/named_map_provider_cache.js b/lib/cache/named-map-provider-cache.js similarity index 97% rename from lib/cartodb/cache/named_map_provider_cache.js rename to lib/cache/named-map-provider-cache.js index ea24f2f5..844a2038 100644 --- a/lib/cartodb/cache/named_map_provider_cache.js +++ b/lib/cache/named-map-provider-cache.js @@ -3,7 +3,7 @@ const LruCache = require('lru-cache'); const NamedMapMapConfigProvider = require('../models/mapconfig/provider/named-map-provider'); -const { templateName } = require('../backends/template_maps'); +const { templateName } = require('../backends/template-maps'); const TEN_MINUTES_IN_MILLISECONDS = 1000 * 60 * 10; const ACTIONS = ['update', 'delete']; diff --git a/lib/cartodb/cache/surrogate_keys_cache.js b/lib/cache/surrogate-keys-cache.js similarity index 100% rename from lib/cartodb/cache/surrogate_keys_cache.js rename to lib/cache/surrogate-keys-cache.js diff --git a/lib/cartodb/models/aggregation/aggregation-mapconfig.js b/lib/models/aggregation/aggregation-mapconfig.js similarity index 100% rename from lib/cartodb/models/aggregation/aggregation-mapconfig.js rename to lib/models/aggregation/aggregation-mapconfig.js diff --git a/lib/cartodb/models/aggregation/aggregation-query.js b/lib/models/aggregation/aggregation-query.js similarity index 100% rename from lib/cartodb/models/aggregation/aggregation-query.js rename to lib/models/aggregation/aggregation-query.js diff --git a/lib/cartodb/models/aggregation/aggregation-validator.js b/lib/models/aggregation/aggregation-validator.js similarity index 100% rename from lib/cartodb/models/aggregation/aggregation-validator.js rename to lib/models/aggregation/aggregation-validator.js diff --git a/lib/cartodb/models/aggregation/time-dimension.js b/lib/models/aggregation/time-dimension.js similarity index 100% rename from lib/cartodb/models/aggregation/time-dimension.js rename to lib/models/aggregation/time-dimension.js diff --git a/lib/cartodb/models/cdb_request.js b/lib/models/cdb-request.js similarity index 100% rename from lib/cartodb/models/cdb_request.js rename to lib/models/cdb-request.js diff --git a/lib/cartodb/models/dataview/aggregation.js b/lib/models/dataview/aggregation.js similarity index 100% rename from lib/cartodb/models/dataview/aggregation.js rename to lib/models/dataview/aggregation.js diff --git a/lib/cartodb/models/dataview/base.js b/lib/models/dataview/base.js similarity index 100% rename from lib/cartodb/models/dataview/base.js rename to lib/models/dataview/base.js diff --git a/lib/cartodb/models/dataview/factory.js b/lib/models/dataview/factory.js similarity index 94% rename from lib/cartodb/models/dataview/factory.js rename to lib/models/dataview/factory.js index 729305fc..bd035270 100644 --- a/lib/cartodb/models/dataview/factory.js +++ b/lib/models/dataview/factory.js @@ -1,6 +1,6 @@ 'use strict'; -const dataviews = require('./'); +const dataviews = require('.'); module.exports = class DataviewFactory { static get dataviews() { diff --git a/lib/cartodb/models/dataview/formula.js b/lib/models/dataview/formula.js similarity index 100% rename from lib/cartodb/models/dataview/formula.js rename to lib/models/dataview/formula.js diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/models/dataview/histogram.js similarity index 100% rename from lib/cartodb/models/dataview/histogram.js rename to lib/models/dataview/histogram.js diff --git a/lib/cartodb/models/dataview/histograms/base-histogram.js b/lib/models/dataview/histograms/base-histogram.js similarity index 100% rename from lib/cartodb/models/dataview/histograms/base-histogram.js rename to lib/models/dataview/histograms/base-histogram.js diff --git a/lib/cartodb/models/dataview/histograms/date-histogram.js b/lib/models/dataview/histograms/date-histogram.js similarity index 100% rename from lib/cartodb/models/dataview/histograms/date-histogram.js rename to lib/models/dataview/histograms/date-histogram.js diff --git a/lib/cartodb/models/dataview/histograms/numeric-histogram.js b/lib/models/dataview/histograms/numeric-histogram.js similarity index 100% rename from lib/cartodb/models/dataview/histograms/numeric-histogram.js rename to lib/models/dataview/histograms/numeric-histogram.js diff --git a/lib/cartodb/models/dataview/index.js b/lib/models/dataview/index.js similarity index 100% rename from lib/cartodb/models/dataview/index.js rename to lib/models/dataview/index.js diff --git a/lib/cartodb/models/dataview/overviews/aggregation.js b/lib/models/dataview/overviews/aggregation.js similarity index 100% rename from lib/cartodb/models/dataview/overviews/aggregation.js rename to lib/models/dataview/overviews/aggregation.js diff --git a/lib/cartodb/models/dataview/overviews/base.js b/lib/models/dataview/overviews/base.js similarity index 100% rename from lib/cartodb/models/dataview/overviews/base.js rename to lib/models/dataview/overviews/base.js diff --git a/lib/cartodb/models/dataview/overviews/factory.js b/lib/models/dataview/overviews/factory.js similarity index 97% rename from lib/cartodb/models/dataview/overviews/factory.js rename to lib/models/dataview/overviews/factory.js index 1a402f88..c67aea8e 100644 --- a/lib/cartodb/models/dataview/overviews/factory.js +++ b/lib/models/dataview/overviews/factory.js @@ -1,7 +1,7 @@ 'use strict'; var parentFactory = require('../factory'); -var dataviews = require('./'); +var dataviews = require('.'); function OverviewsDataviewFactory(queryRewriter, queryRewriteData, options) { this.queryRewriter = queryRewriter; diff --git a/lib/cartodb/models/dataview/overviews/formula.js b/lib/models/dataview/overviews/formula.js similarity index 100% rename from lib/cartodb/models/dataview/overviews/formula.js rename to lib/models/dataview/overviews/formula.js diff --git a/lib/cartodb/models/dataview/overviews/histogram.js b/lib/models/dataview/overviews/histogram.js similarity index 100% rename from lib/cartodb/models/dataview/overviews/histogram.js rename to lib/models/dataview/overviews/histogram.js diff --git a/lib/cartodb/models/dataview/overviews/index.js b/lib/models/dataview/overviews/index.js similarity index 100% rename from lib/cartodb/models/dataview/overviews/index.js rename to lib/models/dataview/overviews/index.js diff --git a/lib/cartodb/models/filter/analysis.js b/lib/models/filter/analysis.js similarity index 100% rename from lib/cartodb/models/filter/analysis.js rename to lib/models/filter/analysis.js diff --git a/lib/cartodb/models/filter/analysis/category.js b/lib/models/filter/analysis/category.js similarity index 100% rename from lib/cartodb/models/filter/analysis/category.js rename to lib/models/filter/analysis/category.js diff --git a/lib/cartodb/models/filter/analysis/range.js b/lib/models/filter/analysis/range.js similarity index 100% rename from lib/cartodb/models/filter/analysis/range.js rename to lib/models/filter/analysis/range.js diff --git a/lib/cartodb/models/filter/bbox.js b/lib/models/filter/bbox.js similarity index 100% rename from lib/cartodb/models/filter/bbox.js rename to lib/models/filter/bbox.js diff --git a/lib/cartodb/models/layergroup-token.js b/lib/models/layergroup-token.js similarity index 100% rename from lib/cartodb/models/layergroup-token.js rename to lib/models/layergroup-token.js diff --git a/lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js b/lib/models/mapconfig/adapter/aggregation-mapconfig-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js rename to lib/models/mapconfig/adapter/aggregation-mapconfig-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/analysis-mapconfig-adapter.js b/lib/models/mapconfig/adapter/analysis-mapconfig-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/analysis-mapconfig-adapter.js rename to lib/models/mapconfig/adapter/analysis-mapconfig-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/dataviews-widgets-adapter.js b/lib/models/mapconfig/adapter/dataviews-widgets-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/dataviews-widgets-adapter.js rename to lib/models/mapconfig/adapter/dataviews-widgets-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/index.js b/lib/models/mapconfig/adapter/index.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/index.js rename to lib/models/mapconfig/adapter/index.js diff --git a/lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js b/lib/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js rename to lib/models/mapconfig/adapter/mapconfig-buffer-size-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/mapconfig-named-layers-adapter.js b/lib/models/mapconfig/adapter/mapconfig-named-layers-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/mapconfig-named-layers-adapter.js rename to lib/models/mapconfig/adapter/mapconfig-named-layers-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/mapconfig-overviews-adapter.js b/lib/models/mapconfig/adapter/mapconfig-overviews-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/mapconfig-overviews-adapter.js rename to lib/models/mapconfig/adapter/mapconfig-overviews-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/sql-wrap-mapconfig-adapter.js b/lib/models/mapconfig/adapter/sql-wrap-mapconfig-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/sql-wrap-mapconfig-adapter.js rename to lib/models/mapconfig/adapter/sql-wrap-mapconfig-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/turbo-carto-adapter.js b/lib/models/mapconfig/adapter/turbo-carto-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/turbo-carto-adapter.js rename to lib/models/mapconfig/adapter/turbo-carto-adapter.js diff --git a/lib/cartodb/models/mapconfig/adapter/vector-mapconfig-adapter.js b/lib/models/mapconfig/adapter/vector-mapconfig-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/adapter/vector-mapconfig-adapter.js rename to lib/models/mapconfig/adapter/vector-mapconfig-adapter.js diff --git a/lib/cartodb/models/mapconfig/provider/base-mapconfig-adapter.js b/lib/models/mapconfig/provider/base-mapconfig-adapter.js similarity index 100% rename from lib/cartodb/models/mapconfig/provider/base-mapconfig-adapter.js rename to lib/models/mapconfig/provider/base-mapconfig-adapter.js diff --git a/lib/cartodb/models/mapconfig/provider/create-layergroup-provider.js b/lib/models/mapconfig/provider/create-layergroup-provider.js similarity index 100% rename from lib/cartodb/models/mapconfig/provider/create-layergroup-provider.js rename to lib/models/mapconfig/provider/create-layergroup-provider.js diff --git a/lib/cartodb/models/mapconfig/provider/map-store-provider.js b/lib/models/mapconfig/provider/map-store-provider.js similarity index 100% rename from lib/cartodb/models/mapconfig/provider/map-store-provider.js rename to lib/models/mapconfig/provider/map-store-provider.js diff --git a/lib/cartodb/models/mapconfig/provider/named-map-provider.js b/lib/models/mapconfig/provider/named-map-provider.js similarity index 99% rename from lib/cartodb/models/mapconfig/provider/named-map-provider.js rename to lib/models/mapconfig/provider/named-map-provider.js index 292e5dcb..4b235986 100644 --- a/lib/cartodb/models/mapconfig/provider/named-map-provider.js +++ b/lib/models/mapconfig/provider/named-map-provider.js @@ -4,7 +4,7 @@ const BaseMapConfigProvider = require('./base-mapconfig-adapter'); const crypto = require('crypto'); const dot = require('dot'); const MapConfig = require('windshaft').model.MapConfig; -const templateName = require('../../../backends/template_maps').templateName; +const templateName = require('../../../backends/template-maps').templateName; // Configure bases for cache keys suitable for string interpolation const baseKey = '{{=it.dbname}}:{{=it.user}}:{{=it.templateName}}'; diff --git a/lib/cartodb/models/resource-locator.js b/lib/models/resource-locator.js similarity index 100% rename from lib/cartodb/models/resource-locator.js rename to lib/models/resource-locator.js diff --git a/lib/cartodb/monitoring/health_check.js b/lib/monitoring/health-check.js similarity index 100% rename from lib/cartodb/monitoring/health_check.js rename to lib/monitoring/health-check.js diff --git a/lib/cartodb/server-info-controller.js b/lib/server-info-controller.js similarity index 96% rename from lib/cartodb/server-info-controller.js rename to lib/server-info-controller.js index 5fbabb26..fe1f1a19 100644 --- a/lib/cartodb/server-info-controller.js +++ b/lib/server-info-controller.js @@ -1,6 +1,6 @@ 'use strict'; -var HealthCheck = require('./monitoring/health_check'); +var HealthCheck = require('./monitoring/health-check'); var WELCOME_MSG = "This is the CartoDB Maps API, " + "see the documentation at http://docs.cartodb.com/cartodb-platform/maps-api.html"; diff --git a/lib/cartodb/server_options.js b/lib/server-options.js similarity index 94% rename from lib/cartodb/server_options.js rename to lib/server-options.js index 226153c5..5dc7b72d 100644 --- a/lib/cartodb/server_options.js +++ b/lib/server-options.js @@ -2,7 +2,7 @@ const fqdn = require('@carto/fqdn-sync'); var _ = require('underscore'); -var OverviewsQueryRewriter = require('./utils/overviews_query_rewriter'); +var OverviewsQueryRewriter = require('./utils/overviews-query-rewriter'); var rendererConfig = _.defaults(global.environment.renderer || {}, { cache_ttl: 60000, // milliseconds @@ -81,7 +81,12 @@ const routesConfig = global.environment.routes || { }] }; -if (!Array.isArray(routesConfig.api)) { +if (routesConfig.v1 && !Array.isArray(routesConfig.v1)) { + routesConfig.api = [ routesConfig.v1 ]; + delete routesConfig.v1; +} + +if (routesConfig.api && !Array.isArray(routesConfig.api)) { routesConfig.api = [ routesConfig.api ]; } diff --git a/lib/cartodb/server.js b/lib/server.js similarity index 98% rename from lib/cartodb/server.js rename to lib/server.js index 01e68391..9f7b7ee0 100644 --- a/lib/cartodb/server.js +++ b/lib/server.js @@ -68,7 +68,7 @@ function mapnikVersion(opts) { function getAndValidateVersions(options) { var warn = console.warn.bind(console); // jshint ignore:line - var packageDefinition = require('../../package.json'); + var packageDefinition = require('../package.json'); var declaredDependencies = packageDefinition.dependencies || {}; var installedDependenciesVersions = { diff --git a/lib/cartodb/stats/client.js b/lib/stats/client.js similarity index 100% rename from lib/cartodb/stats/client.js rename to lib/stats/client.js diff --git a/lib/cartodb/stats/profiler_proxy.js b/lib/stats/profiler-proxy.js similarity index 100% rename from lib/cartodb/stats/profiler_proxy.js rename to lib/stats/profiler-proxy.js diff --git a/lib/cartodb/stats/reporter/named-map-provider.js b/lib/stats/reporter/named-map-provider.js similarity index 100% rename from lib/cartodb/stats/reporter/named-map-provider.js rename to lib/stats/reporter/named-map-provider.js diff --git a/lib/cartodb/stats/reporter/renderer.js b/lib/stats/reporter/renderer.js similarity index 100% rename from lib/cartodb/stats/reporter/renderer.js rename to lib/stats/reporter/renderer.js diff --git a/lib/cartodb/stats/timer.js b/lib/stats/timer.js similarity index 100% rename from lib/cartodb/stats/timer.js rename to lib/stats/timer.js diff --git a/lib/cartodb/utils/database-params.js b/lib/utils/database-params.js similarity index 100% rename from lib/cartodb/utils/database-params.js rename to lib/utils/database-params.js diff --git a/lib/cartodb/utils/date-wrapper.js b/lib/utils/date-wrapper.js similarity index 100% rename from lib/cartodb/utils/date-wrapper.js rename to lib/utils/date-wrapper.js diff --git a/lib/cartodb/utils/icu_data_env_setter.js b/lib/utils/icu-data-env-setter.js similarity index 100% rename from lib/cartodb/utils/icu_data_env_setter.js rename to lib/utils/icu-data-env-setter.js diff --git a/lib/cartodb/utils/json-replacer.js b/lib/utils/json-replacer.js similarity index 100% rename from lib/cartodb/utils/json-replacer.js rename to lib/utils/json-replacer.js diff --git a/lib/cartodb/utils/layergroup-metadata.js b/lib/utils/layergroup-metadata.js similarity index 100% rename from lib/cartodb/utils/layergroup-metadata.js rename to lib/utils/layergroup-metadata.js diff --git a/lib/cartodb/utils/overviews_query_rewriter.js b/lib/utils/overviews-query-rewriter.js similarity index 99% rename from lib/cartodb/utils/overviews_query_rewriter.js rename to lib/utils/overviews-query-rewriter.js index cf61b070..82164d6d 100644 --- a/lib/cartodb/utils/overviews_query_rewriter.js +++ b/lib/utils/overviews-query-rewriter.js @@ -1,7 +1,7 @@ 'use strict'; var _ = require('underscore'); -var TableNameParser = require('./table_name_parser'); +var TableNameParser = require('./table-name-parser'); var BBoxFilter = require('../models/filter/bbox'); var AnalysisFilter = require('../models/filter/analysis'); diff --git a/lib/cartodb/utils/query-utils.js b/lib/utils/query-utils.js similarity index 100% rename from lib/cartodb/utils/query-utils.js rename to lib/utils/query-utils.js diff --git a/lib/cartodb/utils/substitution-tokens.js b/lib/utils/substitution-tokens.js similarity index 100% rename from lib/cartodb/utils/substitution-tokens.js rename to lib/utils/substitution-tokens.js diff --git a/lib/cartodb/utils/table_name_parser.js b/lib/utils/table-name-parser.js similarity index 100% rename from lib/cartodb/utils/table_name_parser.js rename to lib/utils/table-name-parser.js diff --git a/test/acceptance/aggregation.js b/test/acceptance/aggregation-test.js similarity index 99% rename from test/acceptance/aggregation.js rename to test/acceptance/aggregation-test.js index 7bc5e6de..e1975f8a 100644 --- a/test/acceptance/aggregation.js +++ b/test/acceptance/aggregation-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const WebMercatorHelper = require('cartodb-query-tables').utils.webMercatorHelper; const webmercator = new WebMercatorHelper(); diff --git a/test/acceptance/analysis/analyses-controller.js b/test/acceptance/analysis/analyses-controller-test.js similarity index 98% rename from test/acceptance/analysis/analyses-controller.js rename to test/acceptance/analysis/analyses-controller-test.js index 6ed0808b..04aea78c 100644 --- a/test/acceptance/analysis/analyses-controller.js +++ b/test/acceptance/analysis/analyses-controller-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/analyses-filters-params.js b/test/acceptance/analysis/analyses-filters-params-test.js similarity index 99% rename from test/acceptance/analysis/analyses-filters-params.js rename to test/acceptance/analysis/analyses-filters-params-test.js index 21fd8f01..342fcb4d 100644 --- a/test/acceptance/analysis/analyses-filters-params.js +++ b/test/acceptance/analysis/analyses-filters-params-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); const assert = require('../../support/assert'); const TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/analyses-filters.js b/test/acceptance/analysis/analyses-filters-test.js similarity index 98% rename from test/acceptance/analysis/analyses-filters.js rename to test/acceptance/analysis/analyses-filters-test.js index ff86855f..5e8390e2 100644 --- a/test/acceptance/analysis/analyses-filters.js +++ b/test/acceptance/analysis/analyses-filters-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); const assert = require('../../support/assert'); const TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/analysis-layers-dataviews.js b/test/acceptance/analysis/analysis-layers-dataviews-test.js similarity index 99% rename from test/acceptance/analysis/analysis-layers-dataviews.js rename to test/acceptance/analysis/analysis-layers-dataviews-test.js index 7a35607f..95436185 100644 --- a/test/acceptance/analysis/analysis-layers-dataviews.js +++ b/test/acceptance/analysis/analysis-layers-dataviews-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/analysis-layers.js b/test/acceptance/analysis/analysis-layers-test.js similarity index 99% rename from test/acceptance/analysis/analysis-layers.js rename to test/acceptance/analysis/analysis-layers-test.js index b7eeac48..2c871a3b 100644 --- a/test/acceptance/analysis/analysis-layers.js +++ b/test/acceptance/analysis/analysis-layers-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/analysis-layers-use-cases.js b/test/acceptance/analysis/analysis-layers-use-cases-test.js similarity index 99% rename from test/acceptance/analysis/analysis-layers-use-cases.js rename to test/acceptance/analysis/analysis-layers-use-cases-test.js index cc10c7dc..d765ae4e 100644 --- a/test/acceptance/analysis/analysis-layers-use-cases.js +++ b/test/acceptance/analysis/analysis-layers-use-cases-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/error-cases.js b/test/acceptance/analysis/error-cases-test.js similarity index 99% rename from test/acceptance/analysis/error-cases.js rename to test/acceptance/analysis/error-cases-test.js index 5c610dde..eeb8d3e3 100644 --- a/test/acceptance/analysis/error-cases.js +++ b/test/acceptance/analysis/error-cases-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/analysis/named-maps.js b/test/acceptance/analysis/named-maps-test.js similarity index 97% rename from test/acceptance/analysis/named-maps.js rename to test/acceptance/analysis/named-maps-test.js index dd34b7dd..5a092a11 100644 --- a/test/acceptance/analysis/named-maps.js +++ b/test/acceptance/analysis/named-maps-test.js @@ -2,13 +2,13 @@ var assert = require('../../support/assert'); -var helper = require('../../support/test_helper'); +var helper = require('../../support/test-helper'); -var CartodbWindshaft = require('../../../lib/cartodb/server'); -var serverOptions = require('../../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../../lib/server'); +var serverOptions = require('../../../lib/server-options'); var TestClient = require('../../support/test-client'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('named-maps analysis', function() { var server; diff --git a/test/acceptance/analysis/regressions.js b/test/acceptance/analysis/regressions-test.js similarity index 99% rename from test/acceptance/analysis/regressions.js rename to test/acceptance/analysis/regressions-test.js index 72fd9a35..c1758a20 100644 --- a/test/acceptance/analysis/regressions.js +++ b/test/acceptance/analysis/regressions-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/auth/authorization-basic-use-cases.js b/test/acceptance/auth/authorization-basic-use-cases-test.js similarity index 95% rename from test/acceptance/auth/authorization-basic-use-cases.js rename to test/acceptance/auth/authorization-basic-use-cases-test.js index d0c3a17c..491b81b0 100644 --- a/test/acceptance/auth/authorization-basic-use-cases.js +++ b/test/acceptance/auth/authorization-basic-use-cases-test.js @@ -1,10 +1,10 @@ 'use strict'; const assert = require('../../support/assert'); -const testHelper = require('../../support/test_helper'); -const CartodbWindshaft = require('../../../lib/cartodb/server'); -const serverOptions = require('../../../lib/cartodb/server_options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +const testHelper = require('../../support/test-helper'); +const CartodbWindshaft = require('../../../lib/server'); +const serverOptions = require('../../../lib/server-options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); function singleLayergroupConfig(sql, cartocss) { return { diff --git a/test/acceptance/auth/authorization.js b/test/acceptance/auth/authorization-test.js similarity index 99% rename from test/acceptance/auth/authorization.js rename to test/acceptance/auth/authorization-test.js index 7fff7aa3..62384d84 100644 --- a/test/acceptance/auth/authorization.js +++ b/test/acceptance/auth/authorization-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); const assert = require('../../support/assert'); const TestClient = require('../../support/test-client'); diff --git a/test/acceptance/buffer-size-format.js b/test/acceptance/buffer-size-format-test.js similarity index 99% rename from test/acceptance/buffer-size-format.js rename to test/acceptance/buffer-size-format-test.js index e3daf626..62d19ccc 100644 --- a/test/acceptance/buffer-size-format.js +++ b/test/acceptance/buffer-size-format-test.js @@ -1,11 +1,11 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var fs = require('fs'); var assert = require('../support/assert'); var TestClient = require('../support/test-client'); -var serverOptions = require('../../lib/cartodb/server_options'); +var serverOptions = require('../../lib/server-options'); var mapnik = require('windshaft').mapnik; var IMAGE_TOLERANCE_PER_MIL = 5; diff --git a/test/acceptance/cache/cache-control-header.js b/test/acceptance/cache/cache-control-header-test.js similarity index 99% rename from test/acceptance/cache/cache-control-header.js rename to test/acceptance/cache/cache-control-header-test.js index 5a738700..d3b89863 100644 --- a/test/acceptance/cache/cache-control-header.js +++ b/test/acceptance/cache/cache-control-header-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); const assert = require('../../support/assert'); const TestClient = require('../../support/test-client'); diff --git a/test/acceptance/cache/cache_headers.js b/test/acceptance/cache/cache-headers-test.js similarity index 98% rename from test/acceptance/cache/cache_headers.js rename to test/acceptance/cache/cache-headers-test.js index 46a22026..974a60ff 100644 --- a/test/acceptance/cache/cache_headers.js +++ b/test/acceptance/cache/cache-headers-test.js @@ -1,14 +1,14 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var qs = require('querystring'); -var CartodbWindshaft = require('../../../lib/cartodb/server'); -var serverOptions = require('../../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../../lib/server'); +var serverOptions = require('../../../lib/server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('get requests with cache headers', function() { var server; diff --git a/test/acceptance/cache/surrogate_keys_invalidation.js b/test/acceptance/cache/surrogate-keys-invalidation-test.js similarity index 97% rename from test/acceptance/cache/surrogate_keys_invalidation.js rename to test/acceptance/cache/surrogate-keys-invalidation-test.js index aa22892b..f884b07c 100644 --- a/test/acceptance/cache/surrogate_keys_invalidation.js +++ b/test/acceptance/cache/surrogate-keys-invalidation-test.js @@ -1,19 +1,18 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var step = require('step'); var FastlyPurge = require('fastly-purge'); var _ = require('underscore'); - -var NamedMapsCacheEntry = require(__dirname + '/../../../lib/cartodb/cache/model/named_maps_entry'); -var CartodbWindshaft = require(__dirname + '/../../../lib/cartodb/server'); +var NamedMapsCacheEntry = require('../../../lib/cache/model/named-maps-entry'); +var CartodbWindshaft = require('../../../lib/server'); var nock = require('nock'); describe('templates surrogate keys', function() { - var serverOptions = require('../../../lib/cartodb/server_options'); + var serverOptions = require('../../../lib/server-options'); // Enable Varnish purge for tests var varnishHost = serverOptions.varnish_host; diff --git a/test/acceptance/cluster.js b/test/acceptance/cluster-test.js similarity index 99% rename from test/acceptance/cluster.js rename to test/acceptance/cluster-test.js index 840757a8..33ea4234 100644 --- a/test/acceptance/cluster.js +++ b/test/acceptance/cluster-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); diff --git a/test/acceptance/custom-middlewares.js b/test/acceptance/custom-middlewares-test.js similarity index 98% rename from test/acceptance/custom-middlewares.js rename to test/acceptance/custom-middlewares-test.js index 38067296..7348479c 100644 --- a/test/acceptance/custom-middlewares.js +++ b/test/acceptance/custom-middlewares-test.js @@ -1,9 +1,9 @@ 'use strict'; -const helper = require('../support/test_helper'); +const helper = require('../support/test-helper'); const assert = require('../support/assert'); -const createServer = require('../../lib/cartodb/server'); -const serverOptions = require('../../lib/cartodb/server_options'); +const createServer = require('../../lib/server'); +const serverOptions = require('../../lib/server-options'); describe('custom middlewares', function () { const RESPONSE_OK = { diff --git a/test/acceptance/dataviews/aggregation.js b/test/acceptance/dataviews/aggregation-test.js similarity index 99% rename from test/acceptance/dataviews/aggregation.js rename to test/acceptance/dataviews/aggregation-test.js index c6df346b..ae357dce 100644 --- a/test/acceptance/dataviews/aggregation.js +++ b/test/acceptance/dataviews/aggregation-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/dataviews/error-cases.js b/test/acceptance/dataviews/error-cases-test.js similarity index 99% rename from test/acceptance/dataviews/error-cases.js rename to test/acceptance/dataviews/error-cases-test.js index 835efa53..64af27a2 100644 --- a/test/acceptance/dataviews/error-cases.js +++ b/test/acceptance/dataviews/error-cases-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/dataviews/formula.js b/test/acceptance/dataviews/formula-test.js similarity index 99% rename from test/acceptance/dataviews/formula.js rename to test/acceptance/dataviews/formula-test.js index 028b6368..9f8b2877 100644 --- a/test/acceptance/dataviews/formula.js +++ b/test/acceptance/dataviews/formula-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/dataviews/histogram.js b/test/acceptance/dataviews/histogram-test.js similarity index 99% rename from test/acceptance/dataviews/histogram.js rename to test/acceptance/dataviews/histogram-test.js index f517a59a..945fc9dd 100644 --- a/test/acceptance/dataviews/histogram.js +++ b/test/acceptance/dataviews/histogram-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/dataviews/overviews.js b/test/acceptance/dataviews/overviews-test.js similarity index 99% rename from test/acceptance/dataviews/overviews.js rename to test/acceptance/dataviews/overviews-test.js index 7642dc73..8df298b3 100644 --- a/test/acceptance/dataviews/overviews.js +++ b/test/acceptance/dataviews/overviews-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/date-wrapping.spec.js b/test/acceptance/date-wrapping-test.js similarity index 99% rename from test/acceptance/date-wrapping.spec.js rename to test/acceptance/date-wrapping-test.js index f26caf1e..85b56111 100644 --- a/test/acceptance/date-wrapping.spec.js +++ b/test/acceptance/date-wrapping-test.js @@ -4,7 +4,7 @@ const assert = require('assert'); const TestClient = require('../support/test-client'); const mapConfigFactory = require('../fixtures/test_mapconfigFactory'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const usePgMvtRenderer = serverOptions.renderer.mvt.usePostGIS; const describe_mvt = !usePgMvtRenderer ? describe : describe.skip; diff --git a/test/acceptance/dynamic-styling-named-maps.js b/test/acceptance/dynamic-styling-named-maps-test.js similarity index 94% rename from test/acceptance/dynamic-styling-named-maps.js rename to test/acceptance/dynamic-styling-named-maps-test.js index 994e347f..988b2a0e 100644 --- a/test/acceptance/dynamic-styling-named-maps.js +++ b/test/acceptance/dynamic-styling-named-maps-test.js @@ -2,10 +2,10 @@ var assert = require('../support/assert'); var step = require('step'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); -var testHelper = require(__dirname + '/../support/test_helper'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var LayergroupToken = require('../../lib/models/layergroup-token'); +var testHelper = require('../support/test-helper'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('dynamic styling for named maps', function() { var server; diff --git a/test/acceptance/error-middleware.js b/test/acceptance/error-middleware-test.js similarity index 100% rename from test/acceptance/error-middleware.js rename to test/acceptance/error-middleware-test.js diff --git a/test/acceptance/errors-with-context.js b/test/acceptance/errors-with-context-test.js similarity index 94% rename from test/acceptance/errors-with-context.js rename to test/acceptance/errors-with-context-test.js index 1adc877a..4d58b57a 100644 --- a/test/acceptance/errors-with-context.js +++ b/test/acceptance/errors-with-context-test.js @@ -1,8 +1,8 @@ 'use strict'; var assert = require('../support/assert'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('error with context', function () { var server; diff --git a/test/acceptance/health_check.js b/test/acceptance/health-check-test.js similarity index 94% rename from test/acceptance/health_check.js rename to test/acceptance/health-check-test.js index 112cc88d..cff4b41e 100644 --- a/test/acceptance/health_check.js +++ b/test/acceptance/health-check-test.js @@ -1,12 +1,12 @@ 'use strict'; -require(__dirname + '/../support/test_helper'); +require('../support/test-helper'); var fs = require('fs'); var assert = require('../support/assert'); -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('health checks', function () { diff --git a/test/acceptance/label-wrap.js b/test/acceptance/label-wrap-test.js similarity index 98% rename from test/acceptance/label-wrap.js rename to test/acceptance/label-wrap-test.js index 914b2842..2a968e61 100644 --- a/test/acceptance/label-wrap.js +++ b/test/acceptance/label-wrap-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var TestClient = require('../support/test-client'); var assert = require('../support/assert'); diff --git a/test/acceptance/layergroup-metadata.js b/test/acceptance/layergroup-metadata-test.js similarity index 95% rename from test/acceptance/layergroup-metadata.js rename to test/acceptance/layergroup-metadata-test.js index 50e30895..831a5b8e 100644 --- a/test/acceptance/layergroup-metadata.js +++ b/test/acceptance/layergroup-metadata-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); describe('layergroup metadata', function () { const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS; diff --git a/test/acceptance/layers-filters.js b/test/acceptance/layers-filters-test.js similarity index 97% rename from test/acceptance/layers-filters.js rename to test/acceptance/layers-filters-test.js index 2767300f..29bfb5ff 100644 --- a/test/acceptance/layers-filters.js +++ b/test/acceptance/layers-filters-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var TestClient = require('../support/test-client'); describe('layers filters', function() { diff --git a/test/acceptance/max-waiting-workers.js b/test/acceptance/max-waiting-workers-test.js similarity index 98% rename from test/acceptance/max-waiting-workers.js rename to test/acceptance/max-waiting-workers-test.js index adf259de..576bd07b 100644 --- a/test/acceptance/max-waiting-workers.js +++ b/test/acceptance/max-waiting-workers-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); diff --git a/test/acceptance/multilayer_server.js b/test/acceptance/multilayer-server-test.js similarity index 97% rename from test/acceptance/multilayer_server.js rename to test/acceptance/multilayer-server-test.js index 3f6c1b45..7a7b7e72 100644 --- a/test/acceptance/multilayer_server.js +++ b/test/acceptance/multilayer-server-test.js @@ -1,17 +1,17 @@ 'use strict'; -var testHelper = require('../support/test_helper'); +var testHelper = require('../support/test-helper'); var assert = require('../support/assert'); var _ = require('underscore'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); -var PgQueryRunner = require('../../lib/cartodb/backends/pg_query_runner'); +var PgQueryRunner = require('../../lib/backends/pg-query-runner'); var QueryTables = require('cartodb-query-tables').queryTables; -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('tests from old api translated to multilayer', function() { var server; diff --git a/test/acceptance/multilayer.js b/test/acceptance/multilayer-test.js similarity index 99% rename from test/acceptance/multilayer.js rename to test/acceptance/multilayer-test.js index 28d9914f..10fb4451 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer-test.js @@ -10,16 +10,16 @@ var redis_stats_db = 5; var mapnik = require('windshaft').mapnik; var semver = require('semver'); -var helper = require(__dirname + '/../support/test_helper'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var helper = require('../support/test-helper'); +var LayergroupToken = require('../../lib/models/layergroup-token'); var windshaft_fixtures = __dirname + '/../../node_modules/windshaft/test/fixtures'; var IMAGE_EQUALS_TOLERANCE_PER_MIL = 20; var IMAGE_EQUALS_HIGHER_TOLERANCE_PER_MIL = 25; -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); var QueryTables = require('cartodb-query-tables').queryTables; diff --git a/test/acceptance/mvt-regressions.js b/test/acceptance/mvt-regressions-test.js similarity index 98% rename from test/acceptance/mvt-regressions.js rename to test/acceptance/mvt-regressions-test.js index c660e23d..56c7ff0e 100644 --- a/test/acceptance/mvt-regressions.js +++ b/test/acceptance/mvt-regressions-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const suites = [ { diff --git a/test/acceptance/mvt.js b/test/acceptance/mvt-test.js similarity index 99% rename from test/acceptance/mvt.js rename to test/acceptance/mvt-test.js index bb446680..15e28297 100644 --- a/test/acceptance/mvt.js +++ b/test/acceptance/mvt-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('../support/assert'); var TestClient = require('../support/test-client'); -var serverOptions = require('../../lib/cartodb/server_options'); +var serverOptions = require('../../lib/server-options'); function createMapConfig(sql = TestClient.SQL.ONE_POINT) { return { diff --git a/test/acceptance/named_layers.js b/test/acceptance/named-layers-test.js similarity index 98% rename from test/acceptance/named_layers.js rename to test/acceptance/named-layers-test.js index b80bfacc..a7da4e86 100644 --- a/test/acceptance/named_layers.js +++ b/test/acceptance/named-layers-test.js @@ -1,15 +1,15 @@ 'use strict'; -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var assert = require('../support/assert'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var step = require('step'); diff --git a/test/acceptance/named_layers_visibility.js b/test/acceptance/named-layers-visibility-test.js similarity index 95% rename from test/acceptance/named_layers_visibility.js rename to test/acceptance/named-layers-visibility-test.js index 0df92ed6..a68314fe 100644 --- a/test/acceptance/named_layers_visibility.js +++ b/test/acceptance/named-layers-visibility-test.js @@ -1,14 +1,14 @@ 'use strict'; var step = require('step'); -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var assert = require('../support/assert'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var mapnik = require('windshaft').mapnik; var IMAGE_TOLERANCE = 20; diff --git a/test/acceptance/named-map-cache-regressions.js b/test/acceptance/named-map-cache-regressions-test.js similarity index 97% rename from test/acceptance/named-map-cache-regressions.js rename to test/acceptance/named-map-cache-regressions-test.js index 8521ca8a..d8089cf5 100644 --- a/test/acceptance/named-map-cache-regressions.js +++ b/test/acceptance/named-map-cache-regressions-test.js @@ -1,13 +1,13 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const request = require('request'); const assert = require('assert'); -const Server = require('../../lib/cartodb/server'); -const serverOptions = require('../../lib/cartodb/server_options'); +const Server = require('../../lib/server'); +const serverOptions = require('../../lib/server-options'); const { mapnik } = require('windshaft'); -const helper = require('../support/test_helper'); +const helper = require('../support/test-helper'); const namedTileUrlTemplate = (ctx) => { return `http://${ctx.address}/api/v1/map/static/named/${ctx.templateId}/256/256.png?api_key=${ctx.apiKey}`; diff --git a/test/acceptance/named_maps_authentication.js b/test/acceptance/named-maps-authentication-test.js similarity index 95% rename from test/acceptance/named_maps_authentication.js rename to test/acceptance/named-maps-authentication-test.js index 4f8e343c..ac898c5e 100644 --- a/test/acceptance/named_maps_authentication.js +++ b/test/acceptance/named-maps-authentication-test.js @@ -1,15 +1,15 @@ 'use strict'; -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var RedisPool = require('redis-mpool'); var querystring = require('querystring'); var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); -var NamedMapsCacheEntry = require('../../lib/cartodb/cache/model/named_maps_entry'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); +var TemplateMaps = require('../../lib/backends/template-maps'); +var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry'); describe('named maps authentication', function() { var server; diff --git a/test/acceptance/named_maps_cache.js b/test/acceptance/named-maps-cache-test.js similarity index 96% rename from test/acceptance/named_maps_cache.js rename to test/acceptance/named-maps-cache-test.js index 0cdc2a49..c369dc0e 100644 --- a/test/acceptance/named_maps_cache.js +++ b/test/acceptance/named-maps-cache-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); -const helper = require('../support/test_helper'); +const helper = require('../support/test-helper'); var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('named maps provider cache', function() { var server; diff --git a/test/acceptance/named_maps_static_view.js b/test/acceptance/named-maps-static-view-test.js similarity index 97% rename from test/acceptance/named_maps_static_view.js rename to test/acceptance/named-maps-static-view-test.js index 8a9b1402..e6e54195 100644 --- a/test/acceptance/named_maps_static_view.js +++ b/test/acceptance/named-maps-static-view-test.js @@ -1,14 +1,14 @@ 'use strict'; var qs = require('querystring'); -var testHelper = require('../support/test_helper'); +var testHelper = require('../support/test-helper'); var RedisPool = require('redis-mpool'); var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); +var TemplateMaps = require('../../lib/backends/template-maps'); describe('named maps static view', function() { // configure redis pool instance to use in tests diff --git a/test/acceptance/named_maps_stats.js b/test/acceptance/named-maps-stats-test.js similarity index 90% rename from test/acceptance/named_maps_stats.js rename to test/acceptance/named-maps-stats-test.js index fc80cbbc..a41644ba 100644 --- a/test/acceptance/named_maps_stats.js +++ b/test/acceptance/named-maps-stats-test.js @@ -1,15 +1,15 @@ 'use strict'; -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var RedisPool = require('redis-mpool'); var querystring = require('querystring'); var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); -var NamedMapsCacheEntry = require('../../lib/cartodb/cache/model/named_maps_entry'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); +var TemplateMaps = require('../../lib/backends/template-maps'); +var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry'); describe('named maps preview stats', function() { var server; diff --git a/test/acceptance/overviews_metadata_named_maps.js b/test/acceptance/overviews-metadata-named-maps-test.js similarity index 97% rename from test/acceptance/overviews_metadata_named_maps.js rename to test/acceptance/overviews-metadata-named-maps-test.js index 9e66cf07..5dc11240 100644 --- a/test/acceptance/overviews_metadata_named_maps.js +++ b/test/acceptance/overviews-metadata-named-maps-test.js @@ -1,12 +1,12 @@ 'use strict'; -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var assert = require('../support/assert'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); var RedisPool = require('redis-mpool'); diff --git a/test/acceptance/overviews_metadata.js b/test/acceptance/overviews-metadata-test.js similarity index 97% rename from test/acceptance/overviews_metadata.js rename to test/acceptance/overviews-metadata-test.js index 90642777..92ab562a 100644 --- a/test/acceptance/overviews_metadata.js +++ b/test/acceptance/overviews-metadata-test.js @@ -1,12 +1,12 @@ 'use strict'; -var test_helper = require('../support/test_helper'); +var test_helper = require('../support/test-helper'); var assert = require('../support/assert'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); var RedisPool = require('redis-mpool'); diff --git a/test/acceptance/overviews_queries.js b/test/acceptance/overviews-queries-test.js similarity index 90% rename from test/acceptance/overviews_queries.js rename to test/acceptance/overviews-queries-test.js index c3726a61..b89b3660 100644 --- a/test/acceptance/overviews_queries.js +++ b/test/acceptance/overviews-queries-test.js @@ -1,11 +1,11 @@ 'use strict'; -var testHelper = require('../support/test_helper'); +var testHelper = require('../support/test-helper'); var assert = require('../support/assert'); -var cartodbServer = require('../../lib/cartodb/server'); -var ServerOptions = require('./ported/support/ported_server_options'); -var testClient = require('./ported/support/test_client'); +var cartodbServer = require('../../lib/server'); +var ServerOptions = require('./ported/support/ported-server-options'); +var testClient = require('./ported/support/test-client'); describe('overviews_queries', function() { var server; diff --git a/test/acceptance/ported/attributes.js b/test/acceptance/ported/attributes-test.js similarity index 97% rename from test/acceptance/ported/attributes.js rename to test/acceptance/ported/attributes-test.js index 13af276e..86527e2f 100644 --- a/test/acceptance/ported/attributes.js +++ b/test/acceptance/ported/attributes-test.js @@ -1,12 +1,12 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var step = require('step'); -var cartodbServer = require('../../../lib/cartodb/server'); -var PortedServerOptions = require('./support/ported_server_options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var cartodbServer = require('../../../lib/server'); +var PortedServerOptions = require('./support/ported-server-options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('attributes', function() { var server; diff --git a/test/acceptance/ported/blend_filtering.js b/test/acceptance/ported/blend-filtering-test.js similarity index 98% rename from test/acceptance/ported/blend_filtering.js rename to test/acceptance/ported/blend-filtering-test.js index fcb0d41f..2bb5ca9e 100644 --- a/test/acceptance/ported/blend_filtering.js +++ b/test/acceptance/ported/blend-filtering-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); var fs = require('fs'); var http = require('http'); diff --git a/test/acceptance/ported/blend_http_fallback.js b/test/acceptance/ported/blend-http-fallback-test.js similarity index 98% rename from test/acceptance/ported/blend_http_fallback.js rename to test/acceptance/ported/blend-http-fallback-test.js index 13fac245..f2dc1d8b 100644 --- a/test/acceptance/ported/blend_http_fallback.js +++ b/test/acceptance/ported/blend-http-fallback-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); var fs = require('fs'); var http = require('http'); diff --git a/test/acceptance/ported/blend_http_timeout.js b/test/acceptance/ported/blend-http-timeout-test.js similarity index 94% rename from test/acceptance/ported/blend_http_timeout.js rename to test/acceptance/ported/blend-http-timeout-test.js index 7edd8996..d71c6868 100644 --- a/test/acceptance/ported/blend_http_timeout.js +++ b/test/acceptance/ported/blend-http-timeout-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); -var serverOptions = require('./support/ported_server_options'); +var testClient = require('./support/test-client'); +var serverOptions = require('./support/ported-server-options'); var fs = require('fs'); var http = require('http'); diff --git a/test/acceptance/ported/blend.js b/test/acceptance/ported/blend-test.js similarity index 97% rename from test/acceptance/ported/blend.js rename to test/acceptance/ported/blend-test.js index 2f4a8714..269b35fd 100644 --- a/test/acceptance/ported/blend.js +++ b/test/acceptance/ported/blend-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); describe('blend png renderer', function() { var IMAGE_TOLERANCE_PER_MIL = 20; diff --git a/test/acceptance/ported/external_resources.js b/test/acceptance/ported/external-resources-test.js similarity index 96% rename from test/acceptance/ported/external_resources.js rename to test/acceptance/ported/external-resources-test.js index 6f4f13b3..6ac05df1 100644 --- a/test/acceptance/ported/external_resources.js +++ b/test/acceptance/ported/external-resources-test.js @@ -1,12 +1,12 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var fs = require('fs'); -var PortedServerOptions = require('./support/ported_server_options'); +var PortedServerOptions = require('./support/ported-server-options'); var http = require('http'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); var nock = require('nock'); describe('external resources', function() { diff --git a/test/acceptance/ported/limits.js b/test/acceptance/ported/limits-test.js similarity index 95% rename from test/acceptance/ported/limits.js rename to test/acceptance/ported/limits-test.js index ea549fa3..1ee70123 100644 --- a/test/acceptance/ported/limits.js +++ b/test/acceptance/ported/limits-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var fs = require('fs'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); -var serverOptions = require('./support/ported_server_options'); +var testClient = require('./support/test-client'); +var serverOptions = require('./support/ported-server-options'); describe.skip('render limits', function() { diff --git a/test/acceptance/ported/multilayer_error_cases.js b/test/acceptance/ported/multilayer-error-cases-test.js similarity index 98% rename from test/acceptance/ported/multilayer_error_cases.js rename to test/acceptance/ported/multilayer-error-cases-test.js index 246f9964..b4f9a9be 100644 --- a/test/acceptance/ported/multilayer_error_cases.js +++ b/test/acceptance/ported/multilayer-error-cases-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var step = require('step'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); -var testClient = require('./support/test_client'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); +var testClient = require('./support/test-client'); var TestClient = require('../../support/test-client'); describe('multilayer error cases', function() { diff --git a/test/acceptance/ported/multilayer_interactivity.js b/test/acceptance/ported/multilayer-interactivity-test.js similarity index 97% rename from test/acceptance/ported/multilayer_interactivity.js rename to test/acceptance/ported/multilayer-interactivity-test.js index 62948038..48e1d007 100644 --- a/test/acceptance/ported/multilayer_interactivity.js +++ b/test/acceptance/ported/multilayer-interactivity-test.js @@ -1,13 +1,13 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var _ = require('underscore'); -var cartodbServer = require('../../../lib/cartodb/server'); +var cartodbServer = require('../../../lib/server'); var getLayerTypeFn = require('windshaft').model.MapConfig.prototype.getType; -var PortedServerOptions = require('./support/ported_server_options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var PortedServerOptions = require('./support/ported-server-options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('multilayer interactivity and layers order', function() { var server; diff --git a/test/acceptance/ported/multilayer.js b/test/acceptance/ported/multilayer-test.js similarity index 99% rename from test/acceptance/ported/multilayer.js rename to test/acceptance/ported/multilayer-test.js index f996d45c..1ff22011 100644 --- a/test/acceptance/ported/multilayer.js +++ b/test/acceptance/ported/multilayer-test.js @@ -1,15 +1,15 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var _ = require('underscore'); var querystring = require('querystring'); var step = require('step'); var mapnik = require('windshaft').mapnik; -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('multilayer', function() { var server; diff --git a/test/acceptance/ported/raster.js b/test/acceptance/ported/raster-test.js similarity index 95% rename from test/acceptance/ported/raster.js rename to test/acceptance/ported/raster-test.js index 574de93c..313bca02 100644 --- a/test/acceptance/ported/raster.js +++ b/test/acceptance/ported/raster-test.js @@ -1,12 +1,12 @@ 'use strict'; -var testHelper =require('../../support/test_helper'); +var testHelper =require('../../support/test-helper'); var assert = require('../../support/assert'); var step = require('step'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('raster', function() { diff --git a/test/acceptance/ported/regressions.js b/test/acceptance/ported/regressions-test.js similarity index 92% rename from test/acceptance/ported/regressions.js rename to test/acceptance/ported/regressions-test.js index 5e6a6293..1533d400 100644 --- a/test/acceptance/ported/regressions.js +++ b/test/acceptance/ported/regressions-test.js @@ -1,9 +1,9 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); describe('regressions', function() { after(function() { diff --git a/test/acceptance/ported/retina.js b/test/acceptance/ported/retina-test.js similarity index 93% rename from test/acceptance/ported/retina.js rename to test/acceptance/ported/retina-test.js index d2a82306..ceca71a9 100644 --- a/test/acceptance/ported/retina.js +++ b/test/acceptance/ported/retina-test.js @@ -1,13 +1,13 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var mapnik = require('windshaft').mapnik; -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('retina support', function() { diff --git a/test/acceptance/ported/server_gettile.js b/test/acceptance/ported/server-gettile-test.js similarity index 97% rename from test/acceptance/ported/server_gettile.js rename to test/acceptance/ported/server-gettile-test.js index 61daa568..1d75a536 100644 --- a/test/acceptance/ported/server_gettile.js +++ b/test/acceptance/ported/server-gettile-test.js @@ -1,13 +1,13 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var mapnik = require('windshaft').mapnik; var semver = require('semver'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); -var testClient = require('./support/test_client'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); +var testClient = require('./support/test-client'); describe('server_gettile', function() { var server; diff --git a/test/acceptance/ported/server_png8_format.js b/test/acceptance/ported/server-png8-format-test.js similarity index 96% rename from test/acceptance/ported/server_png8_format.js rename to test/acceptance/ported/server-png8-format-test.js index ab4f2758..66a4c820 100644 --- a/test/acceptance/ported/server_png8_format.js +++ b/test/acceptance/ported/server-png8-format-test.js @@ -1,14 +1,14 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var _ = require('underscore'); var fs = require('fs'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); var IMAGE_EQUALS_TOLERANCE_PER_MIL = 85; diff --git a/test/acceptance/ported/server.js b/test/acceptance/ported/server-test.js similarity index 96% rename from test/acceptance/ported/server.js rename to test/acceptance/ported/server-test.js index 58febf38..9bd0e7e5 100644 --- a/test/acceptance/ported/server.js +++ b/test/acceptance/ported/server-test.js @@ -1,11 +1,11 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); -var testClient = require('./support/test_client'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); +var testClient = require('./support/test-client'); describe('server', function() { var server; diff --git a/test/acceptance/ported/static_maps.js b/test/acceptance/ported/static-maps-test.js similarity index 98% rename from test/acceptance/ported/static_maps.js rename to test/acceptance/ported/static-maps-test.js index ce3721f0..f5458a76 100644 --- a/test/acceptance/ported/static_maps.js +++ b/test/acceptance/ported/static-maps-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); var http = require('http'); var fs = require('fs'); diff --git a/test/acceptance/ported/support/ported_server_options.js b/test/acceptance/ported/support/ported-server-options.js similarity index 90% rename from test/acceptance/ported/support/ported_server_options.js rename to test/acceptance/ported/support/ported-server-options.js index 10908124..ea84a4d2 100644 --- a/test/acceptance/ported/support/ported_server_options.js +++ b/test/acceptance/ported/support/ported-server-options.js @@ -1,9 +1,9 @@ 'use strict'; var _ = require('underscore'); -var serverOptions = require('../../../../lib/cartodb/server_options'); +var serverOptions = require('../../../../lib/server-options'); var mapnik = require('windshaft').mapnik; -var OverviewsQueryRewriter = require('../../../../lib/cartodb/utils/overviews_query_rewriter'); +var OverviewsQueryRewriter = require('../../../../lib/utils/overviews-query-rewriter'); var overviewsQueryRewriter = new OverviewsQueryRewriter({ zoom_level: 'CDB_ZoomFromScale(!scale_denominator!)' }); diff --git a/test/acceptance/ported/support/test_client.js b/test/acceptance/ported/support/test-client.js similarity index 98% rename from test/acceptance/ported/support/test_client.js rename to test/acceptance/ported/support/test-client.js index 67d5c11e..e6328527 100644 --- a/test/acceptance/ported/support/test_client.js +++ b/test/acceptance/ported/support/test-client.js @@ -1,15 +1,15 @@ 'use strict'; -var testHelper = require('../../../support/test_helper'); -var LayergroupToken = require('../../../../lib/cartodb/models/layergroup-token'); +var testHelper = require('../../../support/test-helper'); +var LayergroupToken = require('../../../../lib/models/layergroup-token'); var step = require('step'); var assert = require('../../../support/assert'); var _ = require('underscore'); var querystring = require('querystring'); var mapnik = require('windshaft').mapnik; -var CartodbServer = require('../../../../lib/cartodb/server'); -var PortedServerOptions = require('./ported_server_options'); +var CartodbServer = require('../../../../lib/server'); +var PortedServerOptions = require('./ported-server-options'); var DEFAULT_POINT_STYLE = [ '#layer {', diff --git a/test/acceptance/ported/torque_boundaries.js b/test/acceptance/ported/torque-boundaries-test.js similarity index 98% rename from test/acceptance/ported/torque_boundaries.js rename to test/acceptance/ported/torque-boundaries-test.js index 55b26297..e4854ac7 100644 --- a/test/acceptance/ported/torque_boundaries.js +++ b/test/acceptance/ported/torque-boundaries-test.js @@ -1,12 +1,12 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('torque boundary points', function() { var server; diff --git a/test/acceptance/ported/torque_png.js b/test/acceptance/ported/torque-png-test.js similarity index 98% rename from test/acceptance/ported/torque_png.js rename to test/acceptance/ported/torque-png-test.js index 9c8480bd..1b0fed8e 100644 --- a/test/acceptance/ported/torque_png.js +++ b/test/acceptance/ported/torque-png-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); describe('torque png renderer', function() { var IMAGE_TOLERANCE_PER_MIL = 20; diff --git a/test/acceptance/ported/torque.js b/test/acceptance/ported/torque-test.js similarity index 98% rename from test/acceptance/ported/torque.js rename to test/acceptance/ported/torque-test.js index 31f3cf55..b40650cc 100644 --- a/test/acceptance/ported/torque.js +++ b/test/acceptance/ported/torque-test.js @@ -1,14 +1,14 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../../support/test-helper'); var assert = require('../../support/assert'); var _ = require('underscore'); var step = require('step'); -var cartodbServer = require('../../../lib/cartodb/server'); -var ServerOptions = require('./support/ported_server_options'); +var cartodbServer = require('../../../lib/server'); +var ServerOptions = require('./support/ported-server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('torque', function() { var server; diff --git a/test/acceptance/ported/torque_zero_zero.js b/test/acceptance/ported/torque-zero-zero-test.js similarity index 96% rename from test/acceptance/ported/torque_zero_zero.js rename to test/acceptance/ported/torque-zero-zero-test.js index 2d81f517..9b76183e 100644 --- a/test/acceptance/ported/torque_zero_zero.js +++ b/test/acceptance/ported/torque-zero-zero-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); describe('torque tiles at 0,0 point', function() { /* diff --git a/test/acceptance/ported/wrap.js b/test/acceptance/ported/wrap-test.js similarity index 98% rename from test/acceptance/ported/wrap.js rename to test/acceptance/ported/wrap-test.js index 6434d6fa..cafa2ea3 100644 --- a/test/acceptance/ported/wrap.js +++ b/test/acceptance/ported/wrap-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); -var testClient = require('./support/test_client'); +var testClient = require('./support/test-client'); describe('wrap x coordinate', function() { describe('renders correct tile', function() { diff --git a/test/acceptance/rate-limit.test.js b/test/acceptance/rate-limit-test.js similarity index 97% rename from test/acceptance/rate-limit.test.js rename to test/acceptance/rate-limit-test.js index f5b6f456..4560fd57 100644 --- a/test/acceptance/rate-limit.test.js +++ b/test/acceptance/rate-limit-test.js @@ -1,15 +1,15 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const redis = require('redis'); const RedisPool = require('redis-mpool'); const cartodbRedis = require('cartodb-redis'); const TestClient = require('../support/test-client'); -const UserLimitsBackend = require('../../lib/cartodb/backends/user-limits'); -const rateLimitMiddleware = require('../../lib/cartodb/api/middlewares/rate-limit'); -const serverOptions = require('../../lib/cartodb/server_options'); +const UserLimitsBackend = require('../../lib/backends/user-limits'); +const rateLimitMiddleware = require('../../lib/api/middlewares/rate-limit'); +const serverOptions = require('../../lib/server-options'); const { RATE_LIMIT_ENDPOINTS_GROUPS } = rateLimitMiddleware; let userLimitsApi; diff --git a/test/acceptance/regressions.js b/test/acceptance/regressions-test.js similarity index 95% rename from test/acceptance/regressions.js rename to test/acceptance/regressions-test.js index 21d9c970..8ac63a83 100644 --- a/test/acceptance/regressions.js +++ b/test/acceptance/regressions-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('../support/assert'); -const helper = require('../support/test_helper'); +const helper = require('../support/test-helper'); var TestClient = require('../support/test-client'); -const LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); -const CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -const serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +const LayergroupToken = require('../../lib/models/layergroup-token'); +const CartodbWindshaft = require('../../lib/server'); +const serverOptions = require('../../lib/server-options'); describe('regressions', function() { diff --git a/test/acceptance/server.js b/test/acceptance/server-test.js similarity index 94% rename from test/acceptance/server.js rename to test/acceptance/server-test.js index 183d6bac..976066a7 100644 --- a/test/acceptance/server.js +++ b/test/acceptance/server-test.js @@ -1,13 +1,13 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('../support/assert'); var querystring = require('querystring'); var step = require('step'); -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); describe('server', function() { diff --git a/test/acceptance/special-numeric-values.js b/test/acceptance/special-numeric-values-test.js similarity index 98% rename from test/acceptance/special-numeric-values.js rename to test/acceptance/special-numeric-values-test.js index 6b328286..0ac183fd 100644 --- a/test/acceptance/special-numeric-values.js +++ b/test/acceptance/special-numeric-values-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('../support/assert'); var TestClient = require('../support/test-client'); diff --git a/test/acceptance/sql-wrap.js b/test/acceptance/sql-wrap-test.js similarity index 98% rename from test/acceptance/sql-wrap.js rename to test/acceptance/sql-wrap-test.js index 7b2f9d57..87eb705f 100644 --- a/test/acceptance/sql-wrap.js +++ b/test/acceptance/sql-wrap-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('../support/assert'); var TestClient = require('../support/test-client'); diff --git a/test/acceptance/stats/mapnik_stats_layergroup.js b/test/acceptance/stats/mapnik-stats-layergroup-test.js similarity index 99% rename from test/acceptance/stats/mapnik_stats_layergroup.js rename to test/acceptance/stats/mapnik-stats-layergroup-test.js index 55ca7a64..0071a3ae 100644 --- a/test/acceptance/stats/mapnik_stats_layergroup.js +++ b/test/acceptance/stats/mapnik-stats-layergroup-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); -const serverOptions = require('../../../lib/cartodb/server_options'); +const serverOptions = require('../../../lib/server-options'); const suites = [ { diff --git a/test/acceptance/stats/multilayer_stats.js b/test/acceptance/stats/multilayer-stats-test.js similarity index 99% rename from test/acceptance/stats/multilayer_stats.js rename to test/acceptance/stats/multilayer-stats-test.js index dcf9b402..17b3fe14 100644 --- a/test/acceptance/stats/multilayer_stats.js +++ b/test/acceptance/stats/multilayer-stats-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/templates.js b/test/acceptance/templates-test.js similarity index 99% rename from test/acceptance/templates.js rename to test/acceptance/templates-test.js index 72e6fa73..b9c36b63 100644 --- a/test/acceptance/templates.js +++ b/test/acceptance/templates-test.js @@ -6,7 +6,7 @@ var redis = require('redis'); var step = require('step'); var strftime = require('strftime'); var QueryTables = require('cartodb-query-tables').queryTables; -var NamedMapsCacheEntry = require('../../lib/cartodb/cache/model/named_maps_entry'); +var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry'); var redis_stats_db = 5; // Pollute the PG environment to make sure @@ -18,12 +18,12 @@ process.env.PGHOST = 'fake'; var fs = require('fs'); var http = require('http'); -var helper = require(__dirname + '/../support/test_helper'); +var helper = require('../support/test-helper'); -var CartodbWindshaft = require(__dirname + '/../../lib/cartodb/server'); -var serverOptions = require(__dirname + '/../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); describe('template_api', function() { var server; diff --git a/test/acceptance/tilejson.js b/test/acceptance/tilejson-test.js similarity index 98% rename from test/acceptance/tilejson.js rename to test/acceptance/tilejson-test.js index 19ef158f..1c0ea21b 100644 --- a/test/acceptance/tilejson.js +++ b/test/acceptance/tilejson-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const originalUsePostGIS = serverOptions.renderer.mvt.usePostGIS; diff --git a/test/acceptance/turbo-carto/anonymous-maps.js b/test/acceptance/turbo-carto/anonymous-maps-test.js similarity index 100% rename from test/acceptance/turbo-carto/anonymous-maps.js rename to test/acceptance/turbo-carto/anonymous-maps-test.js diff --git a/test/acceptance/turbo-carto/error-cases.js b/test/acceptance/turbo-carto/error-cases-test.js similarity index 99% rename from test/acceptance/turbo-carto/error-cases.js rename to test/acceptance/turbo-carto/error-cases-test.js index 94b07fe0..5b7df33c 100644 --- a/test/acceptance/turbo-carto/error-cases.js +++ b/test/acceptance/turbo-carto/error-cases-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/turbo-carto/named-maps.js b/test/acceptance/turbo-carto/named-maps-test.js similarity index 97% rename from test/acceptance/turbo-carto/named-maps.js rename to test/acceptance/turbo-carto/named-maps-test.js index 6a302498..c8e389a8 100644 --- a/test/acceptance/turbo-carto/named-maps.js +++ b/test/acceptance/turbo-carto/named-maps-test.js @@ -2,10 +2,10 @@ var assert = require('../../support/assert'); var step = require('step'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); -var testHelper = require('../../support/test_helper'); -var CartodbWindshaft = require('../../../lib/cartodb/server'); -var serverOptions = require('../../../lib/cartodb/server_options'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); +var testHelper = require('../../support/test-helper'); +var CartodbWindshaft = require('../../../lib/server'); +var serverOptions = require('../../../lib/server-options'); var mapnik = require('windshaft').mapnik; var IMAGE_TOLERANCE_PER_MIL = 10; diff --git a/test/acceptance/turbo-carto/regressions.js b/test/acceptance/turbo-carto/regressions-test.js similarity index 99% rename from test/acceptance/turbo-carto/regressions.js rename to test/acceptance/turbo-carto/regressions-test.js index 40dec6de..66769da1 100644 --- a/test/acceptance/turbo-carto/regressions.js +++ b/test/acceptance/turbo-carto/regressions-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/user-database-timeout-limit.js b/test/acceptance/user-database-timeout-limit-test.js similarity index 99% rename from test/acceptance/user-database-timeout-limit.js rename to test/acceptance/user-database-timeout-limit-test.js index 629d3778..747ef2c2 100644 --- a/test/acceptance/user-database-timeout-limit.js +++ b/test/acceptance/user-database-timeout-limit-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const timeoutErrorTilePath = `${process.cwd()}/assets/render-timeout-fallback.png`; diff --git a/test/acceptance/user-render-timeout-limit.js b/test/acceptance/user-render-timeout-limit-test.js similarity index 99% rename from test/acceptance/user-render-timeout-limit.js rename to test/acceptance/user-render-timeout-limit-test.js index a011ce70..37083752 100644 --- a/test/acceptance/user-render-timeout-limit.js +++ b/test/acceptance/user-render-timeout-limit-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -var serverOptions = require('../../lib/cartodb/server_options'); +var serverOptions = require('../../lib/server-options'); const timeoutErrorTilePath = `${process.cwd()}/assets/render-timeout-fallback.png`; diff --git a/test/acceptance/vector-layergroup.js b/test/acceptance/vector-layergroup-test.js similarity index 98% rename from test/acceptance/vector-layergroup.js rename to test/acceptance/vector-layergroup-test.js index d23403db..47fdf1be 100644 --- a/test/acceptance/vector-layergroup.js +++ b/test/acceptance/vector-layergroup-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); const assert = require('../support/assert'); const TestClient = require('../support/test-client'); -const serverOptions = require('../../lib/cartodb/server_options'); +const serverOptions = require('../../lib/server-options'); const POINTS_SQL_1 = ` diff --git a/test/acceptance/widgets/aggregation.js b/test/acceptance/widgets/aggregation-test.js similarity index 98% rename from test/acceptance/widgets/aggregation.js rename to test/acceptance/widgets/aggregation-test.js index 8977ef19..dbca2c82 100644 --- a/test/acceptance/widgets/aggregation.js +++ b/test/acceptance/widgets/aggregation-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/widgets/histogram.js b/test/acceptance/widgets/histogram-test.js similarity index 99% rename from test/acceptance/widgets/histogram.js rename to test/acceptance/widgets/histogram-test.js index 503218e9..dafed514 100644 --- a/test/acceptance/widgets/histogram.js +++ b/test/acceptance/widgets/histogram-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/widgets/named-maps.js b/test/acceptance/widgets/named-maps-test.js similarity index 96% rename from test/acceptance/widgets/named-maps.js rename to test/acceptance/widgets/named-maps-test.js index ab136dc0..622b7bc0 100644 --- a/test/acceptance/widgets/named-maps.js +++ b/test/acceptance/widgets/named-maps-test.js @@ -6,12 +6,12 @@ var step = require('step'); var url = require('url'); var queue = require('queue-async'); -var helper = require('../../support/test_helper'); +var helper = require('../../support/test-helper'); -var CartodbWindshaft = require('../../../lib/cartodb/server'); -var serverOptions = require('../../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../../lib/server'); +var serverOptions = require('../../../lib/server-options'); -var LayergroupToken = require('../../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../../lib/models/layergroup-token'); describe('named-maps widgets', function() { var server; diff --git a/test/acceptance/widgets/ported/aggregation.js b/test/acceptance/widgets/ported/aggregation-test.js similarity index 99% rename from test/acceptance/widgets/ported/aggregation.js rename to test/acceptance/widgets/ported/aggregation-test.js index 2f36d3bb..d16faad2 100644 --- a/test/acceptance/widgets/ported/aggregation.js +++ b/test/acceptance/widgets/ported/aggregation-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../../support/test-helper'); var assert = require('../../../support/assert'); var TestClient = require('../../../support/test-client'); diff --git a/test/acceptance/widgets/ported/formula.js b/test/acceptance/widgets/ported/formula-test.js similarity index 98% rename from test/acceptance/widgets/ported/formula.js rename to test/acceptance/widgets/ported/formula-test.js index c3ca2bc6..546c86d3 100644 --- a/test/acceptance/widgets/ported/formula.js +++ b/test/acceptance/widgets/ported/formula-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../../support/test-helper'); var assert = require('../../../support/assert'); var TestClient = require('../../../support/test-client'); diff --git a/test/acceptance/widgets/ported/histogram.js b/test/acceptance/widgets/ported/histogram-test.js similarity index 99% rename from test/acceptance/widgets/ported/histogram.js rename to test/acceptance/widgets/ported/histogram-test.js index 510feb9e..587a7fef 100644 --- a/test/acceptance/widgets/ported/histogram.js +++ b/test/acceptance/widgets/ported/histogram-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../../support/test-helper'); var assert = require('../../../support/assert'); var TestClient = require('../../../support/test-client'); diff --git a/test/acceptance/widgets/regressions.js b/test/acceptance/widgets/regressions-test.js similarity index 99% rename from test/acceptance/widgets/regressions.js rename to test/acceptance/widgets/regressions-test.js index 755e2a96..6b67a138 100644 --- a/test/acceptance/widgets/regressions.js +++ b/test/acceptance/widgets/regressions-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/acceptance/widgets/widgets.js b/test/acceptance/widgets/widgets-test.js similarity index 99% rename from test/acceptance/widgets/widgets.js rename to test/acceptance/widgets/widgets-test.js index 94ecb0a2..a760a5c4 100644 --- a/test/acceptance/widgets/widgets.js +++ b/test/acceptance/widgets/widgets-test.js @@ -1,6 +1,6 @@ 'use strict'; -require('../../support/test_helper'); +require('../../support/test-helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); diff --git a/test/integration/analysis-backend-limits.js b/test/integration/analysis-backend-limits-test.js similarity index 97% rename from test/integration/analysis-backend-limits.js rename to test/integration/analysis-backend-limits-test.js index 21e7d9cc..be16ef90 100644 --- a/test/integration/analysis-backend-limits.js +++ b/test/integration/analysis-backend-limits-test.js @@ -1,6 +1,6 @@ 'use strict'; -var testHelper = require('../support/test_helper'); +var testHelper = require('../support/test-helper'); var assert = require('assert'); var redis = require('redis'); @@ -8,7 +8,7 @@ var redis = require('redis'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var AnalysisBackend = require('../../lib/cartodb/backends/analysis'); +var AnalysisBackend = require('../../lib/backends/analysis'); describe('analysis-backend limits', function() { diff --git a/test/integration/mapconfig_named_layers_datasource.js b/test/integration/mapconfig-named-layers-datasource-test.js similarity index 97% rename from test/integration/mapconfig_named_layers_datasource.js rename to test/integration/mapconfig-named-layers-datasource-test.js index d3eefd28..261069cb 100644 --- a/test/integration/mapconfig_named_layers_datasource.js +++ b/test/integration/mapconfig-named-layers-datasource-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); -var PgConnection = require(__dirname + '/../../lib/cartodb/backends/pg_connection'); -var MapConfigNamedLayersAdapter = require('../../lib/cartodb/models/mapconfig/adapter/mapconfig-named-layers-adapter'); +var TemplateMaps = require('../../lib/backends/template-maps'); +var PgConnection = require('../../lib/backends/pg-connection'); +var MapConfigNamedLayersAdapter = require('../../lib/models/mapconfig/adapter/mapconfig-named-layers-adapter'); // configure redis pool instance to use in tests var redisPool = new RedisPool(global.environment.redis); diff --git a/test/integration/mapconfig_named_layers_expanded.js b/test/integration/mapconfig-named-layers-expanded-test.js similarity index 97% rename from test/integration/mapconfig_named_layers_expanded.js rename to test/integration/mapconfig-named-layers-expanded-test.js index ea3a34a4..b0d2ea22 100644 --- a/test/integration/mapconfig_named_layers_expanded.js +++ b/test/integration/mapconfig-named-layers-expanded-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps.js'); -var PgConnection = require(__dirname + '/../../lib/cartodb/backends/pg_connection'); -var MapConfigNamedLayersAdapter = require('../../lib/cartodb/models/mapconfig/adapter/mapconfig-named-layers-adapter'); +var TemplateMaps = require('../../lib/backends/template-maps'); +var PgConnection = require('../../lib/backends/pg-connection'); +var MapConfigNamedLayersAdapter = require('../../lib/models/mapconfig/adapter/mapconfig-named-layers-adapter'); describe('mapconfig-named-layers-adapter', function() { diff --git a/test/integration/mapconfig_overviews_adapter.js b/test/integration/mapconfig-overviews-adapter-test.js similarity index 88% rename from test/integration/mapconfig_overviews_adapter.js rename to test/integration/mapconfig-overviews-adapter-test.js index 64a2d0c9..e1bb932a 100644 --- a/test/integration/mapconfig_overviews_adapter.js +++ b/test/integration/mapconfig-overviews-adapter-test.js @@ -1,15 +1,15 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var PgConnection = require(__dirname + '/../../lib/cartodb/backends/pg_connection'); -var PgQueryRunner = require('../../lib/cartodb/backends/pg_query_runner'); -var OverviewsMetadataBackend = require('../../lib/cartodb/backends/overviews-metadata'); -var FilterStatsBackend = require('../../lib/cartodb/backends/filter-stats'); -var MapConfigOverviewsAdapter = require('../../lib/cartodb/models/mapconfig/adapter/mapconfig-overviews-adapter'); +var PgConnection = require('../../lib/backends/pg-connection'); +var PgQueryRunner = require('../../lib/backends/pg-query-runner'); +var OverviewsMetadataBackend = require('../../lib/backends/overviews-metadata'); +var FilterStatsBackend = require('../../lib/backends/filter-stats'); +var MapConfigOverviewsAdapter = require('../../lib/models/mapconfig/adapter/mapconfig-overviews-adapter'); var redisPool = new RedisPool(global.environment.redis); var metadataBackend = cartodbRedis({pool: redisPool}); diff --git a/test/integration/overviews-metadata-api.js b/test/integration/overviews-metadata-api-test.js similarity index 84% rename from test/integration/overviews-metadata-api.js rename to test/integration/overviews-metadata-api-test.js index c3e241ec..237fb2f9 100644 --- a/test/integration/overviews-metadata-api.js +++ b/test/integration/overviews-metadata-api-test.js @@ -1,15 +1,15 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var PgConnection = require('../../lib/cartodb/backends/pg_connection'); -var PgQueryRunner = require('../../lib/cartodb/backends/pg_query_runner'); -var OverviewsMetadataBackend = require('../../lib/cartodb/backends/overviews-metadata'); +var PgConnection = require('../../lib/backends/pg-connection'); +var PgQueryRunner = require('../../lib/backends/pg-query-runner'); +var OverviewsMetadataBackend = require('../../lib/backends/overviews-metadata'); describe('OverviewsMetadataBackend', function() { diff --git a/test/integration/pg-query-runner.js b/test/integration/pg-query-runner-test.js similarity index 86% rename from test/integration/pg-query-runner.js rename to test/integration/pg-query-runner-test.js index a979ee81..e7f403f4 100644 --- a/test/integration/pg-query-runner.js +++ b/test/integration/pg-query-runner-test.js @@ -1,14 +1,14 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var PgConnection = require('../../lib/cartodb/backends/pg_connection'); -var PgQueryRunner = require('../../lib/cartodb/backends/pg_query_runner'); +var PgConnection = require('../../lib/backends/pg-connection'); +var PgQueryRunner = require('../../lib/backends/pg-query-runner'); describe('PgQueryRunner', function() { diff --git a/test/integration/profiler.js b/test/integration/profiler-test.js similarity index 87% rename from test/integration/profiler.js rename to test/integration/profiler-test.js index 4bc7ee0e..2db98261 100644 --- a/test/integration/profiler.js +++ b/test/integration/profiler-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); -var StatsClient = require('../../lib/cartodb/stats/client'); -var ProfilerProxy = require('../../lib/cartodb/stats/profiler_proxy'); +var StatsClient = require('../../lib/stats/client'); +var ProfilerProxy = require('../../lib/stats/profiler-proxy'); describe('profiler + statsd', function() { var statsInstance; diff --git a/test/integration/query-tables.js b/test/integration/query-tables-test.js similarity index 95% rename from test/integration/query-tables.js rename to test/integration/query-tables-test.js index 721de841..e44d66b9 100644 --- a/test/integration/query-tables.js +++ b/test/integration/query-tables-test.js @@ -1,13 +1,13 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var PgConnection = require('../../lib/cartodb/backends/pg_connection'); +var PgConnection = require('../../lib/backends/pg-connection'); var QueryTables = require('cartodb-query-tables').queryTables; diff --git a/test/integration/template-maps-limits.js b/test/integration/template-maps-limits-test.js similarity index 95% rename from test/integration/template-maps-limits.js rename to test/integration/template-maps-limits-test.js index 37f3ca9f..95bcc410 100644 --- a/test/integration/template-maps-limits.js +++ b/test/integration/template-maps-limits-test.js @@ -1,11 +1,11 @@ 'use strict'; -require('../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var redis = require('redis'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/cartodb/backends/template_maps'); +var TemplateMaps = require('../../lib/backends/template-maps'); describe('TemplateMaps limits', function() { diff --git a/test/support/test-client.js b/test/support/test-client.js index 5d88f6e0..0483f0ce 100644 --- a/test/support/test-client.js +++ b/test/support/test-client.js @@ -7,13 +7,13 @@ var PSQL = require('cartodb-psql'); var _ = require('underscore'); var mapnik = require('windshaft').mapnik; -var LayergroupToken = require('../../lib/cartodb/models/layergroup-token'); +var LayergroupToken = require('../../lib/models/layergroup-token'); var assert = require('./assert'); -var helper = require('./test_helper'); +var helper = require('./test-helper'); -var CartodbWindshaft = require('../../lib/cartodb/server'); -var serverOptions = require('../../lib/cartodb/server_options'); +var CartodbWindshaft = require('../../lib/server'); +var serverOptions = require('../../lib/server-options'); serverOptions.analysis.batch.inlineExecution = true; const MAPNIK_SUPPORTED_FORMATS = { diff --git a/test/support/test_helper.js b/test/support/test-helper.js similarity index 97% rename from test/support/test_helper.js rename to test/support/test-helper.js index 55fad97a..1ae8d77d 100644 --- a/test/support/test_helper.js +++ b/test/support/test-helper.js @@ -15,10 +15,10 @@ var lzmaWorker = new LZMA(); var redis = require('redis'); var log4js = require('log4js'); -const setICUEnvVariable = require('../../lib/cartodb/utils/icu_data_env_setter'); +const setICUEnvVariable = require('../../lib/utils/icu-data-env-setter'); // set environment specific variables -global.environment = require(__dirname + '/../../config/environments/test'); +global.environment = require('../../config/environments/test'); global.environment.name = 'test'; process.env.NODE_ENV = 'test'; diff --git a/test/unit/cartodb/backends/layer-stats/mapnik-layer-stats.js b/test/unit/backends/layer-stats/mapnik-layer-stats-test.js similarity index 98% rename from test/unit/cartodb/backends/layer-stats/mapnik-layer-stats.js rename to test/unit/backends/layer-stats/mapnik-layer-stats-test.js index 874fba28..6860a781 100644 --- a/test/unit/cartodb/backends/layer-stats/mapnik-layer-stats.js +++ b/test/unit/backends/layer-stats/mapnik-layer-stats-test.js @@ -1,7 +1,7 @@ 'use strict'; var assert = require('assert'); -var MapnikLayerStats = require('../../../../../lib/cartodb/backends/layer-stats/mapnik-layer-stats'); +var MapnikLayerStats = require('../../../../lib/backends/layer-stats/mapnik-layer-stats'); var MapConfig = require('windshaft').model.MapConfig; function getDbConnectionMock () { diff --git a/test/unit/cartodb/backends/layer-stats/torque-layer-stats.js b/test/unit/backends/layer-stats/torque-layer-stats-test.js similarity index 91% rename from test/unit/cartodb/backends/layer-stats/torque-layer-stats.js rename to test/unit/backends/layer-stats/torque-layer-stats-test.js index c00260c8..6156bbe6 100644 --- a/test/unit/cartodb/backends/layer-stats/torque-layer-stats.js +++ b/test/unit/backends/layer-stats/torque-layer-stats-test.js @@ -1,7 +1,7 @@ 'use strict'; var assert = require('assert'); -var TorqueLayerStats = require('../../../../../lib/cartodb/backends/layer-stats/torque-layer-stats'); +var TorqueLayerStats = require('../../../../lib/backends/layer-stats/torque-layer-stats'); var MapConfig = require('windshaft').model.MapConfig; describe('torque-layer-stats', function () { diff --git a/test/unit/cartodb/backends/turbo-carto-postgres-datasource.js b/test/unit/backends/turbo-carto-postgres-datasource-test.js similarity index 93% rename from test/unit/cartodb/backends/turbo-carto-postgres-datasource.js rename to test/unit/backends/turbo-carto-postgres-datasource-test.js index 861f51d8..303517e1 100644 --- a/test/unit/cartodb/backends/turbo-carto-postgres-datasource.js +++ b/test/unit/backends/turbo-carto-postgres-datasource-test.js @@ -1,6 +1,6 @@ 'use strict'; -var PostgresDatasource = require('../../../../lib/cartodb/backends/turbo-carto-postgres-datasource'); +var PostgresDatasource = require('../../../lib/backends/turbo-carto-postgres-datasource'); var PSQL = require('cartodb-psql'); var _ = require('underscore'); var assert = require('assert'); diff --git a/test/unit/cartodb/cache/model/named_maps_entry.test.js b/test/unit/cache/model/named-maps-entry-test.js similarity index 81% rename from test/unit/cartodb/cache/model/named_maps_entry.test.js rename to test/unit/cache/model/named-maps-entry-test.js index 335f30c7..69ba81b2 100644 --- a/test/unit/cartodb/cache/model/named_maps_entry.test.js +++ b/test/unit/cache/model/named-maps-entry-test.js @@ -1,12 +1,12 @@ 'use strict'; -require('../../../../support/test_helper'); +require('../../../support/test-helper'); var assert = require('assert'); var _ = require('underscore'); -var NamedMapsCacheEntry = require('../../../../../lib/cartodb/cache/model/named_maps_entry'); +var NamedMapsCacheEntry = require('../../../../lib/cache/model/named-maps-entry'); -describe('cache named_maps_entry', function() { +describe('cache named maps entry', function() { var namedMapOwner = 'foo', namedMapName = 'wadus_name', diff --git a/test/unit/cartodb/cdb_request.test.js b/test/unit/cdb-request-test.js similarity index 95% rename from test/unit/cartodb/cdb_request.test.js rename to test/unit/cdb-request-test.js index 0dbf35a3..49b1253b 100644 --- a/test/unit/cartodb/cdb_request.test.js +++ b/test/unit/cdb-request-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); -var CdbRequest = require('../../../lib/cartodb/models/cdb_request'); +var CdbRequest = require('../../lib/models/cdb-request'); describe('req2params', function() { diff --git a/test/unit/cartodb/error_messages.test.js b/test/unit/error-messages-test.js similarity index 86% rename from test/unit/cartodb/error_messages.test.js rename to test/unit/error-messages-test.js index 13ea1661..86b3b43a 100644 --- a/test/unit/cartodb/error_messages.test.js +++ b/test/unit/error-messages-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); -var errorMiddleware = require('../../../lib/cartodb/api/middlewares/error-middleware'); +var errorMiddleware = require('../../lib/api/middlewares/error-middleware'); describe('error messages clean up', function() { diff --git a/test/unit/cartodb/error-middleware.test.js b/test/unit/error-middleware-test.js similarity index 97% rename from test/unit/cartodb/error-middleware.test.js rename to test/unit/error-middleware-test.js index 1f17ed9c..d7670c6a 100644 --- a/test/unit/cartodb/error-middleware.test.js +++ b/test/unit/error-middleware-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper.js'); +require('../support/test-helper'); var assert = require('assert'); -var errorMiddleware = require('../../../lib/cartodb/api/middlewares/error-middleware'); +var errorMiddleware = require('../../lib/api/middlewares/error-middleware'); describe('error-middleware', function() { diff --git a/test/unit/cartodb/lzmaMiddleware.test.js b/test/unit/lzma-middleware-test.js similarity index 89% rename from test/unit/cartodb/lzmaMiddleware.test.js rename to test/unit/lzma-middleware-test.js index 4dc355fb..b176a207 100644 --- a/test/unit/cartodb/lzmaMiddleware.test.js +++ b/test/unit/lzma-middleware-test.js @@ -1,9 +1,9 @@ 'use strict'; var assert = require('assert'); -var testHelper = require('../../support/test_helper'); +var testHelper = require('../support/test-helper'); -var lzmaMiddleware = require('../../../lib/cartodb/api/middlewares/lzma'); +var lzmaMiddleware = require('../../lib/api/middlewares/lzma'); describe('lzma-middleware', function() { diff --git a/test/unit/cartodb/mapconfig/adapter.test.js b/test/unit/mapconfig/adapter-test.js similarity index 96% rename from test/unit/cartodb/mapconfig/adapter.test.js rename to test/unit/mapconfig/adapter-test.js index d2832c78..5adeb4a5 100644 --- a/test/unit/cartodb/mapconfig/adapter.test.js +++ b/test/unit/mapconfig/adapter-test.js @@ -1,9 +1,9 @@ 'use strict'; -//require('../../../support/test_helper'); +//require('../../../support/test-helper'); var assert = require('assert'); -var MapConfigAdapter = require('../../../../lib/cartodb/models/mapconfig/adapter'); +var MapConfigAdapter = require('../../../lib/models/mapconfig/adapter'); describe('MapConfigAdapter', function() { var user = 'wadus'; diff --git a/test/unit/cartodb/mapconfig/dataviews-widgets-adapter.test.js b/test/unit/mapconfig/dataviews-widgets-adapter-test.js similarity index 98% rename from test/unit/cartodb/mapconfig/dataviews-widgets-adapter.test.js rename to test/unit/mapconfig/dataviews-widgets-adapter-test.js index 58eaa709..1b1e657b 100644 --- a/test/unit/cartodb/mapconfig/dataviews-widgets-adapter.test.js +++ b/test/unit/mapconfig/dataviews-widgets-adapter-test.js @@ -1,9 +1,9 @@ 'use strict'; -//require('../../../support/test_helper'); +//require('../../../support/test-helper'); var assert = require('assert'); -var DataviewsMapConfigAdapter = require('../../../../lib/cartodb/models/mapconfig/adapter/dataviews-widgets-adapter'); +var DataviewsMapConfigAdapter = require('../../../lib/models/mapconfig/adapter/dataviews-widgets-adapter'); describe('dataviews-widgets-adapter', function() { diff --git a/test/unit/cartodb/middlewares/coordinates.test.js b/test/unit/middlewares/coordinates-test.js similarity index 98% rename from test/unit/cartodb/middlewares/coordinates.test.js rename to test/unit/middlewares/coordinates-test.js index f6c39d88..f2f94357 100644 --- a/test/unit/cartodb/middlewares/coordinates.test.js +++ b/test/unit/middlewares/coordinates-test.js @@ -1,7 +1,7 @@ 'use strict'; const assert = require('assert'); -const coordinates = require('../../../../lib/cartodb/api/middlewares/coordinates'); +const coordinates = require('../../../lib/api/middlewares/coordinates'); describe('coordinates middleware', function () { it('should return error: invalid zoom paramenter (-1)', function (done) { diff --git a/test/unit/cartodb/model/filter/bbox-filters.test.js b/test/unit/model/filter/bbox-filters-test.js similarity index 96% rename from test/unit/cartodb/model/filter/bbox-filters.test.js rename to test/unit/model/filter/bbox-filters-test.js index a0e7a14b..6e5100a6 100644 --- a/test/unit/cartodb/model/filter/bbox-filters.test.js +++ b/test/unit/model/filter/bbox-filters-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../../../support/test_helper'); +require('../../../support/test-helper'); var util = require('util'); -var assert = require('../../../../support/assert'); -var BboxFilter = require('../../../../../lib/cartodb/models/filter/bbox'); +var assert = require('../../../support/assert'); +var BboxFilter = require('../../../../lib/models/filter/bbox'); var MAX_EXTENT_MERCATOR_REF = [ -BboxFilter.LONGITUDE_MAX_VALUE, diff --git a/test/unit/cartodb/model/resource-locator.test.js b/test/unit/model/resource-locator-test.js similarity index 98% rename from test/unit/cartodb/model/resource-locator.test.js rename to test/unit/model/resource-locator-test.js index e9571c3e..b26ebf54 100644 --- a/test/unit/cartodb/model/resource-locator.test.js +++ b/test/unit/model/resource-locator-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../support/test-helper'); -var assert = require('../../../support/assert'); -var ResourceLocator = require('../../../../lib/cartodb/models/resource-locator'); +var assert = require('../../support/assert'); +var ResourceLocator = require('../../../lib/models/resource-locator'); describe('ResourceLocator', function() { var USERNAME = 'username'; diff --git a/test/unit/cartodb/overviews_query_rewriter.js b/test/unit/overviews-query-rewriter-test.js similarity index 99% rename from test/unit/cartodb/overviews_query_rewriter.js rename to test/unit/overviews-query-rewriter-test.js index a3d07e4c..4b54d426 100644 --- a/test/unit/cartodb/overviews_query_rewriter.js +++ b/test/unit/overviews-query-rewriter-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); -var OverviewsQueryRewriter = require('../../../lib/cartodb/utils/overviews_query_rewriter'); +var OverviewsQueryRewriter = require('../../lib/utils/overviews-query-rewriter'); var overviewsQueryRewriter = new OverviewsQueryRewriter({ zoom_level: 'ZoomLevel()' }); diff --git a/test/unit/cartodb/ported/profiler.test.js b/test/unit/ported/profiler-test.js similarity index 81% rename from test/unit/cartodb/ported/profiler.test.js rename to test/unit/ported/profiler-test.js index d9bc775e..5dcedf9a 100644 --- a/test/unit/cartodb/ported/profiler.test.js +++ b/test/unit/ported/profiler-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../support/test-helper'); var assert = require('assert'); -var ProfilerProxy = require('../../../../lib/cartodb/stats/profiler_proxy'); +var ProfilerProxy = require('../../../lib/stats/profiler-proxy'); describe('profiler', function() { diff --git a/test/unit/cartodb/ported/stats_client.test.js b/test/unit/ported/stats-client-test.js similarity index 91% rename from test/unit/cartodb/ported/stats_client.test.js rename to test/unit/ported/stats-client-test.js index 230d8b25..dba123b5 100644 --- a/test/unit/cartodb/ported/stats_client.test.js +++ b/test/unit/ported/stats-client-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../../support/test_helper'); +require('../../support/test-helper'); var assert = require('assert'); -var StatsClient = require('../../../../lib/cartodb/stats/client'); +var StatsClient = require('../../../lib/stats/client'); describe('stats client', function() { var statsInstance; diff --git a/test/unit/cartodb/ported/windshaft_server.test.js b/test/unit/ported/windshaft-server-test.js similarity index 84% rename from test/unit/cartodb/ported/windshaft_server.test.js rename to test/unit/ported/windshaft-server-test.js index 1591dc45..3085c266 100644 --- a/test/unit/cartodb/ported/windshaft_server.test.js +++ b/test/unit/ported/windshaft-server-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../../support/test_helper.js'); +require('../../support/test-helper'); var assert = require('assert'); -var cartodbServer = require('../../../../lib/cartodb/server'); -var serverOptions = require('../../../../lib/cartodb/server_options'); +var cartodbServer = require('../../../lib/server'); +var serverOptions = require('../../../lib/server-options'); describe('windshaft', function() { diff --git a/test/unit/cartodb/prepare-context.test.js b/test/unit/prepare-context-test.js similarity index 92% rename from test/unit/cartodb/prepare-context.test.js rename to test/unit/prepare-context-test.js index 5de8a677..b8675f99 100644 --- a/test/unit/cartodb/prepare-context.test.js +++ b/test/unit/prepare-context-test.js @@ -5,14 +5,14 @@ var _ = require('underscore'); var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); -var PgConnection = require('../../../lib/cartodb/backends/pg_connection'); -var AuthBackend = require('../../../lib/cartodb/backends/auth'); -var TemplateMaps = require('../../../lib/cartodb/backends/template_maps'); +var PgConnection = require('../../lib/backends/pg-connection'); +var AuthBackend = require('../../lib/backends/auth'); +var TemplateMaps = require('../../lib/backends/template-maps'); -const cleanUpQueryParamsMiddleware = require('../../../lib/cartodb/api/middlewares/clean-up-query-params'); -const authorizeMiddleware = require('../../../lib/cartodb/api/middlewares/authorize'); -const dbConnSetupMiddleware = require('../../../lib/cartodb/api/middlewares/db-conn-setup'); -const credentialsMiddleware = require('../../../lib/cartodb/api/middlewares/credentials'); +const cleanUpQueryParamsMiddleware = require('../../lib/api/middlewares/clean-up-query-params'); +const authorizeMiddleware = require('../../lib/api/middlewares/authorize'); +const dbConnSetupMiddleware = require('../../lib/api/middlewares/db-conn-setup'); +const credentialsMiddleware = require('../../lib/api/middlewares/credentials'); var windshaft = require('windshaft'); @@ -42,7 +42,7 @@ describe('prepare-context', function() { }); - it('can be found in server_options', function(){ + it('can be found in server-options', function(){ assert.ok(_.isFunction(authorize)); assert.ok(_.isFunction(dbConnSetup)); assert.ok(_.isFunction(cleanUpQueryParams)); diff --git a/test/unit/cartodb/stats/reporter/named-map-provider.js b/test/unit/stats/reporter/named-map-provider-test.js similarity index 93% rename from test/unit/cartodb/stats/reporter/named-map-provider.js rename to test/unit/stats/reporter/named-map-provider-test.js index f99a9edf..48712be4 100644 --- a/test/unit/cartodb/stats/reporter/named-map-provider.js +++ b/test/unit/stats/reporter/named-map-provider-test.js @@ -1,7 +1,7 @@ 'use strict'; const assert = require('assert'); -const NamedMapProviderReporter = require('../../../../../lib/cartodb/stats/reporter/named-map-provider'); +const NamedMapProviderReporter = require('../../../../lib/stats/reporter/named-map-provider'); describe('named-map-provider-reporter', function () { it('should report metrics every 100 ms', function (done) { diff --git a/test/unit/cartodb/substitution-tokens.test.js b/test/unit/substitution-tokens-test.js similarity index 94% rename from test/unit/cartodb/substitution-tokens.test.js rename to test/unit/substitution-tokens-test.js index 61b78e39..7a9e5cda 100644 --- a/test/unit/cartodb/substitution-tokens.test.js +++ b/test/unit/substitution-tokens-test.js @@ -1,7 +1,7 @@ 'use strict'; var assert = require('assert'); -var SubstitutionTokens = require('../../../lib/cartodb/utils/substitution-tokens'); +var SubstitutionTokens = require('../../lib/utils/substitution-tokens'); describe('SubstitutionTokens', function() { diff --git a/test/unit/cartodb/table_name_parser.js b/test/unit/table-name-parser-test.js similarity index 95% rename from test/unit/cartodb/table_name_parser.js rename to test/unit/table-name-parser-test.js index 3c7aac48..e5cb73fa 100644 --- a/test/unit/cartodb/table_name_parser.js +++ b/test/unit/table-name-parser-test.js @@ -1,9 +1,9 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); -var TableNameParser = require('../../../lib/cartodb/utils/table_name_parser'); +var TableNameParser = require('../../lib/utils/table-name-parser'); describe('TableNameParser', function() { diff --git a/test/unit/cartodb/template_maps_auth.test.js b/test/unit/template-maps-auth-test.js similarity index 96% rename from test/unit/cartodb/template_maps_auth.test.js rename to test/unit/template-maps-auth-test.js index 9497adde..4b7ff943 100644 --- a/test/unit/cartodb/template_maps_auth.test.js +++ b/test/unit/template-maps-auth-test.js @@ -1,11 +1,11 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/cartodb/backends/template_maps'); +var TemplateMaps = require('../../lib/backends/template-maps'); describe('template_maps_auth', function() { diff --git a/test/unit/cartodb/template_maps_defaults.test.js b/test/unit/template-maps-defaults-test.js similarity index 96% rename from test/unit/cartodb/template_maps_defaults.test.js rename to test/unit/template-maps-defaults-test.js index dc612cd5..3c98e77d 100644 --- a/test/unit/cartodb/template_maps_defaults.test.js +++ b/test/unit/template-maps-defaults-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/cartodb/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var _ = require('underscore'); describe('template_maps', function() { diff --git a/test/unit/cartodb/template_maps.test.js b/test/unit/template-maps-test.js similarity index 99% rename from test/unit/cartodb/template_maps.test.js rename to test/unit/template-maps-test.js index d504dc2d..f4aa376b 100644 --- a/test/unit/cartodb/template_maps.test.js +++ b/test/unit/template-maps-test.js @@ -1,10 +1,10 @@ 'use strict'; -var testHelper = require('../../support/test_helper'); +var testHelper = require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/cartodb/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var step = require('step'); var _ = require('underscore'); diff --git a/test/unit/cartodb/utils/date-wrapper.test.js b/test/unit/utils/date-wrapper-test.js similarity index 86% rename from test/unit/cartodb/utils/date-wrapper.test.js rename to test/unit/utils/date-wrapper-test.js index 0ef7c126..a76d0792 100644 --- a/test/unit/cartodb/utils/date-wrapper.test.js +++ b/test/unit/utils/date-wrapper-test.js @@ -1,7 +1,7 @@ 'use strict'; var assert = require('assert'); -var dateWrapper = require('../../../../lib/cartodb/utils/date-wrapper'); +var dateWrapper = require('../../../lib/utils/date-wrapper'); describe('date-wrapper', function() { diff --git a/test/unit/cartodb/valid_template_maps.test.js b/test/unit/valid-template-maps-test.js similarity index 96% rename from test/unit/cartodb/valid_template_maps.test.js rename to test/unit/valid-template-maps-test.js index c9a90b2c..e38d9488 100644 --- a/test/unit/cartodb/valid_template_maps.test.js +++ b/test/unit/valid-template-maps-test.js @@ -1,10 +1,10 @@ 'use strict'; -require('../../support/test_helper'); +require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/cartodb/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var _ = require('underscore'); describe('template_maps', function() {