End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::SpecificationPolicy#validate_licenses
validate_licenses
lib/rubygems/specification_policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/specification_policy.rb, line 362
def validate_licenses
licenses = @specification.licenses
licenses.each do |license|
if !Gem::Licenses.match?(license)
suggestions = Gem::Licenses.suggestions(license)
message = <<-WARNING
license value '#{license}' is invalid. Use a license identifier from
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
WARNING
message += "Did you mean #{suggestions.map {|s| "'#{s}'" }.join(', ')}?\n" unless suggestions.nil?
warning(message)
end
end
warning <<-WARNING if licenses.empty?
licenses is empty, but is recommended. Use a license identifier from
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
WARNING
end
No documentation available
See also
#validate_lazy_metadata
#validate_licenses_length
#validate_authors_field
#validate_metadata
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0