diff --git a/DESCRIPTION b/DESCRIPTION index 9e34266..fca5685 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: pkgreviewr Type: Package Title: rOpenSci package review project template -Version: 0.3.0 +Version: 0.3.1 Authors@R: c(person("Anna", "Krystalli", email = "annakrystalli@googlemail.com", role = c("aut", "cre")), person("Maƫlle", "Salmon", email = "maelle.salmon@yahoo.se", role = "aut")) diff --git a/R/pkgreview.R b/R/pkgreview.R index a73ed72..17f2e40 100644 --- a/R/pkgreview.R +++ b/R/pkgreview.R @@ -172,7 +172,7 @@ pkgreview_getdata <- function(pkg_dir = NULL, pkg_repo, pkg_dir <- fs::path(usethis::proj_path(".."), meta$name)} # package repo data - pkg_data <- usethis:::package_data(pkg_dir) + pkg_data <- package_data(pkg_dir) pkg_data$URL <- meta$html_url diff --git a/R/utils.R b/R/utils.R index 50ba9be..4fb94fd 100644 --- a/R/utils.R +++ b/R/utils.R @@ -68,3 +68,10 @@ write_dir <- function(tmp_dir, out_dir){ file.copy(tmp_dir, dirname(out_dir), recursive = T) usethis::ui_done("{usethis::ui_field(dir_type)} written out successfully") } + + +### add former usethis:::package_data(), now removed (see https://github.com/r-lib/usethis/pull/1747) +package_data <- function(base_path = NULL) { + desc <- desc::description$new(base_path) + as.list(desc$get(desc$fields())) +}