From 80140d7f308b8f861578c36222076fd3db043a53 Mon Sep 17 00:00:00 2001 From: Hugo Gruson Date: Tue, 26 Sep 2023 12:11:21 +0200 Subject: [PATCH 1/3] Avoid partial matching when extracting metadata element --- R/build_404.R | 2 +- R/build_instructor_notes.R | 2 +- R/build_profiles.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/build_404.R b/R/build_404.R index 4dd2f9428..cf4146e99 100644 --- a/R/build_404.R +++ b/R/build_404.R @@ -59,7 +59,7 @@ build_404 <- function(pkg, quiet = FALSE) { ) page_globals$instructor$update(this_dat) page_globals$learner$update(this_dat) - page_globals$meta$update(this_dat) + page_globals$metadata$update(this_dat) build_html(template = "extra", pkg = pkg, nodes = html, global_data = page_globals, path_md = "404.html", quiet = quiet) diff --git a/R/build_instructor_notes.R b/R/build_instructor_notes.R index 21e298b04..18d4c7bbf 100644 --- a/R/build_instructor_notes.R +++ b/R/build_instructor_notes.R @@ -32,7 +32,7 @@ build_instructor_notes <- function(pkg, pages = NULL, built = NULL, quiet) { this_dat$body <- use_learner(html) page_globals$learner$update(this_dat) - page_globals$meta$update(this_dat) + page_globals$metadata$update(this_dat) build_html( template = "extra", pkg = pkg, nodes = html, diff --git a/R/build_profiles.R b/R/build_profiles.R index a28ece773..15d6c0dac 100644 --- a/R/build_profiles.R +++ b/R/build_profiles.R @@ -20,7 +20,7 @@ build_profiles <- function(pkg, quiet) { this_dat$body = use_learner(html) page_globals$learner$update(this_dat) - page_globals$meta$update(this_dat) + page_globals$metadata$update(this_dat) build_html(template = "extra", pkg = pkg, nodes = html, global_data = page_globals, path_md = "profiles.html", quiet = quiet) From 4f571d23fc0cad9ca1a58f27482e00b463620a12 Mon Sep 17 00:00:00 2001 From: Hugo Gruson Date: Tue, 26 Sep 2023 17:16:45 +0200 Subject: [PATCH 2/3] Fix partial matching in cli::test_that_cli() --- tests/testthat/test-set_dropdown.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-set_dropdown.R b/tests/testthat/test-set_dropdown.R index d7540f4a3..e197e0063 100644 --- a/tests/testthat/test-set_dropdown.R +++ b/tests/testthat/test-set_dropdown.R @@ -20,7 +20,7 @@ cli::test_that_cli("set_config() will set individual items", { expect_snapshot( set_config(list("title" = "test: title", "license" = "CC0"), path = tmp) ) -}, config = c("plain")) +}, configs = c("plain")) cli::test_that_cli("set_config() will write items", { fs::file_copy(tcfg, this_cfg, overwrite = TRUE) From 173a86819fb024cb9f97f043f7de16eb067045ae Mon Sep 17 00:00:00 2001 From: Hugo Gruson Date: Tue, 26 Sep 2023 17:34:55 +0200 Subject: [PATCH 3/3] Add Hugo as contributor --- DESCRIPTION | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index 1b1adae34..5fa6d6b3f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,6 +31,10 @@ Authors@R: c( family = "Becker", role = c("ctb"), email = "ebecker@carpentries.org"), + person(given = "Hugo", + family = "Gruson", + role = c("ctb"), + email = "hugo.gruson+R@normalesup.org"), person()) Description: We provide tools to build a Carpentries-themed lesson repository into an accessible standalone static website. These include local tools and