Skip to content

Commit

Permalink
Removed rappdirs dependency (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: kpiyush004 <piyushdps004@gmail.com>
  • Loading branch information
kpiyush04 and kpiyush004 authored May 27, 2021
1 parent 6f73a2e commit 148632a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Imports:
httr,
methods,
utils,
rappdirs
tools
Suggests:
covr,
knitr,
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -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") {

Expand Down Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion man/set_key.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 148632a

Please sign in to comment.