-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
defa2ca
commit d47269b
Showing
11 changed files
with
222 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ Imports: | |
stats, | ||
testthat (>= 3.0.0), | ||
utils, | ||
withr | ||
withr, | ||
yaml | ||
Suggests: | ||
httptest2, | ||
kableExtra, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
get_docker_compose_path <- function() { | ||
system.file("irods_demo/docker-compose.yml", package = "rirods") | ||
} | ||
|
||
get_docker_yaml <- function() { | ||
docker_compose_file <- yaml::read_yaml(get_docker_compose_path(), handlers = list( | ||
# make sure that sequences of size one are read as list | ||
# (defaults to vector of length one) | ||
seq = function(x) { | ||
x <- as.list(x) | ||
x | ||
} | ||
)) | ||
} | ||
|
||
is_irods_service_in_yaml <- function(services, docker_compose_file) { | ||
docker_compose_service_names <- names(docker_compose_file[["services"]]) | ||
irods_services_pattern <- paste0(services, collapse = "|") | ||
grepl(irods_services_pattern, docker_compose_service_names) | ||
} | ||
|
||
extract_irods_services_names <- function(services) { | ||
docker_compose_file <- get_docker_yaml() | ||
names(docker_compose_file[["services"]])[is_irods_service_in_yaml(services, docker_compose_file)] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.