On 6/7/06, Jim Weirich <[EMAIL PROTECTED]> wrote:
> module Config
> unless Config.respond_to?(:datadir)
>
> # Return the path to the data directory associated with the given
> # package name. Normally this is just
> # "#{Config::CONFIG['datadir']}/#{package_name}", but may be
> # modified by packages like RubyGems to handle versioned data
> # directories.
> def Config.datadir(package_name)
> File.join(CONFIG['datadir'], package_name)
> end
>
> end
> end
>
> Notice that is carefully checks for an existing datadir method, so if it
> does become available natively in Ruby, this file will degrade gracefully.
>
> Thoughts?
The problem I see here is the plan to mix versioned and non-version
results from the same method when both are possible --maybe not for
Gems, but for a general solution it should. So what about two methods?
#datadir and #vdatadir. By default, i.e. no versions to speak of, they
would return the same thing. And with Gems, where there is _only_
versions, they would also return the same . But should it become
possible for Gems in the future, or for other's, they could be
differentiated.
T.
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers