Skip to content

Commit

Permalink
make qa-https-everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Sep 12, 2016
1 parent 7070129 commit 184b958
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 105 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OH_RELATED_TAGS ?= related_tags.txt
STATS_FOR_BOUNDARIES ?= stats_for_boundaries.txt

API_URL_TAGINFO ?= https://taginfo.openstreetmap.org/api
API_URL_OVERPASS ?= http://overpass-api.de/api
API_URL_OVERPASS ?= https://overpass-api.de/api
# GnuTLS: A TLS warning alert has been received.
# GnuTLS: received alert [112]: The server name sent was not recognized

Expand Down Expand Up @@ -43,7 +43,7 @@ MAKE_OPTIONS ?= --no-print-directory
CHECK_LANG ?= 'en'
## }}}

REPO_FILES ?= git ls-files -z | grep --null-data --invert-match '^submodules/' --null
REPO_FILES ?= git ls-files -z | xargs --null -I '{}' find '{}' -type f -regextype posix-extended -not -regex '.*/?submodules/.*' -print0

.PHONY: default
default: list
Expand Down Expand Up @@ -138,8 +138,8 @@ qa-source-code:
$(REPO_FILES) | egrep --null-data '\.js$$' --null | xargs -0 sed -i 's/\([^=!]\)==\([^=]\)/\1===\2/g;s/\([^=!]\)!=\([^=]\)/\1!==\2/g;'

qa-https-everywhere:
$(REPO_FILES) | xargs -0 sed --regexp-extended --in-place 's#http://(overpass-turbo\.eu|www\.gnu\.org|stackoverflow\.com|openstreetmap\.org|www\.openstreetmap\.org|nominatim\.openstreetmap\.org|taginfo\.openstreetmap\.org|wiki\.openstreetmap\.org|josm.openstreetmap.de)#https://\1#g;'
# $(REPO_FILES) | xargs -0 sed -i 's#http://overpass-api.de/#https://overpass-api.de/#g;'
$(REPO_FILES) | xargs -0 sed --regexp-extended --in-place 's#http(:\\?/\\?/)(overpass-turbo\.eu|www\.gnu\.org|stackoverflow\.com|openstreetmap\.org|www\.openstreetmap\.org|nominatim\.openstreetmap\.org|taginfo\.openstreetmap\.org|wiki\.openstreetmap\.org|josm.openstreetmap.de|www.openstreetmap.org\\/copyright)#https\1\2#g;'
$(REPO_FILES) | xargs -0 sed -i 's#http://overpass-api.de/#https://overpass-api.de/#g;'
$(REPO_FILES) | xargs -0 sed --regexp-extended --in-place 's#http://(\w+\.wikipedia\.org)#https://\1#g;'
test -f index.html && git checkout index.html
# ack 'http://'
Expand Down
2 changes: 1 addition & 1 deletion interactive_testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var net = require('net');

// used for sunrise, sunset and PH,SH
// https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487429714954&lon=9.81602098644987&zoom=18&addressdetails=1
var nominatimTestJSON = {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"}};
var nominatimTestJSON = {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"}};

function opening_hours_object(value) {
var oh;
Expand Down
2 changes: 1 addition & 1 deletion js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function Evaluate (offset, reset) {
function() {
/* Set fallback Nominatim answer to allow using the evaluation tool even without Nominatim. */
alert("Reverse geocoding of the coordinates using Nominatim was not successful. The evaluation of features of the opening_hours specification which depend this information will be unreliable. Otherwise, this tool will work as expected using a fallback answer. You might want to check your browser settings to fix this.");
nominatim = {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"}};
nominatim = {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"}};
document.forms.check.elements['cc'].value = nominatim.address.country_code;
document.forms.check.elements['state'].value = nominatim.address.state;
Evaluate();
Expand Down
Loading

0 comments on commit 184b958

Please sign in to comment.