Skip to content

Commit

Permalink
Merge pull request #211 from rexyai/dev
Browse files Browse the repository at this point in the history
Minor updates / bufixes & ETAG
  • Loading branch information
dselivanov authored Apr 18, 2024
2 parents a7cb418 + faf7585 commit c24c92b
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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') }}
Expand Down
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/AuthBackendBasic.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/AuthBackendBearer.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
12 changes: 6 additions & 6 deletions R/BackendRserve.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
}
)
)
2 changes: 1 addition & 1 deletion R/HTTPDate.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[![R build status](https://github.com/rexyai/RestRserve/workflows/R-CMD-check/badge.svg)](https://github.com/rexyai/RestRserve/actions)
<a href="https://rexy.ai"><img src="https://s3-eu-west-1.amazonaws.com/rexy.ai/images/favicon.ico" height="32" width="32"></a>
[![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)
<!-- badges: end -->

Expand Down
10 changes: 5 additions & 5 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions man/ApplicationProcess.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/AuthBackendBasic.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/AuthBackendBearer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/AuthMiddleware.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/HTTPDate-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CXX_STD = CXX11
PKG_CXXFLAGS = -DRCPP_NO_MODULES
1 change: 0 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CXX_STD = CXX11
PKG_CXXFLAGS = -DRCPP_NO_MODULES
2 changes: 1 addition & 1 deletion vignettes/Authentication.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit c24c92b

Please sign in to comment.