0.01
Low commit activity in last 3 years
A long-lived project that still receives updates
Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Latest Ruby

Description

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.

Installation

gem install latest_ruby

Synopsis

I find this library useful for the pry-doc Pry plugin. Namely, for automation of generation the latest documentation for Rubies.

Usage

Let's find out the latest versions of Rubies.

# MRI 2.0
Latest.ruby.version.to_s #=> "2.0.0-p0"
# The same.
Latest.ruby20.version.to_s

# MRI 1.9
Latest.ruby19.version.to_s #=> "1.9.3-p392"

# MRI 1.8
Latest.ruby18.version.to_s #=> "1.8.7-p371"

# JRuby.
Latest.jruby.version.to_s #=> "1.7.3"

# Rubinius.
Latest.rubinius.version.to_s #=> "1.2.4"
# The same.
Latest.rbx.version.to_s

# MagLev
Latest.maglev.version.to_s #=> "1.0.0"

# MacRuby
Latest.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.

Latest.ruby.link #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz"
# The same.
Latest.ruby.link('.tar.gz') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz"

Latest.ruby.link('.tar.bz2') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2"
Latest.ruby.link('.zip') #=> "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.zip"

Limitations

OS support

Latest Ruby is a cross-platform library.

Rubies

  • 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).

Licence

The project uses Zlib licence. See LICENCE file for more information.