Skip to content

Commit cca6fbb

Browse files
committed
CRAN 0.5.4 release
1 parent 4217a5e commit cca6fbb

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.5.3.9000
4+
Version: 0.5.4
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols,
77
implementing a cross-platform standard for messaging and communications.

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 0.5.3.9000
1+
# nanonext 0.5.4
22

33
#### New Features
44

R/ncurl.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
#' \code{c(Authorization = "Bearer APIKEY")}.
3131
#' @param data (optional) the request data to be submitted.
3232
#' @param request (optional) a character vector or list specifying the response
33-
#' headers to return e.g. \code{c("Date", "Server")} or
34-
#' \code{list("date", "server")}. These are case-insensitive and will return
35-
#' NULL if not present.
33+
#' headers to request e.g. \code{c("date", "server")} or \code{list("Date", "Server")}.
34+
#' These are case-insensitive and will return NULL if not present.
3635
#' @param pem (optional) applicable to secure HTTPS sites only. The path to a
3736
#' file containing X.509 certificate(s) in PEM format, comprising the
3837
#' certificate authority certificate chain (and revocation list if present).
@@ -41,7 +40,8 @@
4140
#' @return Named list of 4 elements:
4241
#' \itemize{
4342
#' \item{\code{$status}} {- integer HTTP repsonse status code (200 - OK).}
44-
#' \item{\code{$headers}} {- list of requested response headers.}
43+
#' \item{\code{$headers}} {- named list of response headers supplied in
44+
#' 'request' or NULL if unspecified.}
4545
#' \item{\code{$raw}} {- raw vector of the received resource (use
4646
#' \code{\link{writeBin}} to save to a file).}
4747
#' \item{\code{$data}} {- converted character string (if \code{'convert' = TRUE}
@@ -63,7 +63,7 @@
6363
#' string at \code{$raw} and \code{$data} will be NULL.
6464
#'
6565
#' @examples
66-
#' ncurl("https://httpbin.org/get", request = c("Date", "Server"))
66+
#' ncurl("https://httpbin.org/get", request = c("date", "server"))
6767
#' ncurl("http://httpbin.org/put",,,"PUT", list(Authorization = "Bearer APIKEY"), "hello world")
6868
#' ncurl("http://httpbin.org/post",,,"POST", c(`Content-Type` = "application/json"),'{"k":"v"}')
6969
#'

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ aio
384384
#> < recvAio >
385385
#> - $data for message data
386386
aio$data |> str()
387-
#> num [1:100000000] -0.842 1.729 -1.326 0.757 0.424 ...
387+
#> num [1:100000000] 1.441 -2.63 -3.437 -0.364 -0.141 ...
388388
```
389389

390390
As `call_aio()` is blocking and will wait for completion, an alternative
@@ -543,11 +543,11 @@ ncurl("https://httpbin.org/headers")
543543
#> [1] 7b 0a 20 20 22 68 65 61 64 65 72 73 22 3a 20 7b 0a 20 20 20 20 22 48 6f 73
544544
#> [26] 74 22 3a 20 22 68 74 74 70 62 69 6e 2e 6f 72 67 22 2c 20 0a 20 20 20 20 22
545545
#> [51] 58 2d 41 6d 7a 6e 2d 54 72 61 63 65 2d 49 64 22 3a 20 22 52 6f 6f 74 3d 31
546-
#> [76] 2d 36 33 31 31 33 35 63 34 2d 31 35 38 63 32 32 33 64 32 66 63 64 33 37 62
547-
#> [101] 33 31 37 62 34 34 62 33 35 22 0a 20 20 7d 0a 7d 0a
546+
#> [76] 2d 36 33 31 31 62 39 34 31 2d 36 34 63 35 38 33 38 63 32 65 30 64 66 64 37
547+
#> [101] 39 33 63 63 64 32 38 30 37 22 0a 20 20 7d 0a 7d 0a
548548
#>
549549
#> $data
550-
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-631135c4-158c223d2fcd37b317b44b35\"\n }\n}\n"
550+
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-6311b941-64c5838c2e0dfd793ccd2807\"\n }\n}\n"
551551
```
552552

553553
For advanced use, supports additional HTTP methods such as POST or PUT.
@@ -566,13 +566,13 @@ res
566566

567567
call_aio(res)$headers
568568
#> $Date
569-
#> [1] "Thu, 01 Sep 2022 22:44:20 GMT"
569+
#> [1] "Fri, 02 Sep 2022 08:05:22 GMT"
570570
#>
571571
#> $Server
572572
#> [1] "gunicorn/19.9.0"
573573

574574
res$data
575-
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-631135c4-55622abd3b66c27e03b8a133\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"185.225.45.49\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
575+
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-6311b942-3e8b949a548bce0d1dc88ee7\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"213.86.169.34\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
576576
```
577577

578578
In this respect, it may be used as a performant and lightweight method
@@ -615,10 +615,10 @@ s |> send('{"action": "subscribe", "symbols": "EURUSD"}')
615615
#> [26] 73 79 6d 62 6f 6c 73 22 3a 20 22 45 55 52 55 53 44 22 7d 00
616616

617617
s |> recv(keep.raw = FALSE)
618-
#> [1] "{\"s\":\"EURUSD\",\"a\":0.99456,\"b\":0.99452,\"dc\":\"-0.9280\",\"dd\":\"-0.0092\",\"ppms\":false,\"t\":1662072262000}"
618+
#> [1] "{\"s\":\"EURUSD\",\"a\":0.9986,\"b\":0.99853,\"dc\":\"0.3425\",\"dd\":\"0.0034\",\"ppms\":false,\"t\":1662105923000}"
619619

620620
s |> recv(keep.raw = FALSE)
621-
#> [1] "{\"s\":\"EURUSD\",\"a\":0.99455,\"b\":0.99453,\"dc\":\"-0.9291\",\"dd\":\"-0.0092\",\"ppms\":false,\"t\":1662072262000}"
621+
#> [1] "{\"s\":\"EURUSD\",\"a\":0.99854,\"b\":0.99852,\"dc\":\"0.3365\",\"dd\":\"0.0034\",\"ppms\":false,\"t\":1662105923000}"
622622

623623
close(s)
624624
```

configure

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# Library version
3+
# Library versions
44
LIB_VER="722bf46"
55
TLS_VER="869298b"
66

@@ -27,11 +27,12 @@ fi
2727
# Use system lib or download and compile from source (default)
2828
if [ "$NANONEXT_SYS" ]
2929
then
30-
echo "System flag set... using libnng and libmbedtls installations in /usr/local"
30+
echo "NANONEXT_SYS flag set"
31+
echo "Using 'libnng' and 'libmbedtls' installed in '/usr/local' ..."
3132
PKG_CFLAGS="-I/usr/local/include $PKG_CFLAGS"
3233
PKG_LIBS="-L/usr/local/lib $PKG_LIBS"
3334
else
34-
echo "Finding cmake..."
35+
echo "Detecting cmake..."
3536
which cmake
3637
if [ $? -ne 0 ]
3738
then
@@ -41,14 +42,14 @@ else
4142
curl -sL https://api.github.com/repos/Mbed-TLS/mbedtls/tarball/$TLS_VER -o mbedtls.tar.gz
4243
gzip -dc mbedtls.tar.gz | tar -xf -
4344
rm -f mbedtls.tar.gz
44-
echo "complete. Downloading 'libnng' source..."
45+
echo "Downloading 'libnng' source..."
4546
curl -sL https://api.github.com/repos/nanomsg/nng/tarball/$LIB_VER -o nng.tar.gz
4647
gzip -dc nng.tar.gz | tar -xf -
4748
rm -f nng.tar.gz
4849
cd Mbed-TLS-mbedtls-$TLS_VER
4950
mkdir build
5051
cd build
51-
echo "complete. Compiling 'libmbedtls' from source..."
52+
echo "Compiling 'libmbedtls' from source..."
5253
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=1 -DENABLE_TESTING=0 -DENABLE_PROGRAMS=0 -DCMAKE_INSTALL_PREFIX=../../temp -DCMAKE_INSTALL_MESSAGE=NEVER ..
5354
cmake --build .
5455
cmake --install .
@@ -57,13 +58,12 @@ else
5758
cd nanomsg-nng-$LIB_VER
5859
mkdir build
5960
cd build
60-
echo "complete. Compiling 'libnng' from source..."
61+
echo "Compiling 'libnng' from source..."
6162
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=1 -DNNG_ENABLE_TLS=1 -DNNG_ELIDE_DEPRECATED=1 -DNNG_TESTS=0 -DNNG_TOOLS=0 -DCMAKE_INSTALL_PREFIX=../../temp -DCMAKE_INSTALL_MESSAGE=NEVER ..
6263
cmake --build .
6364
cmake --install .
6465
cd ../..
6566
rm -rf nanomsg-nng-$LIB_VER
66-
echo "complete."
6767
PKG_CFLAGS="-I`pwd`/temp/include $PKG_CFLAGS"
6868
PKG_LIBS="-L`pwd`/temp/lib $PKG_LIBS"
6969
fi

man/ncurl.Rd

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)