datawookie / emayili

Compare 60b05d9 ... +0 ... a19ab2a

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 5 files from the diff.

@@ -20,13 +20,13 @@
Loading
20 20
#' msg %>% encrypt()
21 21
#' }
22 22
encrypt <- function(msg, encrypt = TRUE, sign = TRUE, public_key = TRUE) {
23 -
  encrypt <- ifelse(is.null(encrypt), FALSE, encrypt)
23 +
  encrypt <- ifelse(is.null(encrypt), FALSE, encrypt)           # nocov start
24 24
  sign <- ifelse(is.null(sign), FALSE, sign)
25 25
  stopifnot(is.logical(encrypt) && is.logical(sign))
26 26
27 27
  msg$encrypt <- encrypt
28 28
  msg$sign <- sign
29 -
  msg$public_key <- public_key
29 +
  msg$public_key <- public_key                                  # nocov end
30 30
31 31
  if (get_option_invisible()) invisible(msg) else msg # nocov
32 32
}
@@ -41,7 +41,7 @@
Loading
41 41
42 42
  if (encrypt || sign || public_key) {
43 43
    if(!requireNamespace("gpg", quietly = TRUE)) {
44 -
      stop("Install {gpg} to encrypt and/or sign messages.")
44 +
      stop("Install {gpg} to encrypt and/or sign messages.")    # nocov
45 45
    }
46 46
    log_debug("Encrypt message: {encrypt}")
47 47
    log_debug("Sign message:    {sign}")
@@ -55,10 +55,10 @@
Loading
55 55
56 56
    keys <- gpg::gpg_list_keys()
57 57
58 -
    missing_keys <- anti_join(recipients, keys, by = "email")
58 +
    missing_keys <- anti_join(parties, keys, by = "email")
59 59
60 60
    if (nrow(missing_keys)) {
61 -
      stop("Missing public keys for the follow addresses: ", paste(missing_keys$email, collapse = ", "), ".")
61 +
      stop("Missing keys for the follow addresses: ", paste(missing_keys$email, collapse = ", "), ".")
62 62
    }
63 63
64 64
    # Get the fingerprints of the senders' keys.
@@ -77,10 +77,15 @@
Loading
77 77
78 78
    if (sign || public_key) {
79 79
      if (!("multipart_mixed" %in% class(content))) {
80 -
        log_debug("Convert message to multipart/mixed.")
81 -
        content <- multipart_mixed(
82 -
          children = list(content)
83 -
        )
80 +
        if (is.null(content)) {
81 +
          log_debug("Create empty multipart/mixed.")
82 +
          content <- multipart_mixed()
83 +
        } else {
84 +
          log_debug("Convert message to multipart/mixed.")
85 +
          content <- multipart_mixed(
86 +
            children = list(content)
87 +
          )
88 +
        }
84 89
      }
85 90
    }
86 91

Learn more Showing 3 files with coverage changes found.

Changes in R/mime.R
-1
+1
Loading file...
Changes in R/encrypt.R
-2
+2
Loading file...
Changes in R/utils.R
-3
+3
Loading file...
Files Coverage
R +1.70% 99.26%
Project Totals (20 files) 99.26%
Loading