Browse Source

Add get_latest_verison for R

> bundler exec thor updates:check r
+---------------+-----------------+----------------+
|          Up-to-date documentations (1)           |
+---------------+-----------------+----------------+
| Documentation | Scraper version | Latest version |
+---------------+-----------------+----------------+
| R             | 4.1.0           | 4.1.0          |
+---------------+-----------------+----------------+
Cimbali 4 years ago
parent
commit
d9f92b0f92
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/docs/scrapers/r.rb

+ 5 - 0
lib/docs/scrapers/r.rb

@@ -49,5 +49,10 @@ module Docs
       doc/manual/R-lang.html
     )
 
+    def get_latest_version(opts)
+      body = fetch('https://cran.r-project.org/src/base/NEWS', opts)
+      body.match(/CHANGES IN R ([\d.]+):/)[1]
+    end
+
   end
 end