Flowdock
method

verify_spec

Importance_0
v2_6_3 - Show latest stable - 0 notes - Class: Installer
verify_spec() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# 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
Register or log in to add new notes.