[Rubygems-developers] Another plug for Simon's patch

Simon Strandgaard neoneye at adslhome.dk
Thu Apr 1 01:33:05 EST 2004


Usualy programs have different API for each major version.
Having '> 1.0.3' may also imply that a version '2.9.9' is ok, which it
probably isn't.

I guess its better to let the major ('1.x.x') field be strict to the
specified version.

How about using a option hash ?  here is some examples

require_gem(
  'log4r', 
  :major=>'= 1', 
  :minor=>nil,
  :tiny=>'% 2 == 0'
)

require_gem(
  'log4r',
  :version2_range=>'0.08-0.19'
)

require_gem(
  'log4r',
  :version2_strict=>'0.07patch3',
  :version2_strict=>'0.08'
)

require_gem(
  'log4r',
  :version3_range=>'0.4.2-6.6.6'
)

require_gem(
  'log4r',
  :version3_least=>'0.4.2'
)

--
Simon Strandgaard

On Thu, 2004-04-01 at 02:56, Richard Kilmer wrote:
> this is the best idea i've heard so far...
> 
> i don't like the implied < 2. and/or the combo...i do like the wildcard.
> 
> -rich
> 
> On Mar 31, 2004, at 7:39 PM, Jim Weirich wrote:
> 
> > How about a syntax like this ...
> >
> >   require_gem 'log4r', "1.*"
> >
> > It would match any version 1.0, 1.1, 1.5.4.3.5, etc.  But version 2.0
> > would not match.
> 
> _______________________________________________
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers



More information about the Rubygems-developers mailing list