diff --git a/config/initializers/urls.rb b/config/initializers/urls.rb index 76d93db0b..52fceb1d3 100644 --- a/config/initializers/urls.rb +++ b/config/initializers/urls.rb @@ -1,5 +1,5 @@ # API URLs -API_ADRESSE_URL = "http://api-adresse.data.gouv.fr/search" +API_ADRESSE_URL = "https://api-adresse.data.gouv.fr/search" API_CARTO_URL = "https://apicarto.sgmap.fr" API_ENTREPRISE_URL = "https://entreprise.api.gouv.fr/v2" API_GEO_URL = "https://geo.api.gouv.fr" diff --git a/spec/fixtures/cassettes/api_adresse_octo.yml b/spec/fixtures/cassettes/api_adresse_octo.yml index 9f8ac6c40..28ed2accb 100644 --- a/spec/fixtures/cassettes/api_adresse_octo.yml +++ b/spec/fixtures/cassettes/api_adresse_octo.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=1&q=50%20av%20des%20champs%20elysees + uri: https://api-adresse.data.gouv.fr/search?limit=1&q=50%20av%20des%20champs%20elysees body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/cassettes/api_adresse_search_nothing.yml b/spec/fixtures/cassettes/api_adresse_search_nothing.yml index b2f2c63a5..d951adbfc 100644 --- a/spec/fixtures/cassettes/api_adresse_search_nothing.yml +++ b/spec/fixtures/cassettes/api_adresse_search_nothing.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=1&q=je%20recherche%20pas%20grand%20chose + uri: https://api-adresse.data.gouv.fr/search?limit=1&q=je%20recherche%20pas%20grand%20chose body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/cassettes/api_adresse_search_nothing_2.yml b/spec/fixtures/cassettes/api_adresse_search_nothing_2.yml index 8eb0b3adf..cbb4a0f66 100644 --- a/spec/fixtures/cassettes/api_adresse_search_nothing_2.yml +++ b/spec/fixtures/cassettes/api_adresse_search_nothing_2.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=5&q=je%20recherche%20pas%20grand%20chose + uri: https://api-adresse.data.gouv.fr/search?limit=5&q=je%20recherche%20pas%20grand%20chose body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/cassettes/api_adresse_search_paris.yml b/spec/fixtures/cassettes/api_adresse_search_paris.yml index 8de476502..ced667e17 100644 --- a/spec/fixtures/cassettes/api_adresse_search_paris.yml +++ b/spec/fixtures/cassettes/api_adresse_search_paris.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=1&q=Paris + uri: https://api-adresse.data.gouv.fr/search?limit=1&q=Paris body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/cassettes/api_adresse_search_paris_2.yml b/spec/fixtures/cassettes/api_adresse_search_paris_2.yml index dd4aee086..5faf1cd88 100644 --- a/spec/fixtures/cassettes/api_adresse_search_paris_2.yml +++ b/spec/fixtures/cassettes/api_adresse_search_paris_2.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=5&q=Paris + uri: https://api-adresse.data.gouv.fr/search?limit=5&q=Paris body: encoding: US-ASCII string: '' diff --git a/spec/fixtures/cassettes/api_adresse_search_paris_3.yml b/spec/fixtures/cassettes/api_adresse_search_paris_3.yml index 40973bfb0..22eca3306 100644 --- a/spec/fixtures/cassettes/api_adresse_search_paris_3.yml +++ b/spec/fixtures/cassettes/api_adresse_search_paris_3.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://api-adresse.data.gouv.fr/search?limit=1&q=50%20AV%20DES%20CHAMPS%20ELYSEES%20complement_adresse%2075008%20PARIS%208 + uri: https://api-adresse.data.gouv.fr/search?limit=1&q=50%20AV%20DES%20CHAMPS%20ELYSEES%20complement_adresse%2075008%20PARIS%208 body: encoding: US-ASCII string: '' diff --git a/spec/lib/api_adresse/address_retriever_spec.rb b/spec/lib/api_adresse/address_retriever_spec.rb index 63b9d099b..80bb61a85 100644 --- a/spec/lib/api_adresse/address_retriever_spec.rb +++ b/spec/lib/api_adresse/address_retriever_spec.rb @@ -9,7 +9,7 @@ describe ApiAdresse::AddressRetriever do subject { described_class.new(request).list } before do - stub_request(:get, "http://api-adresse.data.gouv.fr/search?&q=#{request}&limit=5") + stub_request(:get, "https://api-adresse.data.gouv.fr/search?&q=#{request}&limit=5") .to_return(status: status, body: response, headers: {}) end