Could these be added to the Gems module?
# Queries useful for getting to non-lib files in a distribution.
def active?(gemname)
@loaded_specs ||= Hash.new
@loaded_specs.key? gemname
end
def gemspec(gemname)
@loaded_specs[gemname] if active?(gemname)
end
def gempath(gemname)
@loaded_specs[gemname].full_gem_path if active?(gemname)
end
def gemdir(gemname, dir)
if active?(gemname)
File.join(gempath, dir)
end
end
The offer a solution to the data/ dir problem. I.e.
DATADIR = Gem.gemdir( 'calibre', 'data/calibre/units' )
Thanks.
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers