Skip to content

Commit

Permalink
Fix error in fallback method for check_abs_connection() (#248)
Browse files Browse the repository at this point in the history
* look for method env var

* update DESC/NEWS; use method env var in check_abs_connection()

* refresh internal data

* use \describe rather than \itemize in docs for some reason

* update docs

* iterate version

* fix check_abs_connection()

* iterate ver

* go to 0.4.16
  • Loading branch information
MattCowgill authored May 27, 2024
1 parent 47b4f9d commit 01d2f4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: readabs
Type: Package
Title: Download and Tidy Time Series Data from the Australian Bureau of Statistics
Version: 0.4.15
Version: 0.4.16
Authors@R: c(
person("Matt", "Cowgill", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0422-3300")),
person("Zoe", "Meers", role = "aut", email = "[email protected]"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

# readabs 0.4.16
* An error inadvertently introduced in 0.4.15 is fixed. This error would only affect a small minority of users.

# readabs 0.4.15
* read_lfs_datacube() convenience function added
* New environment variable "R_READABS_DL_METHOD" can be set. When set, this is passed to the `method` argument of `download.file()`. Useful on networks where a method such as "wininet" must be used.
Expand Down
2 changes: 1 addition & 1 deletion R/check_abs_connection.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ url_exists <- function(url = "https://www.abs.gov.au") {
#' @noRd
url_exists_nocurl <- function(url = "https://www.abs.gov.au") {
con <- url(url,
Sys.getenv("R_READABS_DL_METHOD", unset = "default"))
method = Sys.getenv("R_READABS_DL_METHOD", unset = "default"))
out <- suppressWarnings(tryCatch(readLines(con), error = function(e) e))
abs_url_works <- all(class(out) != "error")
close(con)
Expand Down

0 comments on commit 01d2f4b

Please sign in to comment.