Skip to content

Commit

Permalink
refactor: rename from rstudioconnect to positconnect (#1017)
Browse files Browse the repository at this point in the history
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.

Keep  add_rstudioconnect_file for compatibility but with depcrecation
note.

Refs: #888
  • Loading branch information
ilyaZar authored Aug 2, 2023
1 parent 91069f8 commit ac5211a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
18 changes: 14 additions & 4 deletions R/add_rstudio_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()) {
Expand All @@ -90,7 +90,7 @@ add_rstudio_files <- function(
#' if (interactive()) {
#' add_shinyappsio_file()
#' }
add_rstudioconnect_file <- function(
add_positconnect_file <- function(
pkg = get_golem_wd(),
open = TRUE
) {
Expand All @@ -101,6 +101,16 @@ add_rstudioconnect_file <- function(
)
}

#' @rdname rstudio_deploy
#' @note `add_rstudioconnect_file` is now deprecated; replace by [add_positconnect_file()].
#' @export
add_rstudioconnect_file <- function(pkg = get_golem_wd(),
open = TRUE){
.Deprecated("add_positconnect_file")
add_positconnect_file(pkg = get_golem_wd(),
open = TRUE)
}

#' @rdname rstudio_deploy
#' @export
add_shinyappsio_file <- function(
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion inst/mantests/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,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",
Expand Down
2 changes: 1 addition & 1 deletion inst/shinyexample/dev/03_deploy.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-add_deploy_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ test_that("add_rstudio_files", {

with_dir(pkg, {
for (fun in list(
add_rstudioconnect_file,
add_positconnect_file,
add_shinyappsio_file,
add_shinyserver_file
)) {
Expand Down
2 changes: 1 addition & 1 deletion vignettes/c_deploy.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
```
Expand Down

0 comments on commit ac5211a

Please sign in to comment.