diff --git a/DESCRIPTION b/DESCRIPTION index dfecbea..aba7f66 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: audit.connect Title: Posit Connect Health Check -Version: 0.7.2 +Version: 0.7.3 Authors@R: person("Jumping", "Rivers", , "info@jumpingrivers.com", role = c("aut", "cre")) Description: Posit Connect Health Check. Deploys various content types to @@ -38,4 +38,4 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NEWS.md b/NEWS.md index 8f7494c..a907638 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# audit.connect 0.7.3 _2024-03-27_ + - fix: Remove additional / from user api call + # audit.connect 0.7.2 _2024-01-24_ - fix: If NA, return 0 locked apps diff --git a/R/audit_details.R b/R/audit_details.R index 0dafdd4..7f32503 100644 --- a/R/audit_details.R +++ b/R/audit_details.R @@ -10,7 +10,7 @@ audit_details = function(server, token) { # Details on the user running this audit summarise_user = function(server, token) { cli::cli_h2("User Summary") - res = httr::GET(paste0(server, "/__api__/v1/user"), + res = httr::GET(paste0(server, "__api__/v1/user"), httr::add_headers(Authorization = paste("Key", token))) check_api_status_code(res) content = httr::content(res) diff --git a/R/set_key.R b/R/set_key.R index e884016..67a3ea2 100644 --- a/R/set_key.R +++ b/R/set_key.R @@ -11,6 +11,7 @@ get_account = function() { account = .connect[["connect_account"]] account } + get_server = function(clean = FALSE) { server = .connect[["connect_server"]] if (is.null(server)) { diff --git a/R/summarise_versions.R b/R/summarise_versions.R index 566c45c..1c6b12c 100644 --- a/R/summarise_versions.R +++ b/R/summarise_versions.R @@ -10,7 +10,7 @@ summarise_versions = function(server, token) { get_server_settings = function(server, token, type = c("r", "python", "quarto")) { type = match.arg(type) - res = httr::GET(paste0(server, "/__api__/v1/server_settings/", type), + res = httr::GET(paste0(server, "__api__/v1/server_settings/", type), httr::add_headers(Authorization = paste("Key", token))) content = httr::content(res) purrr::map_dfr(content$installations, diff --git a/tests/testthat/test-check.R b/tests/testthat/test-check.R index b246ea9..7e21900 100644 --- a/tests/testthat/test-check.R +++ b/tests/testthat/test-check.R @@ -21,8 +21,4 @@ test_that("High level test", { file.copy(input, tmpdir, overwrite = TRUE) saveRDS(rtn, file = file.path(tmpdir, "output.rds")) - y = quarto::quarto_render(input = file.path(tmpdir, "report.qmd"), - execute_params = list(input = file.path(tmpdir, "output.rds"))) - # Test if file exists - expect_true(file.exists(file.path(tmpdir, "report.html"))) })