- Repository: https://github.com/kyrylo/latest_ruby
The purpose of this library is to answer a simple but capacious question: “What is the latest version of Ruby now?”. It can also be asked for the latest versions of Rubinius, JRuby, MagLev, MacRuby.
gem install latest_ruby
I find this library useful for the
pry-doc Pry plugin. Namely, for
automation of generation the latest documentation for Rubies.
Let's find out the latest versions of Rubies.
# MRI 2.0 .ruby.version.to_s #=> "2.0.0-p0" # The same. ..version.to_s # MRI 1.9 ..version.to_s #=> "1.9.3-p392" # MRI 1.8 ..version.to_s #=> "1.8.7-p371" # JRuby. ..version.to_s #=> "1.7.3" # Rubinius. ..version.to_s #=> "1.2.4" # The same. .rbx.version.to_s # MagLev ..version.to_s #=> "1.0.0" # MacRuby ..version.to_s #=> "0.12"
Latest Ruby also provides one useful (well, it's useful for me, at least) way to retrieve a download link for a Ruby.
.ruby. #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz" # The same. .ruby.('.tar.gz') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz" .ruby.('.tar.bz2') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2" .ruby.('.zip') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.zip"
Latest Ruby is a cross-platform library.
- Ruby 1.9.3 and higher
Please, ping me, if you need support for other Ruby implementations. Or, if you prefer, send a pull request. Currently, the library is unbelievably simple. Ideas and suggestions are welcome (just file issues).
The project uses Zlib licence. See LICENCE file for more information.