-
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.
remove shell scripts and add dry run script
- Loading branch information
1 parent
62ccaa8
commit 5ef2b82
Showing
128 changed files
with
1,125 additions
and
850 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
function (response) { | ||
|
||
grep_json_body_element <- function(response, element) { | ||
response_R_body <- jsonlite::fromJSON(rawToChar(response$body)) | ||
response_R_body[[element]] <- character(1) | ||
response$body <- charToRaw(jsonlite::toJSON(response_R_body, auto_unbox = TRUE)) | ||
response | ||
} | ||
|
||
# mask host in headers | ||
response$url <- gsub(rirods:::find_irods_file("host"), "", response$url, fixed = TRUE) | ||
|
||
# token | ||
if (inherits(response, "httr2_response")) { | ||
response$request$headers$Authorization <- "" | ||
} | ||
|
||
# mask dates in headers | ||
response$headers$Date <- "" | ||
|
||
# change body upon PUT when type is raw (`iput()` and `isaverds()`) | ||
if (inherits(response, "httr2_request") && | ||
inherits(response$body$data$bytes, "form_data")) { | ||
response$body$data <- NULL | ||
if (inherits(response, "httr2_response")) { | ||
if (grepl("op=stat", response$request$url)) { | ||
response <- grep_json_body_element(response, "modified_at") # stat | ||
} | ||
|
||
if (response$method != "GET" && response$request$body$data$op == "parallel_write_init") { | ||
response <- grep_json_body_element(response, "parallel_write_handle") # mask token for init and shutdown | ||
} | ||
if (response$method != "GET" && response$request$body$data$op == "parallel_write_shutdown") { | ||
response$request$body$data$`parallel-write-handle` <- character(1) | ||
} | ||
response$request$headers$Authorization <- "" # token | ||
} | ||
|
||
if (inherits(response, "httr2_request")) { | ||
if (inherits(response$body$data$bytes, "form_data")) { | ||
# change body upon PUT when type is raw (`iput()` and `isaverds()`) | ||
response$body$data <- NULL | ||
} else if (response$method != "GET" && response$body$data$op == "parallel_write_shutdown") { | ||
response$body$data$`parallel-write-handle` <- character(1) | ||
} | ||
} | ||
|
||
response | ||
} | ||
|
||
|
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,10 @@ | ||
#!/bin/sh | ||
|
||
# get token | ||
TOKEN=$(curl -X POST -u "$1:$2" "http://localhost:9001/irods-http-api/0.1.0/authenticate") | ||
|
||
curl -G "$3/collections"\ | ||
-H "Authorization: Bearer ${TOKEN}" \ | ||
--data-urlencode 'op=list' \ | ||
--data-urlencode "lpath=$4" \ | ||
--data-urlencode "recurse=0" | grep -o "\"status_code\":[0-9]*" |
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,8 @@ | ||
#!/bin/sh | ||
|
||
DIR="$(dirname "$(realpath "$0")")" | ||
|
||
cd $DIR | ||
cd ../irods_demo | ||
|
||
docker exec irods_demo-irods-client-icommands-1 ils |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.