diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index eeb2bf3..38dfb14 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -34,13 +34,13 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | @@ -51,7 +51,7 @@ jobs: - name: Cache R packages if: runner.os != 'Windows' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index a9aef3c..c5ebf62 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -11,11 +11,11 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | @@ -25,7 +25,7 @@ jobs: shell: Rscript {0} - name: Cache R packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index b191a62..1876de8 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -16,11 +16,11 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@master + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | @@ -30,7 +30,7 @@ jobs: shell: Rscript {0} - name: Cache R packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} diff --git a/DESCRIPTION b/DESCRIPTION index ac91713..19dd7d5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -52,10 +52,9 @@ Suggests: sys LinkingTo: Rcpp -SystemRequirements: C++11 ByteCompile: true KeepSource: true Encoding: UTF-8 Roxygen: list(markdown = TRUE, roclets = c("rd", "namespace", "collate")) -RoxygenNote: 7.2.1 +RoxygenNote: 7.3.1 VignetteBuilder: knitr diff --git a/NEWS.md b/NEWS.md index 1ca6728..f704f2c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# RestRserve 1.2.2 (2024-04-15) +* check inheritance from `error` Thanks @hafen for report #207 and PR #208 +* more robust kill of the child processes. Thanks @AbrJA for report #209 and PR #210 + # RestRserve 1.2.1 (2022-09-11) * update NEWS.md file to follow CRAN specification * update docs with new roxygen. Fixes CRAN notes in HTML5 compatibility @@ -45,7 +49,7 @@ * parse content-type directly from headers - see #137 # RestRserve 0.2.1 (2020-03-19) -* update code for header names validation to conform to [rfc7230](https://tools.ietf.org/html/rfc7230#section-3.2.6), see #132 +* update code for header names validation to conform to [rfc7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6), see #132 * generate documentation with roxygen2 7.1.0 which has support for R6 classes # RestRserve 0.2.0.2 (2020-03-06) diff --git a/R/AuthBackendBasic.R b/R/AuthBackendBasic.R index b5c59b4..662dd97 100644 --- a/R/AuthBackendBasic.R +++ b/R/AuthBackendBasic.R @@ -4,7 +4,7 @@ #' Creates AuthBackendBasic class object. #' #' @references -#' [RFC7617](https://tools.ietf.org/html/rfc7617) +#' [RFC7617](https://datatracker.ietf.org/doc/html/rfc7617) #' [Wikipedia](https://en.wikipedia.org/wiki/Basic_access_authentication) #' #' @export diff --git a/R/AuthBackendBearer.R b/R/AuthBackendBearer.R index 0e929a2..e3449d0 100644 --- a/R/AuthBackendBearer.R +++ b/R/AuthBackendBearer.R @@ -6,7 +6,7 @@ #' @export #' #' @references -#' [RFC6750](https://tools.ietf.org/html/rfc6750) +#' [RFC6750](https://datatracker.ietf.org/doc/html/rfc6750) #' [Specification](https://swagger.io/docs/specification/authentication/bearer-authentication/) #' #' @seealso [AuthMiddleware] [Request] [Response] diff --git a/R/BackendRserve.R b/R/BackendRserve.R index c736ba7..f9cf94c 100644 --- a/R/BackendRserve.R +++ b/R/BackendRserve.R @@ -330,7 +330,7 @@ BackendRserve = R6::R6Class( #' @title Creates ApplicationProcess object #' #' @description -#' Creates ApplicationProcess to hold PID of the runnung applicaiton. +#' Creates ApplicationProcess to hold PID of the running application. #' ApplicationProcess = R6::R6Class( classname = "ApplicationProcess", @@ -345,12 +345,12 @@ ApplicationProcess = R6::R6Class( }, #' @description #' Send signal to process. - #' @param signal Singal code. + #' @param signal Signal code. kill = function(signal = 15L) { - # kill service - tools::pskill(self$pid, signal) - # kill childs - system(sprintf("pkill -%s -P %s", signal, self$pid), wait = FALSE) + # get childs + child_pids = suppressWarnings(system(sprintf("pgrep -P %s", self$pid), intern = TRUE)) + # kill all + tools::pskill(c(self$pid, child_pids), signal) } ) ) diff --git a/R/HTTPDate.R b/R/HTTPDate.R index 9c1ad8e..fadeb06 100644 --- a/R/HTTPDate.R +++ b/R/HTTPDate.R @@ -11,7 +11,7 @@ #' @exportClass HTTPDate #' #' @references -#' [RFC7231](https://tools.ietf.org/html/rfc7231#section-7.1.1.1) +#' [RFC7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) #' [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date) #' #' @examples diff --git a/README.md b/README.md index 15923de..08032b5 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ [![R build status](https://github.com/rexyai/RestRserve/workflows/R-CMD-check/badge.svg)](https://github.com/rexyai/RestRserve/actions) [![CRAN status](https://www.r-pkg.org/badges/version/RestRserve)](https://cran.r-project.org/package=RestRserve) -[![codecov](https://codecov.io/gh/rexyai/RestRserve/branch/master/graph/badge.svg)](https://codecov.io/gh/rexyai/RestRserve/branch/master) +[![codecov](https://codecov.io/gh/rexyai/RestRserve/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rexyai/RestRserve/branch/master) [![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](http://www.gnu.org/licenses/gpl-2.0.html) [![Lifecycle: stable](https://lifecycle.r-lib.org/articles/figures/lifecycle-stable.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) -[![gitter](https://img.shields.io/gitter/room/RestRserve/community.svg?color=61D6AD&style=popout)](https://gitter.im/RestRserve/community) +[![gitter](https://img.shields.io/gitter/room/RestRserve/community.svg?color=61D6AD&style=popout)](https://app.gitter.im/#/room/#RestRserve_community:gitter.im) ![tinyverse](https://tinyverse.netlify.com/badge/RestRserve) diff --git a/cran-comments.md b/cran-comments.md index 93b8ec8..9ca46b6 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,13 @@ ## New submission -- fixed HTML validation problems discovered by CRAN checks -- fixed NEWS.md to follow CRAN format -- "Additional issues" issues are related to expired certificate on CDN. Fixed now. +- minor bugfixes +- removed SystemRequirements: C++11 from DESCRIPTION +- fixed 301 urls ### Test environments -- local mac os, R 4.0.5 -- Ubuntu 20.04 (gh-actions), R 4.0.3 +- local mac os, R 4.3.1 +- Ubuntu 20.04 (gh-actions), R 4.3.3 - win-builder (devel) ### R CMD check results diff --git a/man/ApplicationProcess.Rd b/man/ApplicationProcess.Rd index ddaaf85..7ac2e3b 100644 --- a/man/ApplicationProcess.Rd +++ b/man/ApplicationProcess.Rd @@ -4,7 +4,7 @@ \alias{ApplicationProcess} \title{Creates ApplicationProcess object} \description{ -Creates ApplicationProcess to hold PID of the runnung applicaiton. +Creates ApplicationProcess to hold PID of the running application. } \section{Public fields}{ \if{html}{\out{
}} @@ -50,7 +50,7 @@ Send signal to process. \subsection{Arguments}{ \if{html}{\out{
}} \describe{ -\item{\code{signal}}{Singal code.} +\item{\code{signal}}{Signal code.} } \if{html}{\out{
}} } diff --git a/man/AuthBackendBasic.Rd b/man/AuthBackendBasic.Rd index 022059c..084bae3 100644 --- a/man/AuthBackendBasic.Rd +++ b/man/AuthBackendBasic.Rd @@ -35,15 +35,15 @@ auth_backend$authenticate(rq, rs) # TRUE } \references{ -\href{https://tools.ietf.org/html/rfc7617}{RFC7617} +\href{https://datatracker.ietf.org/doc/html/rfc7617}{RFC7617} \href{https://en.wikipedia.org/wiki/Basic_access_authentication}{Wikipedia} } \seealso{ \link{AuthMiddleware} \link{Request} \link{Response} Other AuthBackend: -\code{\link{AuthBackendBearer}}, \code{\link{AuthBackend}}, +\code{\link{AuthBackendBearer}}, \code{\link{AuthMiddleware}} } \concept{AuthBackend} diff --git a/man/AuthBackendBearer.Rd b/man/AuthBackendBearer.Rd index bc01961..49a73eb 100644 --- a/man/AuthBackendBearer.Rd +++ b/man/AuthBackendBearer.Rd @@ -34,15 +34,15 @@ auth_backend$authenticate(rq, rs) # TRUE } \references{ -\href{https://tools.ietf.org/html/rfc6750}{RFC6750} +\href{https://datatracker.ietf.org/doc/html/rfc6750}{RFC6750} \href{https://swagger.io/docs/specification/authentication/bearer-authentication/}{Specification} } \seealso{ \link{AuthMiddleware} \link{Request} \link{Response} Other AuthBackend: -\code{\link{AuthBackendBasic}}, \code{\link{AuthBackend}}, +\code{\link{AuthBackendBasic}}, \code{\link{AuthMiddleware}} } \concept{AuthBackend} diff --git a/man/AuthMiddleware.Rd b/man/AuthMiddleware.Rd index 9f5cd3d..b90d688 100644 --- a/man/AuthMiddleware.Rd +++ b/man/AuthMiddleware.Rd @@ -10,9 +10,9 @@ Adds various authorizations to \link{Application}. \link{Middleware} \link{Application} Other AuthBackend: +\code{\link{AuthBackend}}, \code{\link{AuthBackendBasic}}, -\code{\link{AuthBackendBearer}}, -\code{\link{AuthBackend}} +\code{\link{AuthBackendBearer}} } \concept{AuthBackend} \section{Super class}{ diff --git a/man/HTTPDate-class.Rd b/man/HTTPDate-class.Rd index 2e6a9f8..9a0d9d5 100644 --- a/man/HTTPDate-class.Rd +++ b/man/HTTPDate-class.Rd @@ -20,6 +20,6 @@ class(dt) = "HTTPDate" as(dt, "POSIXct") } \references{ -\href{https://tools.ietf.org/html/rfc7231#section-7.1.1.1}{RFC7231} +\href{https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1}{RFC7231} \href{https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date}{MDN} } diff --git a/src/Makevars b/src/Makevars index f7b9176..8cd93a7 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,2 +1 @@ -CXX_STD = CXX11 PKG_CXXFLAGS = -DRCPP_NO_MODULES diff --git a/src/Makevars.win b/src/Makevars.win index f7b9176..8cd93a7 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,2 +1 @@ -CXX_STD = CXX11 PKG_CXXFLAGS = -DRCPP_NO_MODULES diff --git a/vignettes/Authentication.Rmd b/vignettes/Authentication.Rmd index 55b5da3..078a771 100644 --- a/vignettes/Authentication.Rmd +++ b/vignettes/Authentication.Rmd @@ -117,7 +117,7 @@ res$body `Bearer` authentication (also called "token" authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The name "Bearer authentication" can be understood as "give access to the bearer of this token." The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources. -The `Bearer` authentication scheme was originally created as part of `OAuth 2.0` in [RFC 6750](https://tools.ietf.org/html/rfc6750), but is sometimes also used on its own. Similarly to Basic authentication, Bearer authentication should only be used over HTTPS (SSL). +The `Bearer` authentication scheme was originally created as part of `OAuth 2.0` in [RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750), but is sometimes also used on its own. Similarly to Basic authentication, Bearer authentication should only be used over HTTPS (SSL). ```{r}