diff --git a/.lintr b/.lintr index 75c558e..017041b 100644 --- a/.lintr +++ b/.lintr @@ -3,7 +3,7 @@ linters: linters_with_defaults( implicit_integer_linter(), indentation_linter(indent = 4L), object_name_linter(styles = c("snake_case", "symbols"), regexes = character()), - object_name_linter = NULL + object_usage_linter = NULL ) exclusions: list("man/", "inst/", "src/", ".vscode/", ".Rproj.user/", "R/import-standalone-obj-type.R", "R/import-standalone-types-check.R") encoding: "UTF-8" diff --git a/DESCRIPTION b/DESCRIPTION index a6616bf..750fc7b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,9 +19,7 @@ Imports: Suggests: box, docopt, - remotes, testthat (>= 3.0.0), - xml2, withr Config/testthat/edition: 3 Encoding: UTF-8 diff --git a/R/script.R b/R/script.R index 46eff55..3339239 100644 --- a/R/script.R +++ b/R/script.R @@ -9,8 +9,14 @@ common_install_paths <- list( windows = c() # does windows even work with this? ) -#' WORK IN PROGRESS +#' Install global hotwater script +#' #' @param install_folder folder (in PATH) to install hotwater +#' @examples +#' if (interactive()) { +#' hotwater::install_hotwater() +#' } +#' #' @export install_hotwater <- function(install_folder = "~/.local/bin/") { p <- file.path(install_folder, "hotwater") @@ -31,8 +37,13 @@ install_hotwater <- function(install_folder = "~/.local/bin/") { } } -#' WORK IN PROGRESS +#' Uninstall global hotwater script +#' #' @param install_folder folder (in PATH) to uninstall hotwater +#' @examples +#' if (interactive()) { +#' hotwater::uninstall_hotwater() +#' } #' @export uninstall_hotwater <- function(install_folder = "~/.local/bin/") { p <- file.path(install_folder, "hotwater") @@ -50,7 +61,7 @@ uninstall_hotwater <- function(install_folder = "~/.local/bin/") { #' Check suggested packages for CLI usage #' -#' The {docopt} and {remotes} packages are required to run hotwater from the command line. +#' The {docopt} package is required to run hotwater from the command line. #' #' @noRd check_suggests <- function() { diff --git a/README.md b/README.md index 7b6f377..fe82d83 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) +[![hotwater status badge](https://elianhugh.r-universe.dev/badges/hotwater)](https://elianhugh.r-universe.dev/hotwater) [![Codecov test coverage](https://codecov.io/gh/ElianHugh/hotwater/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ElianHugh/hotwater?branch=main) [![R-CMD-check](https://github.com/ElianHugh/hotwater/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ElianHugh/hotwater/actions/workflows/R-CMD-check.yaml) diff --git a/man/install_hotwater.Rd b/man/install_hotwater.Rd index 169ca29..e1032fe 100644 --- a/man/install_hotwater.Rd +++ b/man/install_hotwater.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/script.R \name{install_hotwater} \alias{install_hotwater} -\title{WORK IN PROGRESS} +\title{Install global hotwater script} \usage{ install_hotwater(install_folder = "~/.local/bin/") } @@ -10,5 +10,11 @@ install_hotwater(install_folder = "~/.local/bin/") \item{install_folder}{folder (in PATH) to install hotwater} } \description{ -WORK IN PROGRESS +Install global hotwater script +} +\examples{ +if (interactive()) { + hotwater::install_hotwater() +} + } diff --git a/man/uninstall_hotwater.Rd b/man/uninstall_hotwater.Rd index 6994000..cb79159 100644 --- a/man/uninstall_hotwater.Rd +++ b/man/uninstall_hotwater.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/script.R \name{uninstall_hotwater} \alias{uninstall_hotwater} -\title{WORK IN PROGRESS} +\title{Uninstall global hotwater script} \usage{ uninstall_hotwater(install_folder = "~/.local/bin/") } @@ -10,5 +10,10 @@ uninstall_hotwater(install_folder = "~/.local/bin/") \item{install_folder}{folder (in PATH) to uninstall hotwater} } \description{ -WORK IN PROGRESS +Uninstall global hotwater script +} +\examples{ +if (interactive()) { + hotwater::uninstall_hotwater() +} } diff --git a/tests/testthat/test-middleware.R b/tests/testthat/test-middleware.R index 0a04086..f693ae5 100644 --- a/tests/testthat/test-middleware.R +++ b/tests/testthat/test-middleware.R @@ -74,9 +74,20 @@ test_that("is_plumber_running works", { test_that("autoreloader is attached", { engine <- new_test_engine() new_runner(engine) - resp <- httr2::request(sprintf("localhost:%s", engine$config$port)) |> - httr2::req_perform() |> - httr2::resp_body_html() - expect_true(grepl(resp, pattern = "