Patches item #27987, was opened at 2010-03-18 22:29
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27987&group_id=126

Category: other
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Magnus Holm (judofyr)
Assigned to: Nobody (None)
Summary: Add metadata-attribute to Gem::Specification

Initial Comment:
I'm currently working on a gemspec editor (Gemify) which attempts to make it 
easier to update your gemspec. One of the feature is that you can specify a 
manifest (use files checked in in a VCS; use a MANIFEST file etc.) and when you 
run `gemify -b` it will update the files attribute.

Since I want to keep all the information inside the gemspec I simply append 
this line to #to_ruby: Gemify.last_specification.manifest = %q{manifest-type} 
if defined?(Gemify)

This works, both for Gemify and when other library loads the gemspec. However, 
if someone calls #to_ruby on the loaded gemspec, the information is lost.

By providing a metadata-attribute (a hash) we can make it possible for tools 
that works with gemspec to (a) store information not (yet) supported by 
RubyGems and (b) ensure that the information is preserved when other tools 
loads/writes it.

It's a tiny patch with no test. Please let me know if you need a test in order 
to commit, and I'll write one (but I suspect the tests for #attribute should be 
enough). 

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=577&aid=27987&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to