Skip to content

Commit

Permalink
Migrate from r4ds org to shinyworks. (#75)
Browse files Browse the repository at this point in the history
* Migrate from r4ds org to shinyworks.

* Update snaps.
  • Loading branch information
jonthegeek committed Nov 13, 2023
1 parent 9f225b3 commit 2bc56ad
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("r4ds/cookies", fork = TRUE)`.
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("shinyworks/cookies", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge_shinyapps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
deploy-shinyapps:
if: github.repository_owner == 'r4ds'
if: github.repository_owner == 'shinyworks'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ Description: Browser cookies are name-value pairs that are saved in a
wrapping the 'js-cookie' JavaScript library
<https://github.com/js-cookie/js-cookie>.
License: MIT + file LICENSE
URL: https://github.com/r4ds/cookies, https://r4ds.github.io/cookies/
BugReports: https://github.com/r4ds/cookies/issues
URL: https://shinyworks.github.io/cookies/,
https://github.com/shinyworks/cookies
BugReports: https://github.com/shinyworks/cookies/issues
Imports:
cli,
clock,
Expand Down
10 changes: 5 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ knitr::opts_chunk$set(
)
```

# cookies <a href="https://r4ds.github.io/cookies/"><img src="man/figures/logo.svg" align="right" height="424" /></a>
# cookies <a href="https://shinyworks.github.io/cookies/"><img src="man/figures/logo.svg" align="right" height="424" /></a>

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/cookies)](https://CRAN.R-project.org/package=cookies)
[![Codecov test coverage](https://codecov.io/gh/r4ds/cookies/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r4ds/cookies?branch=main)
[![R-CMD-check](https://github.com/r4ds/cookies/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r4ds/cookies/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/shinyworks/cookies/branch/main/graph/badge.svg)](https://app.codecov.io/gh/shinyworks/cookies?branch=main)
[![R-CMD-check](https://github.com/shinyworks/cookies/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/shinyworks/cookies/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

Cookies are name-value pairs that are saved in a user's browser by a website.
Expand All @@ -37,8 +37,8 @@ install.packages("cookies")
Or install the development version of {cookies} from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("r4ds/cookies")
# install.packages("pak")
pak::pak("shinyworks/cookies")
```

## Use Cases
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# cookies <a href="https://r4ds.github.io/cookies/"><img src="man/figures/logo.svg" align="right" height="424" /></a>
# cookies <a href="https://shinyworks.github.io/cookies/"><img src="man/figures/logo.svg" align="right" height="424" /></a>

<!-- badges: start -->

Expand All @@ -10,8 +10,8 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h
[![CRAN
status](https://www.r-pkg.org/badges/version/cookies)](https://CRAN.R-project.org/package=cookies)
[![Codecov test
coverage](https://codecov.io/gh/r4ds/cookies/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r4ds/cookies?branch=main)
[![R-CMD-check](https://github.com/r4ds/cookies/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r4ds/cookies/actions/workflows/R-CMD-check.yaml)
coverage](https://codecov.io/gh/shinyworks/cookies/branch/main/graph/badge.svg)](https://app.codecov.io/gh/shinyworks/cookies?branch=main)
[![R-CMD-check](https://github.com/shinyworks/cookies/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/shinyworks/cookies/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

Cookies are name-value pairs that are saved in a user’s browser by a
Expand All @@ -31,8 +31,8 @@ Or install the development version of {cookies} from
[GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("r4ds/cookies")
# install.packages("pak")
pak::pak("shinyworks/cookies")
```

## Use Cases
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
url: https://r4ds.github.io/cookies/
url: https://shinyworks.github.io/cookies/
template:
bootstrap: 5
6 changes: 3 additions & 3 deletions man/cookies-package.Rd

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

3 changes: 2 additions & 1 deletion tests/testthat/_snaps/onload.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
Code
set_cookie_response(cookie_name = "name_of_cookie", cookie_value = "contents of the cookie",
http_only = TRUE, expiration = NULL, redirect = "/", status = 200L)
Warning <rlang_warning>
Condition
Warning:
Unexpected status code.
x Status code 200 provided, expected 300 to 399.
Output
Expand Down
15 changes: 9 additions & 6 deletions tests/testthat/_snaps/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,27 @@
Code
set_cookie(cookie_name = "testname", cookie_value = "test contents",
secure_only = FALSE, same_site = "None", session = session)
Error <rlang_error>
When same_site is None, secure_only must be TRUE.
Condition
Error in `.validate_same_site()`:
! When same_site is None, secure_only must be TRUE.

---

Code
set_cookie(cookie_name = "testname", cookie_value = "test contents", same_site = "blargh",
session = session)
Error <rlang_error>
same_site must be one of Strict, Lax, or None.
Condition
Error in `.validate_same_site()`:
! same_site must be one of Strict, Lax, or None.

---

Code
set_cookie(cookie_name = "testname", cookie_value = "test contents", same_site = 1:
3, session = session)
Error <rlang_error>
`same_site` must be a length-1 <character> or NULL.
Condition
Error in `.validate_scalar()`:
! `same_site` must be a length-1 <character> or NULL.

# remove_cookie works.

Expand Down

0 comments on commit 2bc56ad

Please sign in to comment.