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_lazy_metadata
validate_lazy_metadata
lib/rubygems/specification_policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/specification_policy.rb, line 387
def validate_lazy_metadata
unless @specification.authors.grep(LAZY_PATTERN).empty?
error "#{LAZY} is not an author"
end
unless Array(@specification.email).grep(LAZY_PATTERN).empty?
error "#{LAZY} is not an email"
end
if @specification.description =~ LAZY_PATTERN
error "#{LAZY} is not a description"
end
if @specification.summary =~ LAZY_PATTERN
error "#{LAZY} is not a summary"
end
homepage = @specification.homepage
# Make sure a homepage is valid HTTP/HTTPS URI
if homepage && !homepage.empty?
require "uri"
begin
homepage_uri = URI.parse(homepage)
unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class
error "\"#{homepage}\" is not a valid HTTP URI"
end
rescue URI::InvalidURIError
error "\"#{homepage}\" is not a valid HTTP URI"
end
end
end
No documentation available
See also
#validate_authors_field
#validate_licenses
#validate_attribute_present
#validate_licenses_length
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0