Skip to content

Commit

Permalink
Merge pull request #80 from Pakillo/master
Browse files Browse the repository at this point in the history
Add former usethis:::project_data() as internal function. Fix #79
  • Loading branch information
annakrystalli authored Sep 4, 2023
2 parents ac206ea + 61fcaa2 commit 5ab10d4
Show file tree
Hide file tree
Showing 3 changed files with 9 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: pkgreviewr
Type: Package
Title: rOpenSci package review project template
Version: 0.3.0
Version: 0.3.1
Authors@R: c(person("Anna", "Krystalli", email = "[email protected]",
role = c("aut", "cre")),
person("Maëlle", "Salmon", email = "[email protected]", role = "aut"))
Expand Down
2 changes: 1 addition & 1 deletion R/pkgreview.R
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}

0 comments on commit 5ab10d4

Please sign in to comment.