From e8cff194fc7f8269d1c8f42113de5a2df447f3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 7 Oct 2019 10:50:14 +0200 Subject: [PATCH] Rename template_maps -> template-maps --- lib/api/api-router.js | 2 +- lib/api/template/admin-template-controller.js | 2 +- lib/backends/{template_maps.js => template-maps.js} | 0 lib/cache/named-map-provider-cache.js | 2 +- lib/models/mapconfig/provider/named-map-provider.js | 2 +- test/acceptance/named-layers-visibility.js | 2 +- test/acceptance/named-layers.js | 2 +- test/acceptance/named-maps-authentication.js | 2 +- test/acceptance/named-maps-static-view.js | 2 +- test/acceptance/named-maps-stats.js | 2 +- test/integration/mapconfig-named-layers-datasource.js | 2 +- test/integration/mapconfig-named-layers-expanded.js | 2 +- test/integration/template-maps-limits.js | 2 +- test/unit/cartodb/prepare-context-test.js | 2 +- test/unit/cartodb/template-maps-auth-test.js | 2 +- test/unit/cartodb/template-maps-defaults-test.js | 2 +- test/unit/cartodb/template-maps-test.js | 2 +- test/unit/cartodb/valid-template-maps-test.js | 2 +- 18 files changed, 17 insertions(+), 17 deletions(-) rename lib/backends/{template_maps.js => template-maps.js} (100%) diff --git a/lib/api/api-router.js b/lib/api/api-router.js index d8d11956..9349a515 100644 --- a/lib/api/api-router.js +++ b/lib/api/api-router.js @@ -11,7 +11,7 @@ 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 TemplateMaps = require('../backends/template-maps'); const PgQueryRunner = require('../backends/pg-query-runner'); const StatsBackend = require('../backends/stats'); const AuthBackend = require('../backends/auth'); diff --git a/lib/api/template/admin-template-controller.js b/lib/api/template/admin-template-controller.js index 2416afe2..082d4f34 100644 --- a/lib/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/backends/template_maps.js b/lib/backends/template-maps.js similarity index 100% rename from lib/backends/template_maps.js rename to lib/backends/template-maps.js diff --git a/lib/cache/named-map-provider-cache.js b/lib/cache/named-map-provider-cache.js index ea24f2f5..844a2038 100644 --- a/lib/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/models/mapconfig/provider/named-map-provider.js b/lib/models/mapconfig/provider/named-map-provider.js index 292e5dcb..4b235986 100644 --- a/lib/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/test/acceptance/named-layers-visibility.js b/test/acceptance/named-layers-visibility.js index ceead7ba..cdf08aaf 100644 --- a/test/acceptance/named-layers-visibility.js +++ b/test/acceptance/named-layers-visibility.js @@ -8,7 +8,7 @@ var CartodbWindshaft = require(__dirname + '/../../lib/server'); var serverOptions = require(__dirname + '/../../lib/server-options'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/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-layers.js b/test/acceptance/named-layers.js index 747b9010..79c33f83 100644 --- a/test/acceptance/named-layers.js +++ b/test/acceptance/named-layers.js @@ -9,7 +9,7 @@ var serverOptions = require(__dirname + '/../../lib/server-options'); var LayergroupToken = require('../../lib/models/layergroup-token'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var step = require('step'); diff --git a/test/acceptance/named-maps-authentication.js b/test/acceptance/named-maps-authentication.js index 3a5c41bf..4648458b 100644 --- a/test/acceptance/named-maps-authentication.js +++ b/test/acceptance/named-maps-authentication.js @@ -8,7 +8,7 @@ var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; var CartodbWindshaft = require(__dirname + '/../../lib/server'); var serverOptions = require(__dirname + '/../../lib/server-options'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry'); describe('named maps authentication', function() { diff --git a/test/acceptance/named-maps-static-view.js b/test/acceptance/named-maps-static-view.js index 7da7a606..e6e54195 100644 --- a/test/acceptance/named-maps-static-view.js +++ b/test/acceptance/named-maps-static-view.js @@ -8,7 +8,7 @@ var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; var CartodbWindshaft = require('../../lib/server'); var serverOptions = require('../../lib/server-options'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +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.js index 04481700..fc596bcb 100644 --- a/test/acceptance/named-maps-stats.js +++ b/test/acceptance/named-maps-stats.js @@ -8,7 +8,7 @@ var assert = require('../support/assert'); var mapnik = require('windshaft').mapnik; var CartodbWindshaft = require(__dirname + '/../../lib/server'); var serverOptions = require(__dirname + '/../../lib/server-options'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +var TemplateMaps = require('../../lib/backends/template-maps'); var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry'); describe('named maps preview stats', function() { diff --git a/test/integration/mapconfig-named-layers-datasource.js b/test/integration/mapconfig-named-layers-datasource.js index 878f97f4..261069cb 100644 --- a/test/integration/mapconfig-named-layers-datasource.js +++ b/test/integration/mapconfig-named-layers-datasource.js @@ -4,7 +4,7 @@ require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +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'); diff --git a/test/integration/mapconfig-named-layers-expanded.js b/test/integration/mapconfig-named-layers-expanded.js index 765c396a..b0d2ea22 100644 --- a/test/integration/mapconfig-named-layers-expanded.js +++ b/test/integration/mapconfig-named-layers-expanded.js @@ -4,7 +4,7 @@ require('../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/backends/template_maps.js'); +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'); diff --git a/test/integration/template-maps-limits.js b/test/integration/template-maps-limits.js index 4ff8bcc8..95bcc410 100644 --- a/test/integration/template-maps-limits.js +++ b/test/integration/template-maps-limits.js @@ -5,7 +5,7 @@ require('../support/test-helper'); var assert = require('assert'); var redis = require('redis'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../lib/backends/template_maps'); +var TemplateMaps = require('../../lib/backends/template-maps'); describe('TemplateMaps limits', function() { diff --git a/test/unit/cartodb/prepare-context-test.js b/test/unit/cartodb/prepare-context-test.js index aaa0f2ee..7c91332e 100644 --- a/test/unit/cartodb/prepare-context-test.js +++ b/test/unit/cartodb/prepare-context-test.js @@ -7,7 +7,7 @@ var RedisPool = require('redis-mpool'); var cartodbRedis = require('cartodb-redis'); var PgConnection = require('../../../lib/backends/pg-connection'); var AuthBackend = require('../../../lib/backends/auth'); -var TemplateMaps = require('../../../lib/backends/template_maps'); +var TemplateMaps = require('../../../lib/backends/template-maps'); const cleanUpQueryParamsMiddleware = require('../../../lib/api/middlewares/clean-up-query-params'); const authorizeMiddleware = require('../../../lib/api/middlewares/authorize'); diff --git a/test/unit/cartodb/template-maps-auth-test.js b/test/unit/cartodb/template-maps-auth-test.js index d31abca7..df073324 100644 --- a/test/unit/cartodb/template-maps-auth-test.js +++ b/test/unit/cartodb/template-maps-auth-test.js @@ -5,7 +5,7 @@ require('../../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/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/cartodb/template-maps-defaults-test.js index 188e1ca1..fe0d35c0 100644 --- a/test/unit/cartodb/template-maps-defaults-test.js +++ b/test/unit/cartodb/template-maps-defaults-test.js @@ -4,7 +4,7 @@ require('../../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/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/cartodb/template-maps-test.js index b4cc0162..e8124be9 100644 --- a/test/unit/cartodb/template-maps-test.js +++ b/test/unit/cartodb/template-maps-test.js @@ -4,7 +4,7 @@ var testHelper = require('../../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/backends/template_maps.js'); +var TemplateMaps = require('../../../lib/backends/template-maps'); var step = require('step'); var _ = require('underscore'); diff --git a/test/unit/cartodb/valid-template-maps-test.js b/test/unit/cartodb/valid-template-maps-test.js index d1171f14..8b84291e 100644 --- a/test/unit/cartodb/valid-template-maps-test.js +++ b/test/unit/cartodb/valid-template-maps-test.js @@ -4,7 +4,7 @@ require('../../support/test-helper'); var assert = require('assert'); var RedisPool = require('redis-mpool'); -var TemplateMaps = require('../../../lib/backends/template_maps.js'); +var TemplateMaps = require('../../../lib/backends/template-maps'); var _ = require('underscore'); describe('template_maps', function() {