Skip to content

Commit

Permalink
Remove unused internal code
Browse files Browse the repository at this point in the history
This is internal, un-exported code that is no longer used elsewhere in
devtools. I think it best for future maintenance concerns that it just be
removed.
  • Loading branch information
jimhester committed Oct 17, 2018
1 parent 89da90d commit d08ab92
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 209 deletions.
14 changes: 0 additions & 14 deletions R/R.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,3 @@ r_env_vars <- function() {

vars
}

# Create a temporary .Rprofile based on the current "repos" option
# and return a named vector that corresponds to environment variables
# that need to be set to use this .Rprofile
r_profile <- function() {
tmp_user_profile <- file.path(tempdir(), "Rprofile-devtools")
tmp_user_profile_con <- file(tmp_user_profile, "w")
on.exit(close(tmp_user_profile_con), add = TRUE)
writeLines("options(repos =", tmp_user_profile_con)
dput(getOption("repos"), tmp_user_profile_con)
writeLines(")", tmp_user_profile_con)

c(R_PROFILE_USER = tmp_user_profile)
}
99 changes: 0 additions & 99 deletions R/decompress.R

This file was deleted.

50 changes: 0 additions & 50 deletions R/download-method.R

This file was deleted.

12 changes: 11 additions & 1 deletion R/release.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ release <- function(pkg = ".", check = FALSE, args = NULL) {
cat_rule()
}
cran_url <- paste0(
cran_mirror(), "/web/checks/check_results_",
getOption("repos")[["CRAN"]], "/web/checks/check_results_",
pkg$package, ".html"
)
if (yesno(
Expand Down Expand Up @@ -386,3 +386,13 @@ flag_release <- function(pkg = ".") {
writeLines(msg, file.path(pkg$path, "CRAN-RELEASE"))
usethis::use_build_ignore("CRAN-RELEASE")
}

cran_mirror <- function(repos = getOption("repos")) {
repos[repos == "@CRAN@"] <- "http://cloud.r-project.org"

if (is.null(names(repos))) {
names(repos) <- "CRAN"
}

repos[["CRAN"]]
}
35 changes: 0 additions & 35 deletions R/source.R

This file was deleted.

10 changes: 0 additions & 10 deletions tests/testthat/test-getrootdir.R

This file was deleted.

0 comments on commit d08ab92

Please sign in to comment.