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

Eric Hodel drbrain at segment7.net
Fri Jan 2 17:59:31 EST 2009


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?

Would this information be displayed in gem list -d?

What would be in this field, just the license name, or the full text?

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.



More information about the Rubygems-developers mailing list