Skip to content

Commit

Permalink
update minimum rio version, remove unneeded logic (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijlyttle authored Feb 3, 2024
1 parent 1fdeb53 commit 94b66e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: boxr
Type: Package
Title: Interface for the 'Box.com API'
Version: 0.3.6.9011
Version: 0.3.6.9012
Authors@R: c(
person("Brendan", "Rocks", email = "[email protected]",
role = c("aut")),
Expand Down Expand Up @@ -43,7 +43,7 @@ Imports:
magrittr,
mime,
purrr,
rio,
rio (>= 0.5.18),
rlang,
stats,
stringr,
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

## Internal

* update minimum version of rio package to reflect newer treatment of JSON files. (#261)

* remove unused internal function, removing dependency on httpuv package. (#259)

* update superseded function-calls from gargle, used in testing. (#251)
Expand Down
9 changes: 0 additions & 9 deletions R/boxr_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ box_read <- function(file_id, type = NULL, version_id = NULL,
cont <- read_fun(temp_file_new, ...)
}

# this code comment is old (i think) and maybe worth revisiting was rio goes to CRAN (NCD 2019-11-01)
# \/
# rio is imposing the data.frame class on .json files, which isn't lolz.
# So, if it's classed as a data.frame but doesn't have the 'row.names'
# attribute, unclass it
if ("data.frame" %in% class(cont) & is.null(attr(cont, "row.names"))) {
cont <- unclass(cont)
}

message(
"Remote file '", filename, "' read into memory as an object of class ",
paste(class(cont), collapse = ", "),
Expand Down

0 comments on commit 94b66e8

Please sign in to comment.