[Rubygems-developers] Add a Gem::Specification#licensesattribute?

Berger, Daniel Daniel.Berger at qwest.com
Fri Jan 2 18:11:27 EST 2009


Hi, 

> -----Original Message-----
> From: rubygems-developers-bounces at rubyforge.org 
> [mailto:rubygems-developers-bounces at rubyforge.org] On Behalf 
> Of Eric Hodel
> Sent: Friday, January 02, 2009 4:00 PM
> To: rubygems-developers at rubyforge.org
> Subject: Re: [Rubygems-developers] Add a 
> Gem::Specification#licensesattribute?
> 
> On Jan 1, 2009, at 06:03 AM, Daniel Berger wrote:
> > Hi,
> >
> > Inspired by RF patch #11041, I've added a simple patch to allow
> > license(s) to be specified in the gem spec.
> >
> > --- specification.orig  2009-01-01 06:36:29.000000000 -0700
> > +++ specification.rb    2009-01-01 06:42:50.000000000 -0700
> > @@ -302,6 +302,7 @@
> >         @homepage,
> >         @has_rdoc,
> >         @new_platform,
> > +        @licenses,
> >       ]
> >     end
> >
> > @@ -346,6 +347,7 @@
> >       spec.instance_variable_set :@has_rdoc,                   
> > array[15]
> >       spec.instance_variable_set :@new_platform,               
> > array[16]
> >       spec.instance_variable_set :@platform, array[16].to_s
> > +      spec.instance_variable_set :@license,                    
> > array[17]
> >       spec.instance_variable_set :@loaded,                    false
> >
> >       spec
> 
> What's the purpose of adding them to the Marshal output?

I thought it was necessary for -d. No?
 
> Would this information be displayed in gem list -d?

I think it should if present, yes.
 
> What would be in this field, just the license name, or the full text?

Just the license name.
 
> If just the name, we should add something to #validate to 
> make sure that somebody doesn't paste in the entire GPL as 
> this could incur a heavy bandwidth cost.  If it's the full 
> text it probably shouldn't go in the Marshal output.

I agree that it should only be the name and not the full text. People
can lookup the full text on their own. I say limit it to, say, 64
characters, unless someone can think of a popular license with a longer
name. Maybe less, even, as most of the longer license names have
abbreviations.

Seem reasonable?

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the Rubygems-developers mailing list