Skip to content

Commit

Permalink
fix : rt_get_rtxt() would break on Windows due trying to readLines() …
Browse files Browse the repository at this point in the history
…from folder
  • Loading branch information
petermeissner committed Nov 12, 2017
1 parent ae8408e commit d58cd2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion R/tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d58cd2a

Please sign in to comment.