From 99421545ab364817584b1717574bb03d8c04a229 Mon Sep 17 00:00:00 2001 From: clemkeirua Date: Tue, 23 Jul 2019 14:26:42 +0200 Subject: [PATCH 1/2] replaced api-carto endpoint --- config/initializers/urls.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/urls.rb b/config/initializers/urls.rb index 7d279eec6..afd9bcbd9 100644 --- a/config/initializers/urls.rb +++ b/config/initializers/urls.rb @@ -1,6 +1,6 @@ # API URLs API_ADRESSE_URL = ENV.fetch("API_ADRESSE_URL", "https://api-adresse.data.gouv.fr") -API_CARTO_URL = ENV.fetch("API_CARTO_URL", "https://apicarto.sgmap.fr") +API_CARTO_URL = ENV.fetch("API_CARTO_URL", "https://sandbox.geo.api.gouv.fr/apicarto") API_ENTREPRISE_URL = ENV.fetch("API_ENTREPRISE_URL", "https://entreprise.api.gouv.fr/v2") API_GEO_URL = ENV.fetch("API_GEO_URL", "https://geo.api.gouv.fr") API_GEO_SANDBOX_URL = ENV.fetch("API_GEO_SANDBOX_URL", "https://sandbox.geo.api.gouv.fr") From 0818331319739d28aa8baaa0f58678a66071eaba Mon Sep 17 00:00:00 2001 From: clemkeirua Date: Tue, 23 Jul 2019 15:37:23 +0200 Subject: [PATCH 2/2] changement du endpoint dans les tests --- spec/lib/api_carto/api_spec.rb | 4 ++-- spec/lib/api_carto/cadastre_adapter_spec.rb | 2 +- spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/lib/api_carto/api_spec.rb b/spec/lib/api_carto/api_spec.rb index 900debfda..2e52a58b1 100644 --- a/spec/lib/api_carto/api_spec.rb +++ b/spec/lib/api_carto/api_spec.rb @@ -5,7 +5,7 @@ describe ApiCarto::API do subject { described_class.search_qp(geojson) } before do - stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/quartiers-prioritaires/search") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) @@ -53,7 +53,7 @@ describe ApiCarto::API do subject { described_class.search_cadastre(geojson) } before do - stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/cadastre/geometrie") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) diff --git a/spec/lib/api_carto/cadastre_adapter_spec.rb b/spec/lib/api_carto/cadastre_adapter_spec.rb index 6aa2858ca..aaba3cae7 100644 --- a/spec/lib/api_carto/cadastre_adapter_spec.rb +++ b/spec/lib/api_carto/cadastre_adapter_spec.rb @@ -4,7 +4,7 @@ describe ApiCarto::CadastreAdapter do subject { described_class.new(coordinates).results } before do - stub_request(:post, "https://apicarto.sgmap.fr/cadastre/geometrie") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/cadastre/geometrie") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body) diff --git a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb index b4ac7ef3a..32f5eb60b 100644 --- a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb +++ b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb @@ -4,7 +4,7 @@ describe ApiCarto::QuartiersPrioritairesAdapter do subject { described_class.new(coordinates).results } before do - stub_request(:post, "https://apicarto.sgmap.fr/quartiers-prioritaires/search") + stub_request(:post, "https://sandbox.geo.api.gouv.fr/apicarto/quartiers-prioritaires/search") .with(:body => /.*/, :headers => { 'Content-Type' => 'application/json' }) .to_return(status: status, body: body)