method
verify_spec
v2_6_3 -
Show latest stable
- Class:
Gem::Installer
verify_spec()public
No documentation available.
# File lib/rubygems/installer.rb, line 728
def verify_spec
unless spec.name =~ Gem::Specification::VALID_NAME_PATTERN
raise Gem::InstallError, "#{spec} has an invalid name"
end
if spec.raw_require_paths.any?{|path| path =~ /\R/ }
raise Gem::InstallError, "#{spec} has an invalid require_paths"
end
if spec.extensions.any?{|ext| ext =~ /\R/ }
raise Gem::InstallError, "#{spec} has an invalid extensions"
end
unless spec.specification_version.to_s =~ /\A\d+\z/
raise Gem::InstallError, "#{spec} has an invalid specification_version"
end
if spec.dependencies.any? {|dep| dep.type =~ /\R/ || dep.name =~ /\R/ }
raise Gem::InstallError, "#{spec} has an invalid dependencies"
end
end