From: Dan Rathbun on
Lars, I found where the information is in each package.

It is in the version.h file (a C source header file.)

In the some of the older precompiled packages, a copy of this file, is
placed in the #{platform} subdir of the ruby/lib/ruby/#{engine}
directory.
In newer precompiled packages, it cannot find it and it may have been
replaced with rbconfig.rb

In the source packages, the file is in the source/#{ver-patchlevel} dir
of the source archives.
The problem with them is thay are all in compressed archives (tarballs
or zips,) so you cannot read them over the net.


Here's an example of what the version.h file looks like in the 1.8.7
branch.
http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7/version.h
This example is only the latest patch as this is the svn active
development repository. (The file will change at the next revision.)

--
Posted via http://www.ruby-forum.com/.

From: Florian Aßmann on
I did in IRB

`svn ls http://svn.ruby-lang.org/repos/ruby/tags`.split.grep(/\Av\d/)
.map { |d| `svn cat http://svn.ruby-lang.org/repos/ruby/tags/#{d}version.h` }

It took a while but I had alot of information.

Am 10.08.2010 um 11:25 schrieb Lars Olsson:

> Hi,
>
> I'm writing a small utility that shows information on the currently
> running ruby environment. One part of the utility checks whether any
> gems is outdated, but I also want to check if the ruby interpreter
> itself is outdated. Getting the currently installed version is simple,
> but getting a list of released ruby versions seems a bit trickier. I'm
> mainly interested in *stable* source versions, but I don't mind if my
> utility lists development and rc versions as well.
>
> Does anyone know a good way of checking this? My first try was to use
> the ruby github mirror to fetch available tags. Then I tried using
> svn.ruby-lang.org to get the same information, but neither of those
> gave me the information I wanted in a simple way.
>
> Any suggestions on how to solve this?
>
> /lasso
>


From: Luis Lavena on
On Aug 11, 4:29 pm, Dan Rathbun <danzoi...(a)gmail.com> wrote:
> Lars, I found where the information is in each package.
>
> It is in the version.h file (a C source header file.)
>
> In the some of the older precompiled packages, a copy of this file, is
> placed in the #{platform} subdir of the ruby/lib/ruby/#{engine}
> directory.
> In newer precompiled packages, it cannot find it and it may have been
> replaced with rbconfig.rb
>

No, all versions of MRI (Matz Ruby Implementation) still stores
version information in a C header, not Ruby code.

> In the source packages, the file is in the source/#{ver-patchlevel} dir
> of the source archives.
> The problem with them is thay are all in compressed archives (tarballs
> or zips,) so you cannot read them over the net.
>

Yes, the only workaround is download, extract and find the file.

In RubyInstaller we know what we are looking for:

http://github.com/oneclick/rubyinstaller/blob/master/recipes/packager/inno.rake#L3-14
http://github.com/oneclick/rubyinstaller/blob/master/recipes/packager/inno.rake#L116

Do a Dir.glob and look for version.h

--
Luis Lavena
First  |  Prev  | 
Pages: 1 2 3
Prev: hash
Next: Problem with db:create