Skip to content

Commit 5fd4904

Browse files
committed
Added the license(s) attribute, based on feature request RF #11041
git-svn-id: svn+ssh://rubyforge.org/var/svn/rubygems/trunk@1989 3d4018f9-ac1a-0410-99e9-8a154d859a19
1 parent 1604330 commit 5fd4904

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/rubygems/specification.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ def _dump(limit)
305305
@homepage,
306306
@has_rdoc,
307307
@new_platform,
308+
@licenses
308309
]
309310
end
310311

@@ -349,6 +350,7 @@ def self._load(str)
349350
spec.instance_variable_set :@has_rdoc, array[15]
350351
spec.instance_variable_set :@new_platform, array[16]
351352
spec.instance_variable_set :@platform, array[16].to_s
353+
spec.instance_variable_set :@license, array[17]
352354
spec.instance_variable_set :@loaded, false
353355

354356
spec
@@ -1073,6 +1075,11 @@ def ruby_code(obj)
10731075

10741076
array_attribute :authors
10751077

1078+
##
1079+
# The license(s) for the library
1080+
1081+
array_attribute :licenses
1082+
10761083
##
10771084
# Files included in this gem
10781085

@@ -1129,6 +1136,11 @@ def ruby_code(obj)
11291136

11301137
attribute_alias_singular :author, :authors
11311138

1139+
##
1140+
# Singular accessor for licenses
1141+
1142+
attribute_alias_singular :license, :licenses
1143+
11321144
##
11331145
# Singular accessor for require_paths
11341146

0 commit comments

Comments
 (0)