Closed trestletech closed 9 years ago
Yikes curl 7.15 thats very old :) I'll make CURLOPT_CONNECTTIMEOUT_MS
conditional...
I have pushed a fix: https://github.com/jeroenooms/curl/commit/16cf2e1aef73a4e7e654bfde7c348a7c920917c6. Can you try again?
library(devtools)
install_github("jeroenooms/curl")
or if you don't have devtools from the shell:
git clone https://github.com/jeroenooms/curl
R CMD INSTALL curl
Sure. Give me one sec to get devtools working -- it was actually devtools > rversions > curl that lead me to this issue.
You can just use the shell instead:
git clone https://github.com/jeroenooms/curl
R CMD INSTALL curl
Yup. VM's just tied up with a build right now.
While you're at it, can you run the unit tests? I'd be curious to see if everything works with such an ancient system ;)
git clone https://github.com/jeroenooms/curl
R CMD INSTALL curl --install-tests
And then in R:
library(testthat)
test_package("curl")
Package now installs cleanly. Getting a Error: No tests found for curl
when trying to testthat, though.
You have to pass --install-tests
when installing. If you're using devtools you would do:
devtools::install_github("jeroenooms/curl", INSTALL_opts="--install-tests")
testthat::test_package("curl")
There we go. (Thanks for the quick fix, btw.)
> library(testthat)
> test_package("curl")
This is libcurl version 7.15.5 with OpenSSL/0.9.8b
Authentication : ......1
Cookies : ..............
Reusable handle : ........................
Posting data : 234...
1. Error: Auth username and password -------------------------------------------
Unknown options.
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"),
warning = function(c) invokeRestart("muffleWarning"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: handle_setopt(h, username = "jerry", password = "secret") at test-auth.R:21
5: stop("Unknown options.")
2. Error: Post text data -------------------------------------------------------
Unknown options.
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"),
warning = function(c) invokeRestart("muffleWarning"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: handle_setopt(h, COPYPOSTFIELDS = "moo=moomooo") at test-post.R:6
5: stop("Unknown options.")
3. Error: Change headers -------------------------------------------------------
lexical error: invalid char in json text.
<!DOCTYPE HTML PUBLIC "-//W3C//
(right here) ------^
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"),
warning = function(c) invokeRestart("muffleWarning"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: jsonlite::fromJSON(rawToChar(req$content)) at test-post.R:36
5: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame,
simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
6: parseJSON(txt, bigint_as_char)
7: parse_string(txt, bigint_as_char)
4. Error: Post JSON data -------------------------------------------------------
Unknown options.
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"),
warning = function(c) invokeRestart("muffleWarning"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: handle_setopt(h, COPYPOSTFIELDS = jsonlite::toJSON(mtcars)) at test-post.R:44
5: stop("Unknown options.")
Error: Test failures
>
This fix is on cran now.
Let me know if I can provide any more info!