├── LICENSE ├── R ├── zzz.R ├── prairie.R ├── response-utils.R ├── request-header.R ├── body.R ├── jsonify.R ├── response-header.R ├── utils.R ├── status.R ├── mockup.R ├── request-request-line.R ├── application.R ├── request.R ├── response.R └── route.R ├── .Rbuildignore ├── inst └── dull_logo.png ├── tests ├── testthat.R └── testthat │ ├── sample-route.R │ ├── whoops-route.R │ ├── sample-response.html │ ├── test-response-functions.R │ ├── test-mockup.R │ ├── test-application-object.R │ ├── test-request-object.R │ ├── test-jsonify.R │ ├── test-route-functions.R │ ├── test-utils.R │ ├── test-request-functions.R │ ├── test-route-object.R │ └── test-response.R ├── .gitignore ├── .travis.yml ├── man ├── as.list.response.Rd ├── print.application.Rd ├── run.Rd ├── print.request.Rd ├── reason_phrase.Rd ├── print.response.Rd ├── status.Rd ├── query.Rd ├── print.route.Rd ├── prairie.Rd ├── as.request.Rd ├── method.Rd ├── simpleHtmlTable.Rd ├── mockup.Rd ├── request-headers.Rd ├── response-headers.Rd ├── body.Rd ├── uri.Rd ├── json.Rd ├── application.Rd ├── as.route.Rd ├── response.Rd ├── as.response.Rd ├── request.Rd └── route.Rd ├── NAMESPACE ├── DESCRIPTION └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2015 2 | COPYRIGHT HOLDER: Nathan Teetor 3 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onAttach <- function(libname, pkgname) { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^prairie\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^\.travis\.yml$ 4 | -------------------------------------------------------------------------------- /inst/dull_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nteetor/prairie/HEAD/inst/dull_logo.png -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(prairie) 3 | 4 | test_check("prairie") 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | README.html 5 | prairie.Rproj 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /tests/testthat/sample-route.R: -------------------------------------------------------------------------------- 1 | route( 2 | 'nothing', 3 | 'to', 4 | function(req) { 5 | 'see here' 6 | } 7 | ) 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Sample .travis.yml for R projects 2 | 3 | language: r 4 | warnings_are_errors: true 5 | sudo: required 6 | r_github_packages: 7 | - jimhester/covr 8 | 9 | after_success: 10 | - Rscript -e 'covr::codecov()' 11 | -------------------------------------------------------------------------------- /tests/testthat/whoops-route.R: -------------------------------------------------------------------------------- 1 | string <- 'how did this get here?' 2 | 3 | route( 4 | 'GET', 5 | '^bridge/to/[a-z]+$', 6 | function() { 7 | response() 8 | } 9 | ) 10 | 11 | post_amble <- '10 days and thirty minutes prior ...' 12 | -------------------------------------------------------------------------------- /R/prairie.R: -------------------------------------------------------------------------------- 1 | #' @seealso \code{\link{app}}, \code{\link{route}}, \code{\link{request}}, and 2 | #' \code{\link{response}} 3 | #' 4 | #' @importFrom httpuv runServer encodeURI 5 | #' @importFrom stringr str_match_all 6 | #' 7 | #' @name prairie 8 | #' @docType package 9 | "_PACKAGE" 10 | -------------------------------------------------------------------------------- /tests/testthat/sample-response.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |