From 67c01fff3f7d4e92eb91746e03f79324fd600477 Mon Sep 17 00:00:00 2001 From: IlyaZar Date: Fri, 31 Mar 2023 11:27:24 +0200 Subject: [PATCH] refactor: rename from rstudioconnect to positconnect rename add_rstudioconnect_file() to add_positconnect_file() in files: - add_rstudio_files.R - vignettes/c_deploy.Rmd - tests/testthat/test-add_deploy_helpers.R - inst/mantest/build.R - inst/shinyexamle/dev/03_deploy.R - _pkgdown.yml Not touching NAMESPACE, .Rd-files, and NEWS.md as they are updated otherwise. Refs: #888 --- R/add_rstudio_files.R | 8 ++++---- _pkgdown.yml | 2 +- inst/mantests/build.R | 2 +- inst/shinyexample/dev/03_deploy.R | 2 +- tests/testthat/test-add_deploy_helpers.R | 2 +- vignettes/c_deploy.Rmd | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/add_rstudio_files.R b/R/add_rstudio_files.R index 50631f0b..1096242d 100644 --- a/R/add_rstudio_files.R +++ b/R/add_rstudio_files.R @@ -67,10 +67,10 @@ add_rstudio_files <- function( #' Add an app.R at the root of your package to deploy on RStudio Connect #' #' @note -#' In previous versions, this function was called add_rconnect_file. +#' In previous versions, this function was called add_rconnect_file and add_rstudioconnect_file #' #' @inheritParams add_module -#' @aliases add_rconnect_file add_rstudioconnect_file +#' @aliases add_rconnect_file add_rstudioconnect_file add_positconnect_file #' @export #' #' @rdname rstudio_deploy @@ -80,7 +80,7 @@ add_rstudio_files <- function( #' @examples #' # Add a file for Connect #' if (interactive()) { -#' add_rstudioconnect_file() +#' add_positconnect_file() #' } #' # Add a file for Shiny Server #' if (interactive()) { @@ -90,7 +90,7 @@ add_rstudio_files <- function( #' if (interactive()) { #' add_shinyappsio_file() #' } -add_rstudioconnect_file <- function( +add_positconnect_file_file <- function( pkg = get_golem_wd(), open = TRUE ) { diff --git a/_pkgdown.yml b/_pkgdown.yml index deb079c8..b2473ea4 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -52,7 +52,7 @@ reference: - title: Add an app.R desc: Add an app.R at the root of your package to deploy on RStudio Connect contents: - - add_rstudioconnect_file + - add_positconnect_file - add_shinyappsio_file - add_shinyserver_file diff --git a/inst/mantests/build.R b/inst/mantests/build.R index 3dbe73fb..6e227070 100644 --- a/inst/mantests/build.R +++ b/inst/mantests/build.R @@ -390,7 +390,7 @@ remotes::install_local(targz, force = TRUE, upgrade = FALSE) cat_ok() -golem::add_rstudioconnect_file() +golem::add_positconnect_file() golem::add_dockerfile_with_renv( repos = "https://packagemanager.rstudio.com/all/__linux__/focal/latest", diff --git a/inst/shinyexample/dev/03_deploy.R b/inst/shinyexample/dev/03_deploy.R index 1f886875..7fcd70ff 100644 --- a/inst/shinyexample/dev/03_deploy.R +++ b/inst/shinyexample/dev/03_deploy.R @@ -27,7 +27,7 @@ devtools::build() ## RStudio ---- ## If you want to deploy on RStudio related platforms -golem::add_rstudioconnect_file() +golem::add_positconnect_file() golem::add_shinyappsio_file() golem::add_shinyserver_file() diff --git a/tests/testthat/test-add_deploy_helpers.R b/tests/testthat/test-add_deploy_helpers.R index 70d9e9e0..eafd8ed6 100644 --- a/tests/testthat/test-add_deploy_helpers.R +++ b/tests/testthat/test-add_deploy_helpers.R @@ -94,7 +94,7 @@ test_that("add_dockerfiles repos variation", { test_that("add_rstudio_files", { with_dir(pkg, { for (fun in list( - add_rstudioconnect_file, + add_positconnect_file, add_shinyappsio_file, add_shinyserver_file )) { diff --git a/vignettes/c_deploy.Rmd b/vignettes/c_deploy.Rmd index fd9b1cb0..fb32aaa5 100644 --- a/vignettes/c_deploy.Rmd +++ b/vignettes/c_deploy.Rmd @@ -58,7 +58,7 @@ The `dev/03_deploy.R` file contains function for deploying on various platforms. ### RStudio Products ```{r} -golem::add_rstudioconnect_file() +golem::add_positconnect_file() golem::add_shinyappsio_file() golem::add_shinyserver_file() ```