-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
499 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
function (resp) { | ||
|
||
resp <- httptest2::gsub_response ( | ||
resp, | ||
"https://nominatim.openstreetmap.org/", | ||
"nominatim/", | ||
fixed = TRUE | ||
) | ||
|
||
resp <- httptest2::gsub_response ( | ||
resp, | ||
"https://wiki.openstreetmap.org/wiki/", | ||
"wiki/", | ||
fixed = TRUE | ||
) | ||
|
||
resp <- httptest2::gsub_response ( | ||
resp, | ||
"overpass.kumi.systems/api/", | ||
"overpass/", | ||
fixed = TRUE | ||
) | ||
|
||
# Timestamp pattern: | ||
ptn <- paste0 ("[A-Za-z]{3},\\s[0-9]{2}\\s[A-Za-z]{3}\\s[0-9]{4}\\s", # date | ||
"[0-9]{2}\\:[0-9]{2}\\:[0-9]{2}") # time | ||
resp <- httptest2::gsub_response ( | ||
resp, | ||
ptn, | ||
"Sat, 01 Jan 20222 00:00:00", | ||
fixed = FALSE | ||
) | ||
|
||
# Datestamp pattern (for api status requests): | ||
ptn <- "[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}T[0-9]{2}\\:[0-9]{2}\\:[0-9]{2}Z" | ||
resp <- httptest2::gsub_response ( | ||
resp, | ||
ptn, | ||
"2022-01-01T00:00:00Z", | ||
fixed = FALSE | ||
) | ||
|
||
return (resp) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.