boB Rudis
5 years ago
15 changed files with 120 additions and 143 deletions
@ -1,16 +1,5 @@ |
|||
language: r |
|||
warnings_are_errors: true |
|||
sudo: required |
|||
dist: trusty |
|||
language: R |
|||
cache: packages |
|||
|
|||
apt_packages: |
|||
- libmagic-dev |
|||
|
|||
env: |
|||
global: |
|||
- CRAN: http://cran.rstudio.com |
|||
|
|||
notifications: |
|||
email: |
|||
on_success: change |
|||
on_failure: change |
|||
after_success: |
|||
- Rscript -e 'covr::codecov()' |
@ -0,0 +1,2 @@ |
|||
This package was submitted to CRAN on 2019-07-06. |
|||
Once it is accepted, delete this file and tag the release (commit ecb1aa0316). |
@ -1,26 +1,25 @@ |
|||
Package: wand |
|||
Type: Package |
|||
Title: Retrieve 'Magic' Attributes from Files and Directories |
|||
Version: 0.4.0 |
|||
Date: 2018-09-16 |
|||
Authors@R: c( |
|||
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), |
|||
comment = c(ORCID = "0000-0001-5670-2640")) |
|||
) |
|||
Title: Retrieve 'Magic' Attributes from Files and |
|||
Directories |
|||
Version: 0.5.0 |
|||
Date: 2019-07-06 |
|||
Authors@R: c( person("Bob", "Rudis", email = |
|||
"bob@rud.is", role = c("aut", "cre"), comment = |
|||
c(ORCID = "0000-0001-5670-2640")) ) |
|||
Maintainer: Bob Rudis <bob@rud.is> |
|||
Description: 'MIME' types are shorthand descriptors for file contents and can be |
|||
determined from "magic" bytes in file headers, file contents or intuited from |
|||
file extensions. Tools are provided to perform curated "magic" tests as well |
|||
as mapping 'MIME' types from a database of over 1,500 extension mappings. |
|||
Description: 'MIME' types are shorthand descriptors for |
|||
file contents and can be determined from "magic" |
|||
bytes in file headers, file contents or intuited |
|||
from file extensions. Tools are provided to |
|||
perform curated "magic" tests as well as mapping |
|||
'MIME' types from a database of over 1,500 |
|||
extension mappings. |
|||
URL: http://gitlab.com/hrbrmstr/wand |
|||
BugReports: https://gitlab.com/hrbrmstr/wand/issues |
|||
Encoding: UTF-8 |
|||
License: AGPL |
|||
Suggests: |
|||
testthat, |
|||
covr |
|||
Imports: |
|||
tools |
|||
Depends: |
|||
R (>= 3.2.0) |
|||
RoxygenNote: 6.0.1.9000 |
|||
License: MIT + file LICENSE |
|||
Suggests: covr, tinytest |
|||
Imports: tools |
|||
Depends: R (>= 3.2.0) |
|||
RoxygenNote: 6.1.1 |
|||
|
@ -0,0 +1,2 @@ |
|||
YEAR: 2019 |
|||
COPYRIGHT HOLDER: Bob Rudis |
@ -1,21 +1,16 @@ |
|||
## Test environments |
|||
* local OS X install, R 3.3.1 |
|||
* local Windows 10 install, R 3.3.0 & R 3.3.1 |
|||
* ubuntu 14.04 (on travis-ci), R 3.3.1 |
|||
* local OS X install, R 3.6.0 |
|||
* ubuntu 14.04 (on travis-ci), R 3.6.0 |
|||
* win-builder (devel and release) |
|||
|
|||
## R CMD check results |
|||
|
|||
0 errors | 0 warnings | 1 note |
|||
|
|||
* This is a new release. |
|||
|
|||
## Reverse dependencies |
|||
|
|||
This is a new release, so there are no reverse dependencies. |
|||
* This is a maintenance release. |
|||
|
|||
--- |
|||
|
|||
- For Unix/Linux the 'libmagic' library is *required* |
|||
- For Windows, Rtools 3.3 is required (for the `file` cmd) |
|||
- Information on how to install requirements is found in `INSTALL` & `README.md` |
|||
Update per Dr Ripley note re: Solaris |
|||
Removed legitimate tests causing previous CRAN update submission issue. |
|||
|
|||
|
@ -1,5 +0,0 @@ |
|||
public class test { |
|||
public static void main(String[] args) { |
|||
System.out.println("this is a test java source file"); |
|||
} |
|||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,80 @@ |
|||
library(wand) |
|||
|
|||
list( |
|||
actions.csv = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
actions.txt = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
actions.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
test_128_44_jstereo.mp3 = "audio/mp3", |
|||
test_excel_2000.xls = "application/msword", |
|||
test_excel_spreadsheet.xml = "application/xml", |
|||
test_excel_web_archive.mht = "message/rfc822", |
|||
test_excel.xlsm = "application/zip", |
|||
test_excel.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
test_nocompress.tif = "image/tiff", |
|||
test_powerpoint.pptm = "application/zip", |
|||
test_powerpoint.pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation", |
|||
test_word_2000.doc = "application/msword", |
|||
test_word_6.0_95.doc = "application/msword", |
|||
test_word.docm = "application/zip", |
|||
test_word.docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
|||
test.au = "audio/basic", |
|||
test.bin = c( |
|||
"application/mac-binary", |
|||
"application/macbinary", "application/octet-stream", "application/x-binary", |
|||
"application/x-macbinary" |
|||
), test.bmp = "image/bmp", |
|||
test.dtd = "application/xml-dtd", |
|||
test.emf = "application/x-msmetafile", |
|||
test.eps = "application/postscript", |
|||
test.fli = c("video/flc", "video/fli", "video/x-fli"), |
|||
test.gif = "image/gif", |
|||
test.ico = "image/x-icon", |
|||
test.jpg = "image/jpeg", |
|||
test.mp3 = "audio/mp3", |
|||
test.odt = "application/vnd.oasis.opendocument.text", |
|||
test.ogg = c( |
|||
"application/ogg", |
|||
"audio/ogg" |
|||
), test.pcx = c("image/pcx", "image/x-pcx"), |
|||
test.pdf = "application/pdf", |
|||
test.pl = c("text/plain", "text/x-perl", "text/x-script.perl"), |
|||
test.png = "image/png", |
|||
test.pnm = c( |
|||
"application/x-portable-anymap", |
|||
"image/x-portable-anymap" |
|||
), test.ppm = "image/x-portable-pixmap", |
|||
test.ppt = "application/msword", |
|||
test.ps = "application/postscript", |
|||
test.psd = "image/photoshop", |
|||
test.py = c( |
|||
"text/x-python", |
|||
"text/x-script.phyton" |
|||
), test.rtf = c( |
|||
"application/rtf", |
|||
"application/x-rtf", "text/richtext", "text/rtf" |
|||
), test.sh = c( |
|||
"application/x-bsh", |
|||
"application/x-sh", "application/x-shar", "text/x-script.sh", |
|||
"text/x-sh" |
|||
), test.tar = "application/tar", |
|||
test.tar.gz = c( |
|||
"application/octet-stream", |
|||
"application/x-compressed", "application/x-gzip" |
|||
), test.tga = "image/x-tga", |
|||
test.txt = "text/plain", |
|||
test.txt.gz = c( |
|||
"application/octet-stream", |
|||
"application/x-compressed", "application/x-gzip" |
|||
), test.wav = "audio/x-wav", |
|||
test.wmf = c("application/x-msmetafile", "windows/metafile"), |
|||
test.xcf = "application/x-xcf", |
|||
test.xml = "application/xml", |
|||
test.xpm = c("image/x-xbitmap", "image/x-xpixmap", "image/xpm"), |
|||
test.zip = "application/zip" |
|||
) -> results |
|||
|
|||
fils <- list.files(system.file("extdat", package="wand"), full.names=TRUE) |
|||
tst <- lapply(fils, get_content_type) |
|||
names(tst) <- basename(fils) |
|||
|
|||
for(n in names(tst)) expect_identical(results[[n]], tst[[n]]) |
@ -1,2 +0,0 @@ |
|||
library(testthat) |
|||
test_check("wand") |
@ -1,90 +0,0 @@ |
|||
context("File types are recognized properly") |
|||
test_that("Basic file tests work", { |
|||
|
|||
list( |
|||
actions.csv = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
actions.txt = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
actions.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
test_1.2.class = "application/java-vm", |
|||
test_1.3.class = "application/java-vm", |
|||
test_1.4.class = "application/java-vm", |
|||
test_1.5.class = "application/java-vm", |
|||
test_128_44_jstereo.mp3 = "audio/mp3", |
|||
test_excel_2000.xls = "application/msword", |
|||
test_excel_spreadsheet.xml = "application/xml", |
|||
test_excel_web_archive.mht = "message/rfc822", |
|||
test_excel.xlsm = "application/zip", |
|||
test_excel.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
|||
test_nocompress.tif = "image/tiff", |
|||
test_powerpoint.pptm = "application/zip", |
|||
test_powerpoint.pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation", |
|||
test_word_2000.doc = "application/msword", |
|||
test_word_6.0_95.doc = "application/msword", |
|||
test_word.docm = "application/zip", |
|||
test_word.docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
|||
test.au = "audio/basic", |
|||
test.bin = c( |
|||
"application/mac-binary", |
|||
"application/macbinary", "application/octet-stream", "application/x-binary", |
|||
"application/x-macbinary" |
|||
), test.bmp = "image/bmp", |
|||
test.dtd = "application/xml-dtd", |
|||
test.emf = "application/x-msmetafile", |
|||
test.eps = "application/postscript", |
|||
test.fli = c("video/flc", "video/fli", "video/x-fli"), |
|||
test.gif = "image/gif", |
|||
test.ico = "image/x-icon", |
|||
test.java = c( |
|||
"text/plain", "text/x-java", |
|||
"text/x-java-source" |
|||
), test.jpg = "image/jpeg", |
|||
test.mp3 = "audio/mp3", |
|||
test.odt = "application/vnd.oasis.opendocument.text", |
|||
test.ogg = c( |
|||
"application/ogg", |
|||
"audio/ogg" |
|||
), test.pcx = c("image/pcx", "image/x-pcx"), |
|||
test.pdf = "application/pdf", |
|||
test.pl = c("text/plain", "text/x-perl", "text/x-script.perl"), |
|||
test.png = "image/png", |
|||
test.pnm = c( |
|||
"application/x-portable-anymap", |
|||
"image/x-portable-anymap" |
|||
), test.ppm = "image/x-portable-pixmap", |
|||
test.ppt = "application/msword", |
|||
test.ps = "application/postscript", |
|||
test.psd = "image/photoshop", |
|||
test.py = c( |
|||
"text/x-python", |
|||
"text/x-script.phyton" |
|||
), test.rtf = c( |
|||
"application/rtf", |
|||
"application/x-rtf", "text/richtext", "text/rtf" |
|||
), test.sh = c( |
|||
"application/x-bsh", |
|||
"application/x-sh", "application/x-shar", "text/x-script.sh", |
|||
"text/x-sh" |
|||
), test.tar = "application/tar", |
|||
test.tar.gz = c( |
|||
"application/octet-stream", |
|||
"application/x-compressed", "application/x-gzip" |
|||
), test.tga = "image/x-tga", |
|||
test.txt = "text/plain", |
|||
test.txt.gz = c( |
|||
"application/octet-stream", |
|||
"application/x-compressed", "application/x-gzip" |
|||
), test.wav = "audio/x-wav", |
|||
test.wmf = c("application/x-msmetafile", "windows/metafile"), |
|||
test.xcf = "application/x-xcf", |
|||
test.xml = "application/xml", |
|||
test.xpm = c("image/x-xbitmap", "image/x-xpixmap", "image/xpm"), |
|||
test.zip = "application/zip" |
|||
) -> results |
|||
|
|||
fils <- list.files(system.file("extdat", package="wand"), full.names=TRUE) |
|||
tst <- lapply(fils, get_content_type) |
|||
names(tst) <- basename(fils) |
|||
|
|||
for(n in names(tst)) expect_identical(results[[n]], tst[[n]]) |
|||
|
|||
}) |
@ -0,0 +1,5 @@ |
|||
|
|||
if ( requireNamespace("tinytest", quietly=TRUE) ){ |
|||
tinytest::test_package("wand") |
|||
} |
|||
|
Loading…
Reference in new issue