Skip to content

Commit

Permalink
update with CRAN badge
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Feb 6, 2025
1 parent 7d9ec46 commit da5fc74
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: watcher
Type: Package
Title: Watch the File System for Changes
Version: 0.1.0
Version: 0.1.0.9000
Authors@R:
c(person(given = "Charlie",
family = "Gao",
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# watcher (development version)

# watcher 0.1.0

* Initial CRAN release.
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# watcher

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/watcher)](https://CRAN.R-project.org/package=watcher)
[![R-CMD-check](https://github.com/r-lib/watcher/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/watcher/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/r-lib/watcher/graph/badge.svg)](https://app.codecov.io/gh/r-lib/watcher)
<!-- badges: end -->
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

<!-- badges: start -->

[![CRAN
status](https://www.r-pkg.org/badges/version/watcher)](https://CRAN.R-project.org/package=watcher)
[![R-CMD-check](https://github.com/r-lib/watcher/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/watcher/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/r-lib/watcher/graph/badge.svg)](https://app.codecov.io/gh/r-lib/watcher)
Expand Down Expand Up @@ -71,7 +73,7 @@ w
#> <Watcher>
#> Public:
#> initialize: function (path, callback, latency)
#> path: /tmp/Rtmp9R4IEk/watcher-example
#> path: /tmp/Rtmp8ACY91/watcher-example
#> running: FALSE
#> start: function ()
#> stop: function ()
Expand All @@ -84,19 +86,19 @@ file.create(file.path(dir, "newfile"))
file.create(file.path(dir, "anotherfile"))
#> [1] TRUE
later::run_now(1)
#> [1] "/tmp/Rtmp9R4IEk/watcher-example/newfile"
#> [1] "/tmp/Rtmp9R4IEk/watcher-example/anotherfile"
#> [1] "/tmp/Rtmp8ACY91/watcher-example/newfile"
#> [1] "/tmp/Rtmp8ACY91/watcher-example/anotherfile"

newfile <- file(file.path(dir, "newfile"), open = "r+")
cat("hello", file = newfile)
close(newfile)
later::run_now(1)
#> [1] "/tmp/Rtmp9R4IEk/watcher-example/newfile"
#> [1] "/tmp/Rtmp8ACY91/watcher-example/newfile"

file.remove(file.path(dir, "newfile"))
#> [1] TRUE
later::run_now(1)
#> [1] "/tmp/Rtmp9R4IEk/watcher-example/newfile"
#> [1] "/tmp/Rtmp8ACY91/watcher-example/newfile"

w$stop()
unlink(dir, recursive = TRUE, force = TRUE)
Expand Down

0 comments on commit da5fc74

Please sign in to comment.