-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from manuteleco/support_storage_emulator
Add support for GCS emulators
- Loading branch information
Showing
16 changed files
with
131 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,11 @@ Description: Interact with Google Cloud Storage <https://cloud.google.com/storag | |
API in R. Part of the 'cloudyr' <https://cloudyr.github.io/> project. | ||
Authors@R: c(person("Mark", "Edmondson",email = "[email protected]", | ||
role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0002-8434-3881"))) | ||
comment = c(ORCID = "0000-0002-8434-3881")), | ||
person("manuteleco", | ||
email = "[email protected]", | ||
role = "ctb", | ||
comment = "<https://github.com/manuteleco>")) | ||
URL: https://code.markedmondson.me/googleCloudStorageR/ | ||
BugReports: https://github.com/cloudyr/googleCloudStorageR/issues | ||
Depends: | ||
|
@@ -36,7 +40,7 @@ Remotes: | |
License: MIT + file LICENSE | ||
LazyData: true | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.2.0 | ||
RoxygenNote: 7.2.1 | ||
Config/testthat/edition: 3 | ||
Config/testthat/parallel: false | ||
Encoding: UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Google Cloud Storage API host, used by default | ||
.default_storage_host <- "https://storage.googleapis.com" | ||
|
||
#' Get the Google Cloud Storage API host to use for requests | ||
#' | ||
#' Uses the \code{STORAGE_EMULATOR_HOST} environment variable if set, otherwise | ||
#' uses the default host (the real Google Cloud Storage API). | ||
#' | ||
#' @return The host to use for requests (includes scheme, host and port) | ||
get_storage_host <- function() { | ||
Sys.getenv("STORAGE_EMULATOR_HOST", .default_storage_host) | ||
} | ||
|
||
#' Check if the Google Cloud Storage API is emulated | ||
#' | ||
#' @return TRUE if the Google Cloud Storage API is emulated, FALSE otherwise | ||
is.storage_emulated <- function() { | ||
!is.null(Sys.getenv("STORAGE_EMULATOR_HOST")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters