lib/sass_spec/test.rb
# When running sass-spec as a gem from github very long filenames can cause
# installation issues. This checks that the paths in use will work.
When running sass-spec as a gem from github very long filenames can cause
installation issues. This checks that the paths in use will work.
When running sass - spec as a gem from github very long filenames can cause installation issues . This checks that the paths in use will work .
def assert_filename_length!(filename)
    name = relative_name = filename.to_s.sub(SassSpec::SPEC_DIR, "")
    assert false, "Filename #{name} must no more than #{256 - GEMFILE_PREFIX_LENGTH} characters long" if name.size > (256 - GEMFILE_PREFIX_LENGTH)
    if name.size <= 100 then
      prefix = ""
    else
      parts = name.split(/\//)
      newname = parts.pop
      nxt = ""
      loop do
        nxt = parts.pop
        break if newname.size + 1 + nxt.size > 100
        newname = nxt + "/" + newname
      end
      prefix = (parts + [nxt]).join "/"
      name = newname
      assert false, "base name (#{name}) of #{relative_name} must no more than 100 characters long" if name.size > 100
      assert false, "prefix (#{prefix}) of #{relative_name} must no more than #{155 - GEMFILE_PREFIX_LENGTH} characters long" if prefix.size > (155 - GEMFILE_PREFIX_LENGTH)
    end
    return nil
  end
def assert_filename_length! ( filename ) name = relative_name = filename . to_s . sub ( SassSpec :: SPEC_DIR , "" ) assert false , "Filename #{name} must no more than #{256 - GEMFILE_PREFIX_LENGTH} characters long" if name . size > ( 256 - GEMFILE_PREFIX_LENGTH ) if name . size <= 100 then prefix = "" else parts = name . split ( / \/ / ) newname = parts . pop nxt = "" loop do nxt = parts . pop break if newname . size + 1 + nxt . size > 100 newname = nxt + "/" + newname end prefix = ( parts + [ nxt ] ) . join "/" name = newname assert false , "base name (#{name}) of #{relative_name} must no more than 100 characters long" if name . size > 100 assert false , "prefix (#{prefix}) of #{relative_name} must no more than #{155 - GEMFILE_PREFIX_LENGTH} characters long" if prefix . size > ( 155 - GEMFILE_PREFIX_LENGTH ) end return nil end
When running sass-spec as a gem from github very long filenames can cause
installation issues.
When running sass - spec as a gem from github very long filenames can cause installation issues .
filename
<not_specific>