[Rubygems-developers] Gem-Spec Meta Information

Mehr, Assaph (Assaph) assaph at avaya.com
Mon Jul 26 19:32:44 EDT 2004


> As for you questions about the best route to take, I'm not sure (too
early yet,
> I think...need more coffee).  You mention wanting to extract the gem
spec, which
> you can do with:

> require 'rubygems'
> Gem::manage_gem
> Gem.cache.search(/rake/, "> 0.4.0").last  # => Gem::Specification for
rake

Thanks, will look at that. I simply did:

  def initialize(gem)
    @spec = Gem::Format.from_file_by_path(gem).spec
    @meta = @spec.meta
  end

This way you can pass a gem file to the installer-builder and it will
generate
The app-install script.



More information about the Rubygems-developers mailing list