diff --git a/.Rbuildignore b/.Rbuildignore index c686e51e..321dd9b8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,6 +4,7 @@ ^\.github$ ^\.envrc$ ^\.vscode$ +^\.claude$ ^.*\.lic$ ^renv$ ^renv\.lock$ @@ -23,3 +24,5 @@ ^.lintr$ ^cran-comments\.md$ ^CRAN-SUBMISSION$ +^CLAUDE.local.md$ +^CLAUDE.md$ diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index de1ff041..a8d1af70 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -47,7 +47,7 @@ jobs: shell: Rscript {0} - name: Run integration tests - uses: nealrichardson/with-connect@dev + uses: nealrichardson/with-connect env: CONNECTAPI_INTEGRATED: "true" with: diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index cef58d06..741f53a9 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -34,7 +34,7 @@ jobs: needs: website - name: Build site - uses: nealrichardson/with-connect@dev + uses: nealrichardson/with-connect with: # Runs on the default version in the with-connect action license: ${{ secrets.CONNECT_LICENSE_FILE }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index d39c5d82..7b7c2b27 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -29,7 +29,7 @@ jobs: needs: coverage - name: Run coverage - uses: nealrichardson/with-connect@dev + uses: nealrichardson/with-connect env: CONNECTAPI_INTEGRATED: "true" with: diff --git a/DESCRIPTION b/DESCRIPTION index 6fa79fe7..989f71b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: connectapi Title: Utilities for Interacting with the 'Posit Connect' Server API -Version: 0.8.0.9000 +Version: 0.9.0 Authors@R: c( person(given = "Toph", family = "Allen", diff --git a/NEWS.md b/NEWS.md index e4ebb378..a2a210bd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# connectapi (development version) +# connectapi 0.9.0 - New `set_integrations()` function to set the OAuth integration associations for a content item. (#414) @@ -9,7 +9,6 @@ - New functions allow you to manage the OAuth integrations on your Connect server: `create_integration()`, `update_integration()` and `delete_integration()`. (#434) -- Support content search API with the `search_content()` function. (#272) - New `search_content()` function which lets you search and filter content items on the Connect server. (#272, #447) - New `lock_content()` and `unlock_content()` functions for locking and unlocking diff --git a/README.Rmd b/README.Rmd index fa6e3ac4..9efc00f9 100644 --- a/README.Rmd +++ b/README.Rmd @@ -165,8 +165,9 @@ to do the operation in question **Warning about version numbers** -We test the package against a range of versions of Connect, as old as 1.8.8.2 (May 2021). -If your Connect server is older than that, the package may still work, but `connectapi` will warn you. +We test the package against a range of versions of Connect, as old as +`2022.10.0`. If your Connect server is older than that, the +package may still work. We strive to: diff --git a/README.md b/README.md index 2b64a66b..d8869f1d 100644 --- a/README.md +++ b/README.md @@ -162,8 +162,8 @@ Connect cluster to do the operation in question **Warning about version numbers** We test the package against a range of versions of Connect, as old as -`2022.10.0`. If your Connect server is older than that, the -package may still work. +`2022.10.0`. If your Connect server is older than that, the package may +still work. We strive to: diff --git a/tests/testthat/test-content.R b/tests/testthat/test-content.R index ee4520eb..bdc9b4e4 100644 --- a/tests/testthat/test-content.R +++ b/tests/testthat/test-content.R @@ -505,43 +505,6 @@ with_mock_dir("2025.09.0", { ) }) - test_that("content search uses default page_size of 500 and page_number of 1", { - without_internet( - expect_GET( - search_content(client, q = "bream"), - "https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url" #nolint - ) - ) - }) - - test_that("content search passes arbitrary parameters through ... to query string", { - without_internet( - expect_GET( - search_content( - client, - q = "bream", - future_param = "value" - ), - "https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url&future_param=value" #nolint - ) - ) - }) - - test_that("the inner .search_content() func calls the endpoint correctly", { - without_internet( - expect_GET( - .search_content( - client, - q = "bream", - page_number = 2, - page_size = 20, - include = "owner" - ), - "https://connect.example/__api__/v1/search/content?q=bream&page_number=2&page_size=20&include=owner" - ) - ) - }) - test_that("search_content() can be converted to a data frame correctly", { content_df <- search_content(client, q = "sea bream") |> as_tibble() @@ -595,6 +558,43 @@ with_mock_dir("2025.09.0", { }) }) +test_that("content search uses default page_size of 500 and page_number of 1", { + without_internet( + expect_GET( + search_content(client, q = "bream"), + "https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url" #nolint + ) + ) +}) + +test_that("content search passes arbitrary parameters through ... to query string", { + without_internet( + expect_GET( + search_content( + client, + q = "bream", + future_param = "value" + ), + "https://connect.example/__api__/v1/search/content?q=bream&page_number=1&page_size=500&include=owner%2Cvanity_url&future_param=value" #nolint + ) + ) +}) + +test_that("the inner .search_content() func calls the endpoint correctly", { + without_internet( + expect_GET( + .search_content( + client, + q = "bream", + page_number = 2, + page_size = 20, + include = "owner" + ), + "https://connect.example/__api__/v1/search/content?q=bream&page_number=2&page_size=20&include=owner" + ) + ) +}) + test_that("content search errors on Connect < 2024.04.0", { client <- MockConnect$new("2024.04.0") client$mock_response(