From 24ebec2c00081b4f32227116cd14e66dbe130ac9 Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Tue, 20 Aug 2019 12:01:14 -0700 Subject: [PATCH] update docs, update codemeta.json --- codemeta.json | 2 +- docs/articles/configuration.html | 2 +- docs/articles/request_matching.html | 2 +- docs/articles/vcr.html | 2 +- docs/index.html | 4 +- docs/reference/Cassette.html | 6 +- docs/reference/Persisters.html | 2 +- docs/reference/UnhandledHTTPRequestError.html | 6 +- docs/reference/cassettes.html | 8 +-- docs/reference/eject_cassette.html | 2 +- docs/reference/vcr_configure.html | 24 +++---- docs/reference/vcr_logging.html | 62 +++++++++---------- 12 files changed, 61 insertions(+), 61 deletions(-) diff --git a/codemeta.json b/codemeta.json index 65bdcc3..31f3f82 100644 --- a/codemeta.json +++ b/codemeta.json @@ -227,7 +227,7 @@ "keywords": ["http", "https", "API", "web-services", "curl", "mock", "mocking", "http-mocking", "testing", "testing-tools", "tdd", "unit-testing", "rstats", "vcr", "r", "r-package"], "contIntegration": "https://travis-ci.org/ropenscilabs/vcr", "readme": "https://github.com/ropensci/vcr/blob/master/README.md", - "fileSize": "73.927KB", + "fileSize": "73.897KB", "relatedLink": "https://ropenscilabs.github.io/http-testing-book/", "releaseNotes": "https://github.com/ropensci/vcr/blob/master/NEWS.md", "developmentStatus": "http://www.repostatus.org/#wip", diff --git a/docs/articles/configuration.html b/docs/articles/configuration.html index cdc9d1d..b17731d 100644 --- a/docs/articles/configuration.html +++ b/docs/articles/configuration.html @@ -91,7 +91,7 @@

vcr configuration

Scott Chamberlain

-

2019-08-19

+

2019-08-20

Source: vignettes/configuration.Rmd diff --git a/docs/articles/request_matching.html b/docs/articles/request_matching.html index 891201d..f5df1e9 100644 --- a/docs/articles/request_matching.html +++ b/docs/articles/request_matching.html @@ -91,7 +91,7 @@

request matching

Scott Chamberlain

-

2019-08-19

+

2019-08-20

Source: vignettes/request_matching.Rmd diff --git a/docs/articles/vcr.html b/docs/articles/vcr.html index 9fb22d4..ef1f2ec 100644 --- a/docs/articles/vcr.html +++ b/docs/articles/vcr.html @@ -91,7 +91,7 @@

vcr introduction

Scott Chamberlain

-

2019-08-19

+

2019-08-20

Source: vignettes/vcr.Rmd diff --git a/docs/index.html b/docs/index.html index a6c1b4c..c079942 100644 --- a/docs/index.html +++ b/docs/index.html @@ -129,7 +129,7 @@

}) ) #> user system elapsed -#> 0.112 0.010 0.501 +#> 0.151 0.013 0.566

The request gets recorded, and all subsequent requests of the same form used the cached HTTP response, and so are much faster

+#> 0.079 0.006 0.085

Importantly, your unit test deals with the same inputs and the same outputs - but behind the scenes you use a cached HTTP response - thus, your tests run faster.

The cached response looks something like (condensed for brevity):

http_interactions:
diff --git a/docs/reference/Cassette.html b/docs/reference/Cassette.html
index 0e4b03b..83a240a 100644
--- a/docs/reference/Cassette.html
+++ b/docs/reference/Cassette.html
@@ -221,14 +221,14 @@ 

See a

Examples

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE #> Logging?: FALSE
res <- Cassette$new(name = "bob") -res$file()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/bob.yml"
res$originally_recorded_at()
#> [1] "2019-08-19 17:19:45 PDT"
res$recording()
#> [1] TRUE
res$serializable_hash()
#> $http_interactions +res$file()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/bob.yml"
res$originally_recorded_at()
#> [1] "2019-08-20 11:58:49 PDT"
res$recording()
#> [1] TRUE
res$serializable_hash()
#> $http_interactions #> list() #> #> $recorded_with @@ -244,7 +244,7 @@

Examp #> allow_playback_repeats: FALSE #> allow_unused_http_interactions: TRUE #> exclusive: FALSE -#> preserve_exact_body_bytes: FALSE

res$should_remove_matching_existing_interactions()
#> [1] TRUE
res$storage_key()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/bob.yml"
res$match_requests_on
#> [1] "method" "uri"
+#> preserve_exact_body_bytes: FALSE
res$should_remove_matching_existing_interactions()
#> [1] TRUE
res$storage_key()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/bob.yml"
res$match_requests_on
#> [1] "method" "uri"
# record all requests res <- Cassette$new("foobar", record = "all") res$eject()
#> ejecting cassette: foobar
#> CrulAdapter disabled!
#> HttrAdapter disabled!
#> <vcr - Cassette> foobar diff --git a/docs/reference/Persisters.html b/docs/reference/Persisters.html index c695d65..aeecd07 100644 --- a/docs/reference/Persisters.html +++ b/docs/reference/Persisters.html @@ -194,7 +194,7 @@

Examp #> get_cassette: function (file_name = NULL) #> initialize: function (file_name = NULL, write_fxn = NULL, content = NULL, #> is_empty: function () -#> path: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> path: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> set_cassette: function (file_name = NULL, content) #> write_fxn: NULL #> write2disk: FALSE diff --git a/docs/reference/UnhandledHTTPRequestError.html b/docs/reference/UnhandledHTTPRequestError.html index 4635672..047eded 100644 --- a/docs/reference/UnhandledHTTPRequestError.html +++ b/docs/reference/UnhandledHTTPRequestError.html @@ -180,7 +180,7 @@

Examples

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -201,7 +201,7 @@

Examp err <- UnhandledHTTPRequestError$new(request) err$request_description()

#> [1] "POST https://eu.httpbin.org/post?a=5"
err$current_matchers()
#> [1] "method" "uri"
err$match_request_on_headers()
#> [1] FALSE
err$match_request_on_body()
#> [1] FALSE
err$formatted_headers()
#> [1] " foo: bar"
cat(err$formatted_headers(), "\n")
#> foo: bar
cat(err$cassettes_description(), "\n")
#> vcr is currently using the following cassette: -#> - /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/turtle.yml +#> - /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/turtle.yml #> - record_mode: once #> - match_requests_on: method, uri #> @@ -209,7 +209,7 @@

Examp #> to replay and is prevented from recording new requests. There are a few ways #> you can deal with this: #>

cat(err$cassettes_list(), "\n")
#> vcr is currently using the following cassette: -#> - /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/turtle.yml +#> - /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/turtle.yml #> - record_mode: once #> - match_requests_on: method, uri
err$formatted_suggestions()
#> [1] " * If you're surprised vcr is raising this error\n and want insight about how vcr attempted to handle the request,\n you can use 'logging' to see more details [1].\n\n * You can use the :new_episodes record mode to allow vcr to\n record this new request to the existing cassette [2].\n\n * If you want vcr to ignore this request (and others like it), you can\n set an `ignore_request` function [3].\n\n * The current record mode ('once') does not allow new requests to be recorded\n to a previously recorded cassette. You can delete the cassette file and re-run\n your tests to allow the cassette to be recorded with this request [4].\n\n[1] https://ropenscilabs.github.io/http-testing-book/logging\n\n[2] https://ropenscilabs.github.io/http-testing-book/record-modes.html#new_episodes\n\n[3] https://ropenscilabs.github.io/http-testing-book/vcr-configuration#config-ignore-requests\n\n[4] https://ropenscilabs.github.io/http-testing-book/record-modes.html#once\n"
cat(err$format_bullet_point('foo bar', 1), "\n")
#> * foo bar [2].
err$suggestion_for("use_new_episodes")
#> $text #> [1] "You can use the :new_episodes record mode to allow vcr to" diff --git a/docs/reference/cassettes.html b/docs/reference/cassettes.html index 0801c53..700172f 100644 --- a/docs/reference/cassettes.html +++ b/docs/reference/cassettes.html @@ -172,7 +172,7 @@

Details

Examples

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -250,13 +250,13 @@

Examp #> preserve_exact_body_bytes: FALSE #>

# list the path to cassettes -cassette_path()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis"
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/foo +cassette_path()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6"
#> <vcr configuration> +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/foo #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE -#> Logging?: FALSE
cassette_path()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/foo"
+#> Logging?: FALSE
cassette_path()
#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/foo"
#> <vcr configuration> #> Cassette Dir: . #> Record: once diff --git a/docs/reference/eject_cassette.html b/docs/reference/eject_cassette.html index f27e89a..31be017 100644 --- a/docs/reference/eject_cassette.html +++ b/docs/reference/eject_cassette.html @@ -170,7 +170,7 @@

See a

Examples

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri diff --git a/docs/reference/vcr_configure.html b/docs/reference/vcr_configure.html index 88d2fb6..b5e445d 100644 --- a/docs/reference/vcr_configure.html +++ b/docs/reference/vcr_configure.html @@ -272,19 +272,19 @@

Arg

Examples

vcr_configure(dir = tempdir())
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE #> Logging?: FALSE
vcr_configure(dir = tempdir(), record = "all")
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: all #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE #> Logging?: FALSE
vcr_configuration()
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: all #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -357,7 +357,7 @@

Examp #> $filter_sensitive_data #> NULL #>

vcr_configure(tempdir(), ignore_localhost = TRUE)
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -366,13 +366,13 @@

Examp # logging vcr_configure(tempdir(), log = TRUE, log_opts = list(file = file.path(tempdir(), "vcr.log")))

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE -#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/vcr.log)
vcr_configure(tempdir(), log = TRUE, log_opts = list(file = "console"))
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/vcr.log)
vcr_configure(tempdir(), log = TRUE, log_opts = list(file = "console"))
#> <vcr configuration> +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -382,13 +382,13 @@

Examp file = file.path(tempdir(), "vcr.log"), log_prefix = "foobar" ))

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE -#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/vcr.log)
vcr_configure(tempdir(), log = FALSE)
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/vcr.log)
vcr_configure(tempdir(), log = FALSE)
#> <vcr configuration> +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -398,7 +398,7 @@

Examp vcr_configure(tempdir(), filter_sensitive_data = list(foo = "<bar>") )

#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri @@ -406,7 +406,7 @@

Examp #> Logging?: FALSE

vcr_configure(tempdir(), filter_sensitive_data = list(foo = "<bar>", hello = "<world>") )
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri diff --git a/docs/reference/vcr_logging.html b/docs/reference/vcr_logging.html index a8129a2..cdfe5ef 100644 --- a/docs/reference/vcr_logging.html +++ b/docs/reference/vcr_logging.html @@ -166,56 +166,56 @@

Arg

Examples

# user workflow vcr_configuration()
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE #> Logging?: FALSE
logfile <- file.path(tempdir(), "vcr.log") vcr_configure(tempdir(), log = TRUE, log_opts = list(file = logfile))
#> <vcr configuration> -#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis +#> Cassette Dir: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6 #> Record: once #> URI Parser: crul::url_parse #> Match Requests on: method, uri #> Preserve Bytes?: FALSE -#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpYxsTis/vcr.log)
+#> Logging?: TRUE (/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//Rtmp3gxCi6/vcr.log)
readLines(logfile) # empty
#> character(0)
# log messages vcr_log_info("hello world!") -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!"
vcr_log_info("foo bar") -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!" -#> [2] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - foo bar"
## many messages +readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!"
vcr_log_info("foo bar") +readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!" +#> [2] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - foo bar"
## many messages vcr_log_info(c("brown cow", "blue horse")) -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!" -#> [2] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - foo bar" -#> [3] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [4] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse"
vcr_log_info(c("brown cow", "blue horse", "green goat")) -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!" -#> [2] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - foo bar" -#> [3] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [4] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [5] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [6] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [7] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - green goat"
+readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!" +#> [2] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - foo bar" +#> [3] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [4] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse"
vcr_log_info(c("brown cow", "blue horse", "green goat")) +readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!" +#> [2] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - foo bar" +#> [3] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [4] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [5] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [6] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [7] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - green goat"
# standalone workflow # set a file to log to vcr_log_file((f <- tempfile()))
#> [1] TRUE
readLines(f) # empty
#> character(0)
# log messages vcr_log_info("hello world!") -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!" -#> [2] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - foo bar" -#> [3] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [4] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [5] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [6] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [7] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - green goat"
vcr_log_info("foo bar") -readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - hello world!" -#> [2] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - foo bar" -#> [3] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [4] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [5] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - brown cow" -#> [6] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - blue horse" -#> [7] "[Cassette: '<none>'] - 2019-08-19 17:19:51 - green goat"
+readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!" +#> [2] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - foo bar" +#> [3] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [4] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [5] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [6] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [7] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - green goat"
vcr_log_info("foo bar") +readLines(logfile)
#> [1] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - hello world!" +#> [2] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - foo bar" +#> [3] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [4] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [5] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - brown cow" +#> [6] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - blue horse" +#> [7] "[Cassette: '<none>'] - 2019-08-20 11:58:59 - green goat"
# cleanup unlink(f) unlink(logfile)