Skip to content

Commit

Permalink
Merge pull request #57 from richfitz/cran-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz authored Dec 4, 2023
2 parents 0bd967c + 0066882 commit a080c6e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- 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: Start Redis
if: runner.os != 'Windows'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- 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: Start Redis
uses: shogo82148/actions-setup-redis@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- 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: Start Redis
uses: shogo82148/actions-setup-redis@v1
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: redux
Title: R Bindings to 'hiredis'
Version: 1.1.3
Version: 1.1.4
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "[email protected]"))
Description: A 'hiredis' wrapper that includes support for
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- badges: start -->
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/)
[![R build status](https://github.com/richfitz/redux/workflows/R-CMD-check/badge.svg)](https://github.com/richfitz/redux/actions)
[![codecov.io](https://codecov.io/github/richfitz/redux/coverage.svg?branch=master)](https://codecov.io/github/richfitz/redux?branch=master)
[![codecov.io](https://codecov.io/github/richfitz/redux/coverage.svg?branch=master)](https://app.codecov.io/github/richfitz/redux?branch=master)
[![](https://www.r-pkg.org/badges/version/redux)](https://cran.r-project.org/package=redux)
<!-- badges: end -->

Expand Down
2 changes: 1 addition & 1 deletion src/conversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ SEXP reply_error(redisReply* reply, bool error_throw) {
memcpy(msg, reply->str, reply->len);
msg[reply->len] = '\0';
freeReplyObject(reply);
error(msg);
error("%s", msg);
return ret;
} else { // pass error back as object
SEXP ret = PROTECT(mkString(reply->str));
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-conversions.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ test_that("long integers", {
on.exit(con$DEL(key))

con$SET(key, "Hello")
expect_equal(con$PEXPIREAT(key, 1655555555005), 1)

t <- as.integer(con$TIME()[[1]])
expect_equal(con$EXPIREAT(key, t + 1000000000), 1)

t0 <- con$TTL(key)
t1 <- con$PTTL(key)
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-zzz-commands-generic.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ test_that("MOVE", {

test_that("OBJECT", {
skip_if_cmd_unsupported("OBJECT")
testthat::skip_on_os("windows") # need to find out what this produces here
con <- test_hiredis_connection()
key <- rand_str()
on.exit(con$DEL(key))
Expand Down Expand Up @@ -138,7 +139,8 @@ test_that("PEXPIREAT", {
on.exit(con$DEL(key))

con$SET(key, "Hello")
expect_equal(con$PEXPIREAT(key, 1655555555005), 1)
t <- as.numeric(con$TIME()[[1]]) * 1000
expect_equal(con$PEXPIREAT(key, t + 1000000000), 1)
expect_gt(con$TTL(key), 0)
expect_gt(con$PTTL(key), 0)
})
Expand Down

0 comments on commit a080c6e

Please sign in to comment.