From d4c2423189fba5906f05e1649cb3ca73e81537ce Mon Sep 17 00:00:00 2001 From: Bart6114 Date: Mon, 3 Jul 2017 14:43:51 +0200 Subject: [PATCH] fix broken link dplyr::build_sql - bump version --- DESCRIPTION | 6 +++--- R/core.R | 2 +- README.Rmd | 8 ++++++-- README.md | 12 ++++++++---- man/infuse.Rd | 2 +- vignettes/getting_started.Rmd | 4 ++-- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ab3dff1..078ef4e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: infuser Type: Package Title: A Very Basic Templating Engine -Version: 0.2.6 -Date: 2017-03-14 +Version: 0.2.7 +Date: 2017-07-03 Author: Bart Smeets Maintainer: Bart Smeets Description: Replace parameters in strings and/or text files with specified @@ -13,7 +13,7 @@ Suggests: testthat, knitr, rmarkdown, - dplyr, + dbplyr, magrittr URL: https://github.com/bart6114/infuser/ BugReports: https://github.com/bart6114/infuser/issues diff --git a/R/core.R b/R/core.R index bfb1874..e7af3ec 100644 --- a/R/core.R +++ b/R/core.R @@ -6,7 +6,7 @@ #' Infuse a template with values. #' #' For more info and usage examples see the README on the \href{https://github.com/Bart6114/infuser}{\code{infuser} github page}. -#' To help prevent \href{https://xkcd.com/327/}{SQL injection attacks} (or other injection attacks), use a transformation function to escape special characters and provide it through the \code{transform_function} argument. \code{\link[dplyr]{build_sql}} is a great default escaping function for SQL templating. For templating in other languages you will need to build/specify your own escaping function. +#' To help prevent \href{https://xkcd.com/327/}{SQL injection attacks} (or other injection attacks), use a transformation function to escape special characters and provide it through the \code{transform_function} argument. \code{\link[dbplyr]{build_sql}} is a great default escaping function for SQL templating. For templating in other languages you will need to build/specify your own escaping function. #' #' @param file_or_string the template file or a character string containing the template #' @param ... different keys with related values, used to fill in the template (if first passed item is a list/environment the contents of this will be processed instead) diff --git a/README.Rmd b/README.Rmd index f6f004e..097d574 100644 --- a/README.Rmd +++ b/README.Rmd @@ -147,11 +147,11 @@ my_transform_function<-function(v){ infuse(sql, name = name, transform_function = my_transform_function) ``` -Of course you can also use functions from other packages. Specifically for SQL I advise you to take a look at the ```dplyr::build_sql``` function. +Of course you can also use functions from other packages. Specifically for SQL I advise you to take a look at the ```dbplyr::build_sql``` function. ```{r} -infuse(sql, name = name, transform_function = dplyr::build_sql) +infuse(sql, name = name, transform_function = dbplyr::build_sql) ``` ## Issues / questions @@ -161,6 +161,10 @@ Simply create a new issue at this GitHub repository. ## Changes +### v.0.2.7 + +- change `dpyr::build_sql` to `dbplyr::build_sql` + ### v.0.2.6 - set `readLines`'s `warn` parameter to `FALSE` diff --git a/README.md b/README.md index 31bb271..4745bdb 100644 --- a/README.md +++ b/README.md @@ -171,9 +171,9 @@ function. ## INSERT INTO Students (Name) VALUES ('Robert''); DROP TABLE Students;--') Of course you can also use functions from other packages. Specifically -for SQL I advise you to take a look at the `dplyr::build_sql` function. +for SQL I advise you to take a look at the `dbplyr::build_sql` function. - infuse(sql, name = name, transform_function = dplyr::build_sql) + infuse(sql, name = name, transform_function = dbplyr::build_sql) ## INSERT INTO Students (Name) VALUES ('Robert''); DROP TABLE Students;--') @@ -185,6 +185,10 @@ Simply create a new issue at this GitHub repository. Changes ------- +### v.0.2.7 + +- change `dpyr::build_sql` to `dbplyr::build_sql` + ### v.0.2.6 - set `readLines`'s `warn` parameter to `FALSE` @@ -199,8 +203,8 @@ Changes ### v.0.2.2 -- dropped `key_value_list` parameter (will be - interpreted automatically) +- dropped `key_value_list` parameter (will be interpreted + automatically) - fixed passing of the `variable_identifier` - ability to make `variable_identifier` persistent diff --git a/man/infuse.Rd b/man/infuse.Rd index 1cb767f..24259fe 100644 --- a/man/infuse.Rd +++ b/man/infuse.Rd @@ -29,5 +29,5 @@ infuse(file_or_string, ..., } \description{ For more info and usage examples see the README on the \href{https://github.com/Bart6114/infuser}{\code{infuser} github page}. -To help prevent \href{https://xkcd.com/327/}{SQL injection attacks} (or other injection attacks), use a transformation function to escape special characters and provide it through the \code{transform_function} argument. \code{\link[dplyr]{build_sql}} is a great default escaping function for SQL templating. For templating in other languages you will need to build/specify your own escaping function. +To help prevent \href{https://xkcd.com/327/}{SQL injection attacks} (or other injection attacks), use a transformation function to escape special characters and provide it through the \code{transform_function} argument. \code{\link[dbplyr]{build_sql}} is a great default escaping function for SQL templating. For templating in other languages you will need to build/specify your own escaping function. } diff --git a/vignettes/getting_started.Rmd b/vignettes/getting_started.Rmd index 75a103c..a66e775 100644 --- a/vignettes/getting_started.Rmd +++ b/vignettes/getting_started.Rmd @@ -150,9 +150,9 @@ my_transform_function<-function(v){ infuse(sql, name = name, transform_function = my_transform_function) ``` -Of course you can also use functions from other packages. Specifically for SQL I advise you to take a look at the `dplyr::build_sql` function. +Of course you can also use functions from other packages. Specifically for SQL I advise you to take a look at the `dbplyr::build_sql` function. ```{r} -infuse(sql, name = name, transform_function = dplyr::build_sql) +infuse(sql, name = name, transform_function = dbplyr::build_sql) ```