boB Rudis
5 years ago
12 changed files with 475 additions and 8 deletions
@ -0,0 +1,31 @@ |
|||
.First <- function() { |
|||
|
|||
options( |
|||
repos = c(CRAN="http://bigd/cran/"), |
|||
# repos = c(CRAN = "https://cloud.r-project.org"), |
|||
# repos = c(CRAN="https://cran.rstudio.com/"), |
|||
deparse.max.lines = 200, |
|||
HTTPUserAgent = "X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*", |
|||
menu.graphics = FALSE, |
|||
sergeant.bigint.warnonce = FALSE, |
|||
athena.driver = "odbc", |
|||
java.parameters = c(getOption("java.parameters", default = NULL), "-Xrs"), |
|||
tidyverse.quiet=TRUE, |
|||
devtools.name = "Bob Rudis", |
|||
devtools.desc.author = 'c(person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")))', |
|||
devtools.desc.license = "MIT + file LICENSE" |
|||
) |
|||
|
|||
} |
|||
|
|||
if (interactive()) { |
|||
options(java.parameters = "-Xmx4g") |
|||
suppressPackageStartupMessages({ |
|||
library(usethis) |
|||
library(devtools) |
|||
# library(bit64) |
|||
}) |
|||
# methods::setAs("integer", "integer64", function(from) bit64::as.integer64(from)) |
|||
# methods::setAs("double", "integer64", function(from) bit64::as.integer64(from)) |
|||
# methods::setAs("numeric", "integer64", function(from) bit64::as.integer64(from)) |
|||
} |
@ -0,0 +1,45 @@ |
|||
# DO NOT CHANGE the "init" and "install" sections below |
|||
|
|||
# Download script file from GitHub |
|||
init: |
|||
ps: | |
|||
$ErrorActionPreference = "Stop" |
|||
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" |
|||
Import-Module '..\appveyor-tool.ps1' |
|||
|
|||
install: |
|||
ps: Bootstrap |
|||
|
|||
cache: |
|||
- C:\RLibrary |
|||
|
|||
# Adapt as necessary starting from here |
|||
|
|||
build_script: |
|||
- travis-tool.sh install_deps |
|||
|
|||
test_script: |
|||
- travis-tool.sh run_tests |
|||
|
|||
on_failure: |
|||
- 7z a failure.zip *.Rcheck\* |
|||
- appveyor PushArtifact failure.zip |
|||
|
|||
artifacts: |
|||
- path: '*.Rcheck\**\*.log' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.out' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.fail' |
|||
name: Logs |
|||
|
|||
- path: '*.Rcheck\**\*.Rout' |
|||
name: Logs |
|||
|
|||
- path: '\*_*.tar.gz' |
|||
name: Bits |
|||
|
|||
- path: '\*_*.zip' |
|||
name: Bits |
Binary file not shown.
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>Label</key> |
|||
<string>com.example.app</string> |
|||
<key>Program</key> |
|||
<string>/Users/Me/Scripts/cleanup.sh</string> |
|||
<key>RunAtLoad</key> |
|||
<true/> |
|||
</dict> |
|||
</plist> |
@ -1,4 +1,65 @@ |
|||
as.raw(c(0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, |
|||
0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, |
|||
0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, |
|||
0x54, 0x46, 0x2d, 0x38, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x44, |
|||
0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x70, 0x6c, 0x69, 0x73, |
|||
0x74, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x22, 0x2d, |
|||
0x2f, 0x2f, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x2f, 0x2f, 0x44, 0x54, |
|||
0x44, 0x20, 0x50, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x31, 0x2e, 0x30, |
|||
0x2f, 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, |
|||
0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x70, 0x70, 0x6c, |
|||
0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x54, 0x44, 0x73, 0x2f, |
|||
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4c, 0x69, 0x73, |
|||
0x74, 0x2d, 0x31, 0x2e, 0x30, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, |
|||
0x0a, 0x3c, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x76, 0x65, 0x72, |
|||
0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x3e, |
|||
0x0a, 0x09, 0x3c, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x09, 0x09, |
|||
0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x3c, |
|||
0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, 0x74, |
|||
0x72, 0x69, 0x6e, 0x67, 0x3e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, |
|||
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x3c, 0x2f, |
|||
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x09, 0x09, 0x3c, |
|||
0x6b, 0x65, 0x79, 0x3e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, |
|||
0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x73, |
|||
0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x2f, 0x55, 0x73, 0x65, 0x72, |
|||
0x73, 0x2f, 0x4d, 0x65, 0x2f, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, |
|||
0x73, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x2e, 0x73, |
|||
0x68, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, |
|||
0x09, 0x09, 0x3c, 0x6b, 0x65, 0x79, 0x3e, 0x52, 0x75, 0x6e, 0x41, |
|||
0x74, 0x4c, 0x6f, 0x61, 0x64, 0x3c, 0x2f, 0x6b, 0x65, 0x79, 0x3e, |
|||
0x0a, 0x09, 0x09, 0x3c, 0x74, 0x72, 0x75, 0x65, 0x2f, 0x3e, 0x0a, |
|||
0x09, 0x3c, 0x2f, 0x64, 0x69, 0x63, 0x74, 0x3e, 0x0a, 0x3c, 0x2f, |
|||
0x70, 0x6c, 0x69, 0x73, 0x74, 0x3e, 0x0a)) -> raw_plist |
|||
|
|||
res <- plist_to_list(raw_plist) |
|||
|
|||
expect_true("Label" %in% names(res)) |
|||
|
|||
xml <- '<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict> |
|||
<key>Label</key> |
|||
<string>com.example.app</string> |
|||
<key>Program</key> |
|||
<string>/Users/Me/Scripts/cleanup.sh</string> |
|||
<key>RunAtLoad</key> |
|||
<true/> |
|||
</dict> |
|||
</plist>' |
|||
|
|||
res <- plist_to_list(xml) |
|||
|
|||
expect_true("Label" %in% names(res)) |
|||
|
|||
expect_true(nchar(plist_to_xml(xml)) == 338) |
|||
|
|||
expect_true(nchar(plist_to_xml(raw_plist)) == 338) |
|||
|
|||
res <- read_plist(system.file("sample/plist.txt", package = "plist")) |
|||
expect_true("Label" %in% names(res)) |
|||
|
|||
res <- read_plist(system.file("sample/plist.bin", package = "plist")) |
|||
expect_true("Label" %in% names(res)) |
|||
|
|||
# Placeholder with simple test |
|||
expect_equal(1 + 1, 2) |
|||
|
|||
|
@ -0,0 +1,18 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/main.R |
|||
\name{read_plist} |
|||
\alias{read_plist} |
|||
\title{Read a binary or XML property list from a file/connection} |
|||
\usage{ |
|||
read_plist(x) |
|||
} |
|||
\arguments{ |
|||
\item{x}{a file or connection (will be \code{\link[=path.expand]{path.expand()}}ed)} |
|||
} |
|||
\description{ |
|||
Read a binary or XML property list from a file/connection |
|||
} |
|||
\examples{ |
|||
read_plist(system.file("sample/plist.txt", package = "plist")) |
|||
read_plist(system.file("sample/plist.bin", package = "plist")) |
|||
} |
Loading…
Reference in new issue