Skip to content

Commit

Permalink
Allow explicit import of selection helpers in methods (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgallou committed Apr 10, 2024
1 parent b5c555b commit 553aac6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# plume (development version)

* Fixed selection helpers not working when imported explicitly with `::` (#76).

# plume 0.2.3

* `$new(initials_given_name = TRUE)` no longer makes initials if names are written in a script that doesn't use letter cases (#73).
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ expr_is_atomic <- function(expr) {
}

expr_is_selector <- function(expr) {
expr_is(expr, "^everyone")
expr_is(expr, "^(?:plume:::?)?everyone")
}

expr_type <- function(expr) {
Expand Down
5 changes: 5 additions & 0 deletions tests/testthat/test-set-status.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ test_that("sets status to selected authors", {
aut$get_plume()$corresponding
}, rep(TRUE, 3))

expect_equal({
aut$set_corresponding_authors(plume::everyone())
aut$get_plume()$corresponding
}, rep(TRUE, 3))

expect_equal({
withr::local_options(lifecycle_verbosity = "quiet")
aut$set_corresponding_authors(everyone_but(ric), .by = "given_name")
Expand Down

0 comments on commit 553aac6

Please sign in to comment.