Maintenance Ruby 3.4 gets fixes, but no new features. 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.4.1/lib/rubygems/specification_policy.rb, line 429
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 LAZY_PATTERN.match?(@specification.description)
error "#{LAZY} is not a description"
end
if LAZY_PATTERN.match?(@specification.summary)
error "#{LAZY} is not a summary"
end
homepage = @specification.homepage
# Make sure a homepage is valid HTTP/HTTPS URI
if homepage && !homepage.empty?
require_relative "vendor/uri/lib/uri"
begin
homepage_uri = Gem::URI.parse(homepage)
unless [Gem::URI::HTTP, Gem::URI::HTTPS].member? homepage_uri.class
error "\"#{homepage}\" is not a valid HTTP URI"
end
rescue Gem::URI::InvalidURIError
error "\"#{homepage}\" is not a valid HTTP URI"
end
end
end
No documentation available
See also
#validate_for_resolution
#validate_licenses
#validate_authors_field
#validate_licenses_length
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0