Skip to content

Commit 7dd1090

Browse files
committed
Road to v0.2.3
1 parent 1921522 commit 7dd1090

File tree

5 files changed

+46
-7
lines changed

5 files changed

+46
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ docs/*
3333
inst/doc
3434
cran-comments.md
3535
revdep/
36+
CRAN-RELEASE

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: attachment
22
Title: Deal with Dependencies
3-
Version: 0.2.2
3+
Version: 0.2.3
44
Authors@R:
55
c(person(given = "Sébastien",
66
family = "Rochette",

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# attachment 0.2.2
1+
# attachment 0.2.3
22

33
## Major changes
44

dev/dev_history.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ usethis::use_vignette("fill-pkg-description")
8787
devtools::build_vignettes()
8888
devtools::check()
8989

90+
# Check for remotes
91+
packageDescription("glue")[["Repository"]]
92+
remotes::install_github("tidyverse/glue")
93+
# restart session
94+
rstudioapi::restartSession()
95+
devtools::test()
96+
# install back from CRAN
97+
install.packages("glue")
98+
# restart session
99+
rstudioapi::restartSession()
100+
devtools::test()
101+
90102
# Checks for CRAN release ----
91103
# Check package as CRAN
92104
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))

tests/testthat/test-to-description.R

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,37 @@ file.copy(system.file("dummypackage",package = "attachment"), tmpdir, recursive
174174
dummypackage <- file.path(tmpdir, "dummypackage")
175175

176176
test_that("set_remotes_to_desc return nothing if local installs", {
177-
expect_message(
178-
att_amend_desc(dummypackage) %>%
179-
set_remotes_to_desc(),
180-
"no remote packages installed"
181-
)
177+
178+
pkgs <- att_amend_desc(dummypackage) %>%
179+
att_from_description()
180+
remotes <- find_remotes(pkgs)
181+
182+
desc_file <- file.path(dummypackage, "DESCRIPTION")
183+
184+
if (is.null(remotes)) {
185+
# Do not test if some are compiled locally
186+
expect_message(
187+
set_remotes_to_desc(desc_file),
188+
"no remote packages installed"
189+
)
190+
} else {
191+
pkgnames <- glue::glue_collapse(names(remotes), sep = ", ", last = " & ")
192+
nona <- unlist(lapply(remotes, is.na))
193+
expect_message(
194+
set_remotes_to_desc(desc_file),
195+
paste("Remotes for", pkgnames[nona])
196+
)
197+
}
198+
199+
# Add attachment in DESCRIPTION as should be local installed
200+
desc_lines <- readLines(desc_file)
201+
desc_lines[desc_lines == "Suggests: "] <- "Suggests: \n attachment,"
202+
writeLines(desc_lines, con = desc_file)
203+
204+
expect_message(
205+
set_remotes_to_desc(desc_file),
206+
"Package attachment was probably installed from source locally"
207+
)
182208
})
183209

184210
# Test missing DESCRIPTION works ----

0 commit comments

Comments
 (0)