Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,6 @@ importFrom(crayon,italic)
importFrom(crayon,make_style)
importFrom(crayon,red)
importFrom(crayon,underline)
importFrom(curl,curl_version)
importFrom(grDevices,col2rgb)
importFrom(grDevices,colors)
importFrom(grDevices,rgb)
Expand Down
3 changes: 1 addition & 2 deletions R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,13 @@ set_crunch_config <- function(cfg = c(
#' globally with [set_crunch_config()].
#' @export
#' @keywords internal
#' @importFrom curl curl_version
crunch_user_agent <- function(...) {
## Cf. httr:::default_ua
## Include versions of any of these packages, if attached
pkgs <- ua_packages[ua_packages %in% loadedNamespaces()]
ua <- c(
# Also include the libcurl version
paste0("libcurl/", curl_version()$version),
paste0("libcurl/", curl::curl_version()$version),
mapply(packageUA, pkgs, names(pkgs)),
# And any extra bits provided
...
Expand Down
2 changes: 2 additions & 0 deletions R/crunch.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#' @importFrom httr config add_headers
.onLoad <- function(lib, pkgname = "crunch") {
if (envOrOption("crunch.skip.startup", FALSE, expect_lgl = TRUE)) return()

setIfNotAlready(
httpcache.on = TRUE,
crunch.api = "https://app.crunch.io/api/",
Expand Down
1 change: 1 addition & 0 deletions R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ vectorOrList <- function(obj, type) {
#' | crunch.delimiter | R_CRUNCH_DELIMITER | "/" | What to use as a delimiter when printing folder paths |
#' | crunch.check.updates | R_CRUNCH_CHECK_UPDATES | TRUE | Whether to check for updates to the crunch package |
#' | crunch.debug | R_CRUNCH_DEBUG | FALSE | Whether to print verbose information for debugging |
#' | crunch.skip.startup | R_CRUNCH_SKIP_STARTUP | FALSE | Whether to skip package startup (useful for webR) |
#' | test.verify.ssl | R_TEST_VERIFY_SSL | TRUE | Whether to verify ssl in curl during crunch tests |
#' | crunch.stabilize.query | R_CRUNCH_STABILIZE_QUERY | FALSE | Whether to stabilize JSON objects for saving as `httptest` objects |
#' | crunch.namekey.dataset | R_CRUNCH_NAMEKEY_DATASET | "alias" | What variable identifier (alias or name) to use for a dataset's variables |
Expand Down
1 change: 1 addition & 0 deletions man/envOrOption.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading