From 6484c235039efa4abf5303a07627262a7c584650 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Mon, 1 Jul 2024 09:25:39 -0400 Subject: [PATCH] Export good_quiz_path() --- R/data.R | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/R/data.R b/R/data.R index b3bc611..c0d1c2f 100644 --- a/R/data.R +++ b/R/data.R @@ -47,55 +47,61 @@ download_ottr_template <- function(dir = "inst/extdata", type = "rmd") { return(output_dir) } -#' Get file path to an key encryption RDS -key_encrypt_creds_path <- function() { + +#' Path to good example quiz +#' +#' @export +#' @return The file path to an example good quiz included in the package that should pass the quiz checks. +#' +good_quiz_path <- function() { list.files( - pattern = "encrypt_pass.rds", + pattern = "quiz_good.md$", recursive = TRUE, system.file("extdata", package = "ottrpal"), full.names = TRUE ) } -#' Get file path to an encrypted credentials RDS -encrypt_creds_path <- function() { + +#' Path to bad example quiz +#' +#' @export +#' @return The file path to an example bad quiz included in the package that will fail the quiz checks. +#' +#' @examples +#' +#' quiz_path <- bad_quiz_path() +bad_quiz_path <- function() { list.files( - pattern = "encrypt.rds", + pattern = "quiz_bad.md$", recursive = TRUE, system.file("extdata", package = "ottrpal"), full.names = TRUE ) } -#' Get file path to an default credentials RDS -encrypt_creds_user_path <- function() { +#' Get file path to an key encryption RDS +key_encrypt_creds_path <- function() { list.files( - pattern = "encrypted_default_user_creds.rds", + pattern = "encrypt_pass.rds", recursive = TRUE, system.file("extdata", package = "ottrpal"), full.names = TRUE ) } - -good_quiz_path <- function() { +#' Get file path to an encrypted credentials RDS +encrypt_creds_path <- function() { list.files( - pattern = "quiz_good.md$", + pattern = "encrypt.rds", recursive = TRUE, system.file("extdata", package = "ottrpal"), full.names = TRUE ) } -#' Path to bad example quiz -#' -#' @export -#' @return The file path to an example bad quiz included in the package that will fail the quiz checks. -#' -#' @examples -#' -#' quiz_path <- bad_quiz_path() -bad_quiz_path <- function() { +#' Get file path to an default credentials RDS +encrypt_creds_user_path <- function() { list.files( - pattern = "quiz_bad.md$", + pattern = "encrypted_default_user_creds.rds", recursive = TRUE, system.file("extdata", package = "ottrpal"), full.names = TRUE