From d58cd2aeead50a8c4b31ecd529649f4c80b97449 Mon Sep 17 00:00:00 2001 From: petermeissner Date: Sun, 12 Nov 2017 18:19:50 +0100 Subject: [PATCH] fix : rt_get_rtxt() would break on Windows due trying to readLines() from folder --- R/tools.R | 5 ++++- cran-comments.md | 6 ++++-- tests/testthat/test_tools.R | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/tools.R b/R/tools.R index 5f27041..e44e675 100644 --- a/R/tools.R +++ b/R/tools.R @@ -17,7 +17,10 @@ rt_get_rtxt <- function(name=sample(rt_list_rtxt(),1)){ if( is.numeric(name) ){ name <- rt_list_rtxt()[name] } - readLines( system.file( paste0("robotstxts/",name), package = "robotstxt" ), warn = FALSE) + readLines( + system.file( paste0("robotstxts/",name), package = "robotstxt" ), + warn = FALSE + ) } #' list robots.txt files saved along with the package diff --git a/cran-comments.md b/cran-comments.md index cdf7b35..921836d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,9 +2,11 @@ - Ubuntu precise (12.04.5 LTS) (on travis-ci: old, current, devel; https://travis-ci.org/ropenscilabs/robotstxt) --> ok -- Win10 64 - current 3.4.1 : locally, with 1 warning abaout qpdf missing - which should be fine though --> ok +- Ubuntu 16.04 --> ok -- win-builder - devel : --> ok +- Win10 lokal with R current --> ok + +- win-builder - devel : - ## R CMD check results diff --git a/tests/testthat/test_tools.R b/tests/testthat/test_tools.R index f55f5a3..1c21e08 100644 --- a/tests/testthat/test_tools.R +++ b/tests/testthat/test_tools.R @@ -73,7 +73,6 @@ test_that( }) expect_silent({ - rt_get_rtxt(0) rt_get_rtxt(1) rt_get_rtxt("robots_wikipedia.txt") rt_get_rtxt()