[Rubygems-developers] Gem#status?

Phil Hagelberg technomancy at gmail.com
Tue Nov 11 12:17:34 EST 2008


"Berger, Daniel" <Daniel.Berger at qwest.com> writes:

> I'd rather not get into mangling version numbers in an attempt to parse
> every arcane schema that users come up with in the wild.

Indeed; that would be foolhardy. However, we don't try to handle every
arcane schema. We handle this:

* Parts of versions with only numerical digits are treated as before.
* Version parts with letters are prerelease (e.g. 'a', 'b5', or 'RC1').
* Versions with a prerelease part in the Nth part sort less than
  versions with N-1 parts.
* Prerelease parts are sorted alphabetically using the normal Ruby
  string sorting rules.

The code to do so is very simple and well-tested.

> However, I'm not opposed in principle to the notion of a gem "status"
> that would more or less be in line with the "status" field for RAA
> downloads [...]

> Seem reasonable?

It would seem reasonable if you had proposed it before any code had been
written, but it doesn't seem reasonable to throw away what we already
have since we get the same benefits without adding a new field to the
gemspec.

I've just committed what I have. If you have any concrete objections I
would be happy to attend to them, but everyone else I've talked to has
been very glad to see this feature introduced. There is a little more
logic to be added to the SpecFetcher about when to ignore prereleases,
but other than that it should be ready.

-Phil


More information about the Rubygems-developers mailing list