[Rubygems-developers] Gem-Spec Meta Information

Richard Kilmer rich at infoether.com
Mon Jul 26 12:10:41 EDT 2004


One thing to note re: the generic hash approach.  In rubygems we convert
back and forth between ruby source and yaml.  We do this because when you
use a gem (with require_gem) I did not want to have to have folks load
yaml...the gemspecs are 'serialized' to ruby source and used from there.
With the generic hash, we cannot generically convert that to source.  What
we would have to do to support this is make the to_ruby serializer just
store the 'meta' hash as a here-doc string.  And add a message on the
GemSpecification object that unpacks it for you...like a 'metadata' method
that either uses the meta already there because it came from yaml, or
unpacks it if it came from ruby.

Does that make sense?

-rich


On 7/26/04 7:24 AM, "Chad Fowler" <chad at chadfowler.com> wrote:

> It's amazine, Assaph.  The last two things you've posted about are things
> that Rich and I have *just* talked about yesterday whle working on
> RubyGems here at OSCON.  Specifically in this case, we were talking about
> adding a generic "metadata" attribute to the gemspec to support a hash as
> you suggest.  We'll probably do that this week.




More information about the Rubygems-developers mailing list