1
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
d9f92b0f92

+ 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