From 7204e1b7678446f060f9da4480e62a8e35d8903a Mon Sep 17 00:00:00 2001 From: Melissa Van Bussel Date: Thu, 15 Aug 2024 14:33:15 -0400 Subject: [PATCH] Add pos.it to acceptable shortlinks for use_course --- R/course.R | 4 ++-- man/zip-utils.Rd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/course.R b/R/course.R index ddfbb8cb3..96c85487a 100644 --- a/R/course.R +++ b/R/course.R @@ -13,7 +13,7 @@ #' #' * GitHub repo spec: "OWNER/REPO". Equivalent to #' `https://github.com/OWNER/REPO/DEFAULT_BRANCH.zip`. -#' * bit.ly or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz" or "rstd.io/foofy". +#' * bit.ly, pos.it, or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz", "pos.it/foofy" or "rstd.io/foofy". #' The instructor must then arrange for the shortlink to point to a valid #' download URL for the target ZIP file. The helper #' [create_download_url()] helps to create such URLs for GitHub, DropBox, @@ -492,7 +492,7 @@ normalize_url <- function(url) { } is_shortlink <- function(url) { - shortlink_hosts <- c("rstd\\.io", "bit\\.ly") + shortlink_hosts <- c("rstd\\.io", "bit\\.ly", "pos\\.it") any(map_lgl(shortlink_hosts, grepl, x = url)) } diff --git a/man/zip-utils.Rd b/man/zip-utils.Rd index 2e569ce3b..e56a70504 100644 --- a/man/zip-utils.Rd +++ b/man/zip-utils.Rd @@ -20,7 +20,7 @@ of typos in live settings, these shorter forms are accepted: \itemize{ \item GitHub repo spec: "OWNER/REPO". Equivalent to \verb{https://github.com/OWNER/REPO/DEFAULT_BRANCH.zip}. -\item bit.ly or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz" or "rstd.io/foofy". +\item bit.ly, pos.it, or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz", "pos.it/foofy" or "rstd.io/foofy". The instructor must then arrange for the shortlink to point to a valid download URL for the target ZIP file. The helper \code{\link[=create_download_url]{create_download_url()}} helps to create such URLs for GitHub, DropBox,