From 8ffd589835c22912f7f5cb54a3a0c2cf9596fc4b Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Tue, 7 Nov 2023 10:18:01 -0500 Subject: [PATCH] Polish docs and news --- NEWS.md | 2 +- R/httptest2.R | 2 +- R/redact.R | 2 +- inst/WORDLIST | 1 + man/as-redactor.Rd | 2 +- man/httptest2.Rd | 20 ++++++++++++++++++++ 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 615778c..6845e46 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,8 +2,8 @@ * `capture_requests()` can be used without loading `library(httptest2)` (#22, @kforner) * `gsub_response()` safely redacts responses with an empty body (#28) +* httr2 compatibility: workarounds for issues in `httr2 < 0.2` have been removed, and adaptations for `httr2 >= 1.0` added * Tests and examples no longer use `httpbin.org` -* Workarounds for issues in `httr2 < 0.2` have been removed # httptest2 0.1.0 diff --git a/R/httptest2.R b/R/httptest2.R index a7b475f..59a6804 100644 --- a/R/httptest2.R +++ b/R/httptest2.R @@ -54,4 +54,4 @@ #' @docType package #' @importFrom httr2 req_perform request #' @keywords internal -NULL +"_PACKAGE" diff --git a/R/redact.R b/R/redact.R index e5d54fb..21583af 100644 --- a/R/redact.R +++ b/R/redact.R @@ -101,7 +101,7 @@ gsub_response <- function(response, pattern, replacement, ...) { #' to `function (response) redact_headers(response, "X-Custom-Header")`. This #' allows you to do #' `set_redactor(~ redact_headers(., "X-Custom-Header"))`. -#' @param expr Partial expression to turn into a function +#' @param fmla Partial expression (a `formula`) to turn into a function #' @return A `function`. #' @rdname as-redactor #' @importFrom stats terms diff --git a/inst/WORDLIST b/inst/WORDLIST index 9a64374..0416be0 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,6 +1,7 @@ Hadley JSON OAuth +ORCID Wickham's al anonymize diff --git a/man/as-redactor.Rd b/man/as-redactor.Rd index 3abd765..cb8cefd 100644 --- a/man/as-redactor.Rd +++ b/man/as-redactor.Rd @@ -7,7 +7,7 @@ as.redactor(fmla) } \arguments{ -\item{expr}{Partial expression to turn into a function} +\item{fmla}{Partial expression (a \code{formula}) to turn into a function} } \value{ A \code{function}. diff --git a/man/httptest2.Rd b/man/httptest2.Rd index 6362467..8b42412 100644 --- a/man/httptest2.Rd +++ b/man/httptest2.Rd @@ -3,6 +3,7 @@ \docType{package} \name{httptest2} \alias{httptest2} +\alias{httptest2-package} \title{\code{httptest2}: A Test Environment for HTTP Requests} \description{ The \code{httptest2} package lets you test R code that wraps an API without @@ -55,5 +56,24 @@ computers, use these recorded responses, allowing the document to regenerate without a network connection or API credentials. To record fresh API responses, delete the subfolder of cached responses and re-run. See \code{vignette("vignettes")} for more discussion and links to examples. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://enpiar.com/httptest2/} + \item \url{https://github.com/nealrichardson/httptest2} + \item Report bugs at \url{https://github.com/nealrichardson/httptest2/issues} +} + +} +\author{ +\strong{Maintainer}: Neal Richardson \email{neal.p.richardson@gmail.com} (\href{https://orcid.org/0009-0002-7992-3520}{ORCID}) + +Other contributors: +\itemize{ + \item Jonathan Keane \email{jkeane@gmail.com} [contributor] + \item Maƫlle Salmon \email{maelle.salmon@yahoo.se} (\href{https://orcid.org/0000-0002-2815-0399}{ORCID}) [contributor] +} + } \keyword{internal}