Browse Source

added ISC BIND

master
boB Rudis 5 years ago
parent
commit
16426bbc9a
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 4
      DESCRIPTION
  2. 3
      NAMESPACE
  3. 3
      NEWS.md
  4. 36
      R/bind.R
  5. 2
      R/vershist-package.R
  6. 7
      README.Rmd
  7. 23
      README.md
  8. BIN
      README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.RData
  9. 0
      README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.rdb
  10. BIN
      README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.rdx
  11. 16
      man/isc_bind_version_history.Rd

4
DESCRIPTION

@ -1,8 +1,8 @@
Package: vershist
Type: Package
Title: Collect Version Histories For Vendor Products
Version: 0.2.1
Date: 2019-01-14
Version: 0.2.2
Date: 2019-01-27
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640"))

3
NAMESPACE

@ -6,6 +6,7 @@ export(complete_semver)
export(etcd_version_history)
export(google_chrome_version_history)
export(is_valid_semver)
export(isc_bind_version_history)
export(lighttpd_version_history)
export(memcached_version_history)
export(mongodb_version_history)
@ -63,6 +64,8 @@ importFrom(stringi,stri_replace_all_fixed)
importFrom(stringi,stri_replace_all_regex)
importFrom(stringi,stri_replace_first_fixed)
importFrom(stringi,stri_replace_first_regex)
importFrom(stringi,stri_replace_last_fixed)
importFrom(stringi,stri_replace_last_regex)
importFrom(stringi,stri_split_fixed)
importFrom(stringi,stri_sub)
importFrom(stringi,stri_trans_tolower)

3
NEWS.md

@ -1,3 +1,6 @@
0.2.2
* Support for ISC BIND
0.2.1
* Support for etcd

36
R/bind.R

@ -0,0 +1,36 @@
#' Retrieve ISC BIND Version Release History
#'
#' Reads <https://ftp.isc.org/isc/bind9/> to build a data frame of
#' ISC BIND version release numbers and dates. NOTE that BIND version strings
#' are ugly (despite their commitment to semantic versioning) so this function
#' returns the BIND version (`vers`), the release date (`rls_date`) and release year
#' (`rls_year`) arranged in order from lowest version to latest version and
#' the `vers` column is an ordered factor.
#'
#' @md
#' @export
isc_bind_version_history <- function() {
bind_dir <- xml2::read_html("https://ftp.isc.org/isc/bind9/")
rvest::html_nodes(bind_dir, xpath = ".//tr[contains(., '9.')]") %>%
map_df(
~data.frame(
vers = rvest::html_nodes(.x, xpath = ".//td[2]") %>% rvest::html_text(trim=TRUE),
rls_date = rvest::html_nodes(.x, xpath = ".//td[3]") %>% rvest::html_text(trim=TRUE),
stringsAsFactors = FALSE
)
) %>%
mutate(
vers = stringi::stri_replace_last_fixed(vers, "/", ""),
rls_date = as.Date(substr(rls_date, 1, 10))
) %>%
arrange(rls_date) %>%
mutate(vers = factor(vers)) %>%
mutate(rls_year = lubridate::year(rls_date)) -> bind_versions
class(bind_versions) <- c("tbl_df", "tbl", "data.frame")
bind_versions
}

2
R/vershist-package.R

@ -15,7 +15,7 @@
#' @importFrom stringi stri_replace_all_regex stri_replace_first_fixed stri_trans_tolower
#' @importFrom stringi stri_extract_first_regex stri_sub stri_replace_first_regex
#' @importFrom stringi stri_replace_all_fixed stri_split_fixed stri_count_fixed stri_trim_both
#' @importFrom stringi stri_extract_all_regex
#' @importFrom stringi stri_extract_all_regex stri_replace_last_regex stri_replace_last_fixed
#' @importFrom lubridate year mdy mdy_hms parse_date_time
#' @importFrom readr read_lines
#' @importFrom utils globalVariables

7
README.Rmd

@ -23,6 +23,7 @@ Core:
- `apple_ios_version_history`: Retrieve Apple iOS Version Release History
- `etcd_version_history`: Retrieve etcd Version Release History
- `google_chrome_version_history`: Retrieve Google Chrome Version Release History
- `isc_bind_version_history` : Retrieve ISC BIND Version Release History
- `lighttpd_version_history`: Retrieve lighttpd Version Release History
- `memcached_version_history`: Retrieve memcached Version Release History
- `mongodb_version_history`: Retrieve MongoDB Version Release History
@ -96,6 +97,12 @@ Google Chrome
google_chrome_version_history()
```
ISC BIND
```{r isc-bind, cache=TRUE}
isc_bind_version_history()
```
lighttpd
```{r lighttpd, cache=TRUE}

23
README.md

@ -21,6 +21,8 @@ Core:
- `etcd_version_history`: Retrieve etcd Version Release History
- `google_chrome_version_history`: Retrieve Google Chrome Version
Release History
- `isc_bind_version_history` : Retrieve ISC BIND Version Release
History
- `lighttpd_version_history`: Retrieve lighttpd Version Release
History
- `memcached_version_history`: Retrieve memcached Version Release
@ -168,6 +170,27 @@ google_chrome_version_history()
## 10 6.0.472 2010-09-02 2010. 6 0 472 "" ""
## # ... with 61 more rows
ISC BIND
``` r
isc_bind_version_history()
```
## # A tibble: 567 x 3
## vers rls_date rls_year
## <fct> <date> <dbl>
## 1 9.0.0 2004-01-28 2004
## 2 9.0.0b1 2004-01-28 2004
## 3 9.0.0b2 2004-01-28 2004
## 4 9.0.0b3 2004-01-28 2004
## 5 9.0.0b4 2004-01-28 2004
## 6 9.0.0b5 2004-01-28 2004
## 7 9.0.0rc1 2004-01-28 2004
## 8 9.0.0rc2 2004-01-28 2004
## 9 9.0.0rc3 2004-01-28 2004
## 10 9.0.0rc4 2004-01-28 2004
## # … with 557 more rows
lighttpd
``` r

BIN
README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.RData

Binary file not shown.

0
README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.rdb

BIN
README_cache/gfm/isc-bind_bbbd7faa203789aad5251a1ae4a5b97c.rdx

Binary file not shown.

16
man/isc_bind_version_history.Rd

@ -0,0 +1,16 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bind.R
\name{isc_bind_version_history}
\alias{isc_bind_version_history}
\title{Retrieve ISC BIND Version Release History}
\usage{
isc_bind_version_history()
}
\description{
Reads \url{https://ftp.isc.org/isc/bind9/} to build a data frame of
ISC BIND version release numbers and dates. NOTE that BIND version strings
are ugly (despite their commitment to semantic versioning) so this function
returns the BIND version (\code{vers}), the release date (\code{rls_date}) and release year
(\code{rls_year}) arranged in order from lowest version to latest version and
the \code{vers} column is an ordered factor.
}
Loading…
Cancel
Save