diff --git a/DESCRIPTION b/DESCRIPTION index 752ded6..ca85fd9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Imports: httr, methods, utils, - rappdirs + tools Suggests: covr, knitr, diff --git a/NAMESPACE b/NAMESPACE index b1fb1e8..8fb5035 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,6 +22,6 @@ importFrom(httr,POST) importFrom(httr,add_headers) importFrom(httr,status_code) importFrom(httr,stop_for_status) -importFrom(rappdirs,user_cache_dir) +importFrom(tools,R_user_dir) importFrom(utils,browseURL) importFrom(utils,menu) diff --git a/R/api.R b/R/api.R index 0e7503d..800fb98 100644 --- a/R/api.R +++ b/R/api.R @@ -38,11 +38,11 @@ create_bugzilla_key <- function(host) { #' #' If you don't want to have the API key on .Renviron or you want to use another #' API key for bugzilla you can set it up this way. It will store the key in the -#' envirnoment which will only work for this R session. +#' environment which will only work for this R session. #' @param key The API key you want to use. #' @param key_name The name of the API key, by default "R_BUGZILLA". #' @return TRUE -#' @importFrom rappdirs user_cache_dir +#' @importFrom tools R_user_dir #' @export set_key <- function(key, key_name = "R_BUGZILLA") { @@ -100,7 +100,7 @@ set_headers <- function(key) { app_file <- function() { - path <- rappdirs::user_cache_dir("bugRzilla") + path <- tools::R_user_dir("bugRzilla", which = "cache") dir.create(path, showWarnings = FALSE, recursive = TRUE) file.path(normalizePath(path), ".Renviron") } diff --git a/R/zzz.R b/R/zzz.R index e36eaec..079602a 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -1,5 +1,5 @@ .onLoad <- function(libname, pkgname) { - path <- rappdirs::user_cache_dir("bugRzilla") + path <- tools::R_user_dir("bugRzilla", which = "cache") path <- file.path(path, ".Renviron") if (file.exists(path)) { readRenviron(path) diff --git a/man/set_key.Rd b/man/set_key.Rd index 292accd..2daab22 100644 --- a/man/set_key.Rd +++ b/man/set_key.Rd @@ -20,5 +20,5 @@ TRUE \description{ If you don't want to have the API key on .Renviron or you want to use another API key for bugzilla you can set it up this way. It will store the key in the -envirnoment which will only work for this R session. +environment which will only work for this R session. }