How can I determine what the current stable version of Ruby is? -


i want write ruby method 2 things:

  1. determine current stable version of ruby is. first thought response https://www.ruby-lang.org/en/downloads/ , use regex isolate phrase the current stable version [x]. there api i'm not aware of?

  2. get url download .tar.gz of release. thinking same thing, output of site url.

i'm looking advice best way go it, or direction if there's in place might use determine desired results.

ruby code fetch download page, parse current version , link url:

html = net::http.get(uri("https://www.ruby-lang.org/en/downloads/")) vers = html[/http.*ruby-(.*).tar.gz/,1] link = html[/http.*ruby-.*.tar.gz/] 

github code: ruby-stable-version.rb
shell code: ruby-stable-version


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -