Skip to content

Commit

Permalink
Rework box-auth functions (#109)
Browse files Browse the repository at this point in the history
* Rework box-auth functions (fix #96):

- deprecate box_attach_on_auth()
- deprecate write.Renv arg to box_auth()
  - write environment variables to console instead
- refactor box_auth(), box_fresh_auth():
  - import glue and fs (both low depencency)

Also, fix typo in box_read() documentation

* Add deprecation to documentation, add is_void() to internal functions
  • Loading branch information
ijlyttle committed Jul 21, 2019
1 parent d220622 commit 971144b
Show file tree
Hide file tree
Showing 10 changed files with 294 additions and 167 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
Expand Up @@ -35,17 +35,19 @@ Imports:
bit64,
rio (>= 0.5.18),
mime,
glue,
fs,
utils,
stats
Suggests:
clipr (>= 0.3.0),
testthat,
knitr,
rmarkdown,
purrr,
here,
fs,
glue,
conflicted
conflicted,
usethis
Remotes:
leeper/rio
VignetteBuilder: knitr
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Expand Up @@ -2,6 +2,13 @@

## Improvements

* modifies `box_auth()` (#96):
- deprecates `write.Renv` arigument
- copies text to the clipboard, rather than overwrite the `.Renviron` file
- returns `invisible(NULL)` upon success

* deprecates `box_auth_on_attach()` (#96)

* adds a logo (#92, @nathancday)

* converts pagination method from offset to marker-based paging (#79, @awong234)
Expand Down
5 changes: 5 additions & 0 deletions R/boxr__internal_misc.R
Expand Up @@ -28,6 +28,11 @@ box_id <- function(x) {
return(as.character(bit64::as.integer64(x)))
}

# helper to identify void values
is_void <- function(x) {
is.null(x) || identical(x, "") || identical(nchar(x), 0L)
}


# Function to present different package startup messages, based on whether or
# not it looks like the user has used boxr before
Expand Down

0 comments on commit 971144b

Please sign in to comment.