Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
add private sheet, owned by rpackagetest
Browse files Browse the repository at this point in the history
we should NOT be able to access this after we revoke authorization during testing
  • Loading branch information
jennybc committed May 27, 2015
1 parent 06a7bc5 commit 505a569
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal-projects/14_create-cars-pvt-sheet.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' ---
#' output: md_document
#' ---

library("googlesheets")
suppressPackageStartupMessages(library("dplyr"))

## damn you render and your hard-wiring of wd = dir where file lives!
## if I don't commit this abomination, existing .httr-oauth cannot be found :(
if ((getwd() %>% basename) == "data-for-demo") {
setwd("..")
}

cars_ss <- gs_new("test-gs-cars-private", ws_title = "cars",
input = head(mtcars), header = TRUE, trim = TRUE)
cars_ss
9 changes: 9 additions & 0 deletions tests/testthat/helper01_setup-sheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,12 @@ iris_pvt_url <- "https://docs.google.com/spreadsheets/d/1UXr4-haIQsmJfyjkEhlkNt2
iris_pvt_title <- "test-gs-iris-private"
iris_pvt_key <- "1UXr4-haIQsmJfyjkEhlkNt2PXduBkB97e15jez9ogRo"
iris_pvt_ws_feed <- "https://spreadsheets.google.com/feeds/worksheets/1UXr4-haIQsmJfyjkEhlkNt2PXduBkB97e15jez9ogRo/private/full"

## Private cars sheet (owned by rpackagetest)
cars_pvt_url <- "https://docs.google.com/spreadsheets/d/1rC2qjB8VE50kTkHZL5PY_DHVc9foRLI8ixKLr8a0a9Y/"
cars_pvt_title <- "test-gs-cars-private"
cars_pvt_key <- cars_pvt_url %>%
extract_key_from_url()
cars_pvt_ws_feed <- cars_pvt_url %>%
extract_key_from_url() %>%
construct_ws_feed_from_key()

0 comments on commit 505a569

Please sign in to comment.