method
verify_spec
verify_spec()
public
Hide source
# File lib/rubygems/installer.rb, line 710 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\n|\r|\n/ } raise Gem::InstallError, "#{spec} has an invalid require_paths" end if spec.extensions.any?{|ext| ext =~ /\r\n|\r|\n/ } 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\n|\r|\n/ || dep.name =~ /\r\n|\r|\n/ } raise Gem::InstallError, "#{spec} has an invalid dependencies" end end