repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/formatters/html_pygments.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/formatters/html_pygments.rb | # frozen_string_literal: true
module Rouge
module Formatters
class HTMLPygments < Formatter
def initialize(inner, css_class='codehilite')
@inner = inner
@css_class = css_class
end
def stream(tokens, &b)
yield %(<div class="highlight"><pre class="#{@css_class}"><code>)
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/formatters/html.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/formatters/html.rb | # -*- coding: utf-8 -*- #
# frozen_string_literal: true
module Rouge
module Formatters
# Transforms a token stream into HTML output.
class HTML < Formatter
tag 'html'
# @yield the html output.
def stream(tokens, &b)
tokens.each { |tok, val| yield span(tok, val) }
end
d... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/source.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/source.rb | # frozen_string_literal: true
module Rouge
module Guessers
class Source < Guesser
include Util
attr_reader :source
def initialize(source)
@source = source
end
def filter(lexers)
# don't bother reading the input if
# we've already filtered to 1
retur... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/disambiguation.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/disambiguation.rb | # frozen_string_literal: true
module Rouge
module Guessers
class Disambiguation < Guesser
include Util
include Lexers
def initialize(filename, source)
@filename = File.basename(filename)
@source = source
end
def filter(lexers)
return lexers if lexers.size =... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/mimetype.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/mimetype.rb | # frozen_string_literal: true
module Rouge
module Guessers
class Mimetype < Guesser
attr_reader :mimetype
def initialize(mimetype)
@mimetype = mimetype
end
def filter(lexers)
lexers.select { |lexer| lexer.mimetypes.include? @mimetype }
end
end
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/glob_mapping.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/glob_mapping.rb | # frozen_string_literal: true
module Rouge
module Guessers
# This class allows for custom behavior
# with glob -> lexer name mappings
class GlobMapping < Guesser
include Util
def self.by_pairs(mapping, filename)
glob_map = {}
mapping.each do |(glob, lexer_name)|
lex... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/modeline.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/modeline.rb | # frozen_string_literal: true
module Rouge
module Guessers
class Modeline < Guesser
include Util
# [jneen] regexen stolen from linguist
EMACS_MODELINE = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i
#... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/filename.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/filename.rb | # frozen_string_literal: true
module Rouge
module Guessers
class Filename < Guesser
attr_reader :fname
def initialize(filename)
@filename = filename
end
# returns a list of lexers that match the given filename with
# equal specificity (i.e. number of wildcards in the patter... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/util.rb | _vendor/ruby/2.6.0/gems/rouge-3.3.0/lib/rouge/guessers/util.rb | # frozen_string_literal: true
module Rouge
module Guessers
module Util
module SourceNormalizer
UTF8_BOM = "\xEF\xBB\xBF"
UTF8_BOM_RE = /\A#{UTF8_BOM}/
# @param [String,nil] source
# @return [String,nil]
def self.normalize(source)
source.sub(UTF8_BOM_RE, ''... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/getlogin.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/getlogin.rb | require 'rubygems'
require 'ffi'
module Foo
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :getlogin, [ ], :string
end
puts "getlogin=#{Foo.getlogin}"
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/hello.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/hello.rb | require File.expand_path(File.join(File.dirname(__FILE__), "sample_helper"))
module Foo
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function("cputs", "puts", [ :string ], :int)
end
Foo.cputs("Hello, World via libc puts using FFI on MRI ruby")
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/qsort.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/qsort.rb | require 'rubygems'
require 'ffi'
module LibC
extend FFI::Library
ffi_lib FFI::Library::LIBC
callback :qsort_cmp, [ :pointer, :pointer ], :int
attach_function :qsort, [ :pointer, :ulong, :ulong, :qsort_cmp ], :int
end
p = FFI::MemoryPointer.new(:int, 2)
p.put_array_of_int32(0, [ 2, 1 ])
puts "ptr=#{p.inspect}"... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/sample_helper.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/sample_helper.rb | require 'rubygems'
require 'spec'
$:.unshift File.join(File.dirname(__FILE__), "..", "lib"), File.join(File.dirname(__FILE__), "..", "build", RUBY_VERSION) unless RUBY_PLATFORM =~ /java/
require "ffi"
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/getpid.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/getpid.rb | require 'rubygems'
require 'ffi'
module Foo
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :getpid, [ ], :int
end
puts "My pid=#{Foo.getpid}"
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/pty.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/pty.rb | require 'ffi'
module PTY
private
module LibC
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :forkpty, [ :buffer_out, :buffer_out, :buffer_in, :buffer_in ], :int
attach_function :openpty, [ :buffer_out, :buffer_out, :buffer_out, :buffer_in, :buffer_in ], :int
attach_function :lo... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/inotify.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/inotify.rb | require 'rubygems'
require 'ffi'
module Inotify
extend FFI::Library
ffi_lib FFI::Library::LIBC
class Event < FFI::Struct
layout \
:wd, :int,
:mask, :uint,
:cookie, :uint,
:len, :uint
end
attach_function :init, :inotify_init, [ ], :int
attach_function :add_watch, :inotify_add_watc... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/gettimeofday.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/samples/gettimeofday.rb | require 'rubygems'
require 'ffi'
class Timeval < FFI::Struct
rb_maj, rb_min, rb_micro = RUBY_VERSION.split('.')
if rb_maj.to_i >= 1 && rb_min.to_i >= 9 || RUBY_PLATFORM =~ /java/
layout :tv_sec => :ulong, :tv_usec => :ulong
else
layout :tv_sec, :ulong, 0, :tv_usec, :ulong, 4
end
end
module LibC
extend... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/ext/ffi_c/extconf.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/ext/ffi_c/extconf.rb | #!/usr/bin/env ruby
if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
require 'mkmf'
require 'rbconfig'
dir_config("ffi_c")
# recent versions of ruby add restrictive ansi and warning flags on a whim - kill them all
$warnflags = ''
$CFLAGS.gsub!(/[\s+]-ansi/, '')
$CFLAGS.gsub!(/[... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi.rb | if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
Object.send(:remove_const, :FFI) if defined?(::FFI)
begin
require RUBY_VERSION.split('.')[0, 2].join('.') + '/ffi_c'
rescue Exception
require 'ffi_c'
end
require 'ffi/ffi'
elsif defined?(RUBY_ENGINE)
# Remove the ffi gem di... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/platform.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/platform.rb | #
# Copyright (C) 2008, 2009 Wayne Meissner
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyrigh... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/io.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/io.rb | #
# Copyright (C) 2008, 2009 Wayne Meissner
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyrigh... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/callback.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/callback.rb | #
# All the code from this file is now implemented in C. This file remains
# to satisfy any leftover require 'ffi/callback' in user code
#
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/errno.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/errno.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/library.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/library.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/version.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/version.rb | module FFI
VERSION = '1.9.25'
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/autopointer.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/autopointer.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
# Copyright (C) 2008 Mike Dalessio
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source c... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/struct.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/struct.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
# Copyright (C) 2008, 2009 Andrea Fazzi
# Copyright (C) 2008, 2009 Luc Heinrich
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditio... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/struct_layout_builder.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/struct_layout_builder.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/pointer.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/pointer.rb | #
# Copyright (C) 2008, 2009 Wayne Meissner
# Copyright (c) 2007, 2008 Evan Phoenix
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of so... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/union.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/union.rb | #
# Copyright (C) 2009 Andrea Fazzi <andrea.fazzi@alcacoop.it>
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/ffi.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/ffi.rb | #
# Copyright (C) 2008-2010 JRuby project
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/types.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/types.rb | #
# Copyright (C) 2008-2010 Wayne Meissner
# Copyright (c) 2007, 2008 Evan Phoenix
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of sou... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/enum.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/enum.rb | #
# Copyright (C) 2009, 2010 Wayne Meissner
# Copyright (C) 2009 Luc Heinrich
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source c... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/memorypointer.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/memorypointer.rb | # This class is now implemented in C
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/variadic.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/variadic.rb | #
# Copyright (C) 2008, 2009 Wayne Meissner
# Copyright (C) 2009 Luc Heinrich
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source c... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/buffer.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/buffer.rb | #
# All the code from this file is now implemented in C. This file remains
# to satisfy any leftover require 'ffi/buffer' in user code
#
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/managedstruct.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/managedstruct.rb | # Copyright (C) 2008 Mike Dalessio
#
# This file is part of ruby-ffi.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/struct_generator.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/struct_generator.rb | require 'tempfile'
module FFI
##
# Generates an FFI Struct layout.
#
# Given the @@@ portion in:
#
# module Zlib::ZStream < FFI::Struct
# @@@
# name "struct z_stream_s"
# include "zlib.h"
#
# field :next_in, :pointer
# field :avail_in, :uint
# field :total_in,... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/types_generator.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/types_generator.rb | require 'tempfile'
module FFI
# @private
class TypesGenerator
##
# Maps different C types to the C type representations we use
TYPE_MAP = {
"char" => :char,
"signed char" => :char,
"__signed char" => :char,
"unsigned char" => :uchar,
"short" => ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/const_generator.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/const_generator.rb | require 'tempfile'
require 'open3'
module FFI
# ConstGenerator turns C constants into ruby values.
#
# @example a simple example for stdio
# cg = FFI::ConstGenerator.new('stdio') do |gen|
# gen.const(:SEEK_SET)
# gen.const('SEEK_CUR')
# gen.const('seek_end') # this constant does not exist
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/generator.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/generator.rb | module FFI
# @private
class Generator
def initialize(ffi_name, rb_name, options = {})
@ffi_name = ffi_name
@rb_name = rb_name
@options = options
@name = File.basename rb_name, '.rb'
file = File.read @ffi_name
new_file = file.gsub(/^( *)@@@(.*?)@@@/m) do
@constants... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb | _vendor/ruby/2.6.0/gems/ffi-1.9.25/lib/ffi/tools/generator_task.rb | begin
require 'ffi/struct_generator'
require 'ffi/const_generator'
require 'ffi/generator'
rescue LoadError
# from Rakefile
require 'lib/ffi/struct_generator'
require 'lib/ffi/const_generator'
require 'lib/ffi/generator'
end
require 'rake'
require 'rake/tasklib'
require 'tempfile'
##
# Rake task that ca... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/ext/rakefile.rb | _vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/ext/rakefile.rb | # -*- encoding: utf-8 -*-
require 'rubygems' unless defined?(Gem)
require 'pathname'
require 'date'
require 'time'
require 'rake/clean'
raise "unable to find xcodebuild" unless system('which', 'xcodebuild')
FSEVENT_WATCH_EXE_VERSION = '0.1.5'
$this_dir = Pathname.new(__FILE__).dirname.expand_path
$final_exe = $this... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/otnetstring.rb | _vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/otnetstring.rb | # Copyright (c) 2011 Konstantin Haase
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, di... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent.rb | _vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent.rb | # -*- encoding: utf-8 -*-
require 'rb-fsevent/fsevent'
require 'rb-fsevent/version'
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent/version.rb | _vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent/version.rb | # -*- encoding: utf-8 -*-
class FSEvent
VERSION = '0.10.3'
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent/fsevent.rb | _vendor/ruby/2.6.0/gems/rb-fsevent-0.10.3/lib/rb-fsevent/fsevent.rb | # -*- encoding: utf-8 -*-
require 'otnetstring'
class FSEvent
class << self
class_eval <<-END
def root_path
"#{File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))}"
end
END
class_eval <<-END
def watcher_path
"#{File.join(FSEvent.root_path, 'bin', 'fsevent_wa... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/init.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/init.rb | begin
require File.join(File.dirname(__FILE__), 'lib', 'sass') # From here
rescue LoadError
begin
require 'sass' # From gem
rescue LoadError => e
# gems:install may be run to install Haml with the skeleton plugin
# but not the gem itself installed.
# Don't die if this is the case.
raise e unle... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/rails/init.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/rails/init.rb | Kernel.load File.join(File.dirname(__FILE__), '..', 'init.rb')
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/test_helper.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/test_helper.rb | lib_dir = File.dirname(__FILE__) + '/../lib'
require 'minitest/autorun'
require 'fileutils'
$:.unshift lib_dir unless $:.include?(lib_dir)
require 'sass'
require 'mathn' if ENV['MATHN'] == 'true'
Sass::RAILS_LOADED = true unless defined?(Sass::RAILS_LOADED)
Sass.tests_running = true
if defined?(Encoding)
$-w, w =... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/logger_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/logger_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require 'pathname'
class LoggerTest < MiniTest::Test
class InterceptedLogger < Sass::Logger::Base
attr_accessor :messages
def initialize(*args)
super
self.messages = []
end
def reset!
self.messages = []
end
def _log(*ar... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/compiler_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/compiler_test.rb | require 'minitest/autorun'
require File.dirname(__FILE__) + '/../test_helper'
require 'sass/plugin'
require 'sass/plugin/compiler'
class CompilerTest < MiniTest::Test
class FakeListener
attr_accessor :options
attr_accessor :directories
attr_reader :start_called
attr_reader :thread
def initialize... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/functions_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/functions_test.rb | require 'minitest/autorun'
require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'sass/script'
require 'mock_importer'
module Sass::Script::Functions
def no_kw_args
Sass::Script::Value::String.new("no-kw-args")
end
def only_var_args(*args)
Sass::Scrip... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/encoding_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/encoding_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'sass/util/test'
class EncodingTest < MiniTest::Test
include Sass::Util::Test
def test_encoding_error
render("foo\nbar\nb\xFEaz".force_encoding("utf-8"))
assert(false, "Expect... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/mock_importer.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/mock_importer.rb | class MockImporter < Sass::Importers::Base
def initialize(name = "mock")
@name = name
@imports = Hash.new({})
end
def find_relative(uri, base, options)
nil
end
def find(uri, options)
contents = @imports[uri][:contents]
return unless contents
options[:syntax] = @imports[uri][:syntax]
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/importer_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/importer_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'mock_importer'
require 'sass/plugin'
class ImporterTest < MiniTest::Test
class FruitImporter < Sass::Importers::Base
def find(name, context = nil)
fruit = parse(name)
return unless fruit
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/source_map_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/source_map_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
class SourcemapTest < MiniTest::Test
def test_to_json_requires_args
_, sourcemap = render_with_sourcemap('')
assert_raises(ArgumentError) {sourcemap.to_json({})}
assert_raises(Argume... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/extend_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/extend_test.rb | require File.dirname(__FILE__) + '/../test_helper'
class ExtendTest < MiniTest::Test
def test_basic
assert_equal <<CSS, render(<<SCSS)
.foo, .bar {
a: b; }
CSS
.foo {a: b}
.bar {@extend .foo}
SCSS
assert_equal <<CSS, render(<<SCSS)
.foo, .bar {
a: b; }
CSS
.bar {@extend .foo}
.foo {a: b}
SCSS
asser... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/plugin_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/plugin_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'sass/plugin'
require 'fileutils'
module Sass::Script::Functions
def filename
filename = options[:filename].gsub(%r{.*((/[^/]+){4})}, '\1')
Sass::Script::Value::String.new(filename)
end
def whateve... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/superselector_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/superselector_test.rb | require File.dirname(__FILE__) + '/../test_helper'
class SuperselectorTest < MiniTest::Test
def test_superselector_reflexivity
assert_superselector 'h1', 'h1'
assert_superselector '.foo', '.foo'
assert_superselector '#foo > .bar, baz', '#foo > .bar, baz'
end
def test_smaller_compound_superselector
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/script_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/script_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
require 'sass/engine'
module Sass::Script::Functions::UserFunctions
def assert_options(val)
val.options[:foo]
Sass::Script::Value::String.new("Options defined!")
end
def arg_error
assert_options
end
end
module Sass::Script... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/test_helper.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/test_helper.rb | test_dir = File.dirname(__FILE__)
$:.unshift test_dir unless $:.include?(test_dir)
class MiniTest::Test
def absolutize(file)
File.expand_path("#{File.dirname(__FILE__)}/#{file}")
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/script_conversion_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/script_conversion_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
require 'sass/engine'
class SassScriptConversionTest < MiniTest::Test
def test_bool
assert_renders "true"
assert_renders "false"
end
def test_color
assert_renders "#abcdef"
assert_renders "blue"
assert_renders "rgba(0... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require 'pathname'
require 'tmpdir'
class UtilTest < MiniTest::Test
include Sass::Util
def test_scope
assert(File.exist?(scope("Rakefile")))
end
def test_map_keys
assert_equal({
"foo" => 1,
"bar" => 2,
"baz" => 3
}, map_... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/css2sass_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/css2sass_test.rb | require 'minitest/autorun'
require File.dirname(__FILE__) + '/../test_helper'
require 'sass/css'
class CSS2SassTest < MiniTest::Test
def test_basic
css = <<CSS
h1 {
color: red;
}
CSS
assert_equal(<<SASS, css2sass(css))
h1
color: red
SASS
silence_warnings {assert_equal(<<SASS, css2sass(css, :old => tr... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/value_helpers_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/value_helpers_test.rb | require File.dirname(__FILE__) + '/../test_helper'
class ValueHelpersTest < MiniTest::Test
include Sass::Script
include Sass::Script::Value::Helpers
def test_bool
assert_same Value::Bool::TRUE, bool(true)
assert_same Value::Bool::FALSE, bool(false)
assert_same Value::Bool::FALSE, bool(nil)
asser... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/css_variable_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/css_variable_test.rb |
require File.dirname(__FILE__) + '/../test_helper'
require 'sass/engine'
# Most CSS variable tests are in sass-spec, but a few relate to formatting or
# conversion and so belong here.
class CssVariableTest < MiniTest::Test
def test_folded_inline_whitespace
assert_variable_value "foo bar baz", "foo bar ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/engine_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/engine_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'sass/engine'
require 'stringio'
require 'mock_importer'
require 'pathname'
module Sass::Script::Functions::UserFunctions
def option(name)
Sass::Script::Value::String.new(@options[na... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/exec_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/exec_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require 'fileutils'
require 'sass/util/test'
require 'tmpdir'
class ExecTest < MiniTest::Test
include Sass::Util::Test
def setup
@dir = Dir.mktmpdir
end
def teardown
FileUtils.rm_rf(@dir)
clean_up_sassc
end
def test_scss_t_expanded
src =... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/conversion_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/conversion_test.rb | require File.dirname(__FILE__) + '/../test_helper'
class ConversionTest < MiniTest::Test
def test_basic
assert_converts <<SASS, <<SCSS
foo bar
baz: bang
bip: bop
SASS
foo bar {
baz: bang;
bip: bop;
}
SCSS
silence_warnings {assert_converts <<SASS, <<SCSS, options: {old: true}}
foo bar
:baz bang
:b... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/callbacks_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/callbacks_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require 'sass/callbacks'
class CallerBack
extend Sass::Callbacks
define_callback :foo
define_callback :bar
def do_foo
run_foo
end
def do_bar
run_bar 12
end
end
module ClassLevelCallerBack
extend Sass::Callbacks
define_callback :foo
exten... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/cache_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/cache_test.rb | require File.dirname(__FILE__) + '/../test_helper'
require File.dirname(__FILE__) + '/test_helper'
require 'sass/engine'
class CacheTest < MiniTest::Test
@@cache_dir = "tmp/file_cache"
def setup
FileUtils.mkdir_p @@cache_dir
end
def teardown
FileUtils.rm_rf @@cache_dir
clean_up_sassc
end
def... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/normalized_map_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/normalized_map_test.rb | require File.dirname(__FILE__) + '/../../test_helper'
require 'sass/util/normalized_map'
class NormalizedMapTest < MiniTest::Test
extend PublicApiLinter
lint_api Hash, Sass::Util::NormalizedMap
def lint_instance
Sass::Util::NormalizedMap.new
end
def test_normalized_map_errors_unless_explicitly_impleme... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/multibyte_string_scanner_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/multibyte_string_scanner_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../../test_helper'
class MultibyteStringScannerTest < MiniTest::Test
def setup
@scanner = Sass::Util::MultibyteStringScanner.new("cölorfül")
end
def test_initial
assert_scanner_state 0, 0, nil, nil
end
def test_check
assert_equal 'cö', ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/subset_map_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/util/subset_map_test.rb | require File.dirname(__FILE__) + '/../../test_helper'
class SubsetMapTest < MiniTest::Test
def setup
@ssm = Sass::Util::SubsetMap.new
@ssm[Set[1, 2]] = "Foo"
@ssm[Set["fizz", "fazz"]] = "Bar"
@ssm[Set[:foo, :bar]] = "Baz"
@ssm[Set[:foo, :bar, :baz]] = "Bang"
@ssm[Set[:bip, :bop, :blip]] = "... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/test_helper.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/test_helper.rb | require File.dirname(__FILE__) + '/../../test_helper'
require 'sass/engine'
module ScssTestHelper
def assert_parses(scss)
assert_equal scss.rstrip, render(scss).rstrip
end
def assert_not_parses(expected, scss)
raise "Template must include <err> where an error is expected" unless scss.include?("<err>")
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/css_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/css_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/test_helper'
require 'sass/scss/css_parser'
# These tests just test the parsing of CSS
# (both standard and any hacks we intend to support).
# Tests of SCSS-specific behavior go in scss_test.rb.
class ScssCssTest < MiniTest::Test
include ScssTestHelper
de... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/rx_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/rx_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/../../test_helper'
require 'sass/engine'
class ScssRxTest < MiniTest::Test
include Sass::SCSS::RX
def test_identifiers
assert_match IDENT, "foo"
assert_match IDENT, "\xC3\xBFoo" # Initial char can be nonascii
assert_match IDENT, "\\123abcoo" #... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/scss_test.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/test/sass/scss/scss_test.rb | # -*- coding: utf-8 -*-
require File.dirname(__FILE__) + '/test_helper'
class ScssTest < MiniTest::Test
include ScssTestHelper
## One-Line Comments
def test_one_line_comments
assert_equal <<CSS, render(<<SCSS)
.foo {
baz: bang; }
CSS
.foo {// bar: baz;}
baz: bang; //}
}
SCSS
assert_equal <<CSS, ren... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/extra/update_watch.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/extra/update_watch.rb | require 'rubygems'
require 'sinatra'
require 'json'
set :port, 3124
set :environment, :production
enable :lock
Dir.chdir(File.dirname(__FILE__) + "/..")
post "/" do
puts "Received payload!"
puts "Rev: #{`git name-rev HEAD`.strip}"
system %{rake handle_update --trace REF=#{JSON.parse(params["payload"])["ref"].ins... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass.rb | dir = File.dirname(__FILE__)
$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
require 'sass/version'
# The module that contains everything Sass-related:
#
# * {Sass::Engine} is the class used to render Sass/SCSS within Ruby code.
# * {Sass::Plugin} is interfaces with web frameworks (Rails and Merb in particular... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/selector.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/selector.rb | require 'sass/selector/simple'
require 'sass/selector/abstract_sequence'
require 'sass/selector/comma_sequence'
require 'sass/selector/pseudo'
require 'sass/selector/sequence'
require 'sass/selector/simple_sequence'
module Sass
# A namespace for nodes in the parse tree for selectors.
#
# {CommaSequence} is the t... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/script.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/script.rb | require 'sass/scss/rx'
module Sass
# SassScript is code that's embedded in Sass documents
# to allow for property values to be computed from variables.
#
# This module contains code that handles the parsing and evaluation of SassScript.
module Script
# The regular expression used to parse variables.
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/deprecation.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/deprecation.rb | module Sass
# A deprecation warning that should only be printed once for a given line in a
# given file.
#
# A global Deprecation instance should be created for each type of deprecation
# warning, and `warn` should be called each time a warning is needed.
class Deprecation
@@allow_double_warnings = fals... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/version.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/version.rb | require 'date'
require 'sass/util'
module Sass
# Handles Sass version-reporting.
# Sass not only reports the standard three version numbers,
# but its Git revision hash as well,
# if it was installed from Git.
module Version
# Returns a hash representing the version of Sass.
# The `:major`, `:minor`,... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/media.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/media.rb | # A namespace for the `@media` query parse tree.
module Sass::Media
# A comma-separated list of queries.
#
# media_query [ ',' S* media_query ]*
class QueryList
# The queries contained in this list.
#
# @return [Array<Query>]
attr_accessor :queries
# @param queries [Array<Query>] See \{... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/css.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/css.rb | require File.dirname(__FILE__) + '/../sass'
require 'sass/tree/node'
require 'sass/scss/css_parser'
module Sass
# This class converts CSS documents into Sass or SCSS templates.
# It works by parsing the CSS document into a {Sass::Tree} structure,
# and then applying various transformations to the structure
# t... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/environment.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/environment.rb | require 'set'
module Sass
# The abstract base class for lexical environments for SassScript.
class BaseEnvironment
class << self
# Note: when updating this,
# update sass/yard/inherited_hash.rb as well.
def inherited_hash_accessor(name)
inherited_hash_reader(name)
inherited_ha... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/logger.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/logger.rb | module Sass::Logger; end
require "sass/logger/log_level"
require "sass/logger/base"
require "sass/logger/delayed"
module Sass
class << self
def logger=(l)
Thread.current[:sass_logger] = l
end
def logger
Thread.current[:sass_logger] ||= Sass::Logger::Base.new
end
end
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/supports.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/supports.rb | # A namespace for the `@supports` condition parse tree.
module Sass::Supports
# The abstract superclass of all Supports conditions.
class Condition
# Runs the SassScript in the supports condition.
#
# @param environment [Sass::Environment] The environment in which to run the script.
def perform(envi... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/plugin.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/plugin.rb | require 'fileutils'
require 'sass'
require 'sass/plugin/compiler'
module Sass
# This module provides a single interface to the compilation of Sass/SCSS files
# for an application. It provides global options and checks whether CSS files
# need to be updated.
#
# This module is used as the primary interface w... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/callbacks.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/callbacks.rb | module Sass
# A lightweight infrastructure for defining and running callbacks.
# Callbacks are defined using \{#define\_callback\} at the class level,
# and called using `run_#{name}` at the instance level.
#
# Clients can add callbacks by calling the generated `on_#{name}` method,
# and passing in a block ... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/repl.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/repl.rb | require 'readline'
module Sass
# Runs a SassScript read-eval-print loop.
# It presents a prompt on the terminal,
# reads in SassScript expressions,
# evaluates them,
# and prints the result.
class Repl
# @param options [{Symbol => Object}] An options hash.
def initialize(options = {})
@option... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/stack.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/stack.rb | module Sass
# A class representing the stack when compiling a Sass file.
class Stack
# TODO: use this to generate stack information for Sass::SyntaxErrors.
# A single stack frame.
class Frame
# The filename of the file in which this stack frame was created.
#
# @return [String]
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/importers.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/importers.rb | module Sass
# Sass importers are in charge of taking paths passed to `@import`
# and finding the appropriate Sass code for those paths.
# By default, this code is always loaded from the filesystem,
# but importers could be added to load from a database or over HTTP.
#
# Each importer is in charge of a singl... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/exec.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/exec.rb | module Sass
# This module handles the Sass executables (`sass` and `sass-convert`).
module Exec
end
end
require 'sass/exec/base'
require 'sass/exec/sass_scss'
require 'sass/exec/sass_convert'
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/railtie.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/railtie.rb | # Rails 3.0.0.beta.2+, < 3.1
if defined?(ActiveSupport) && ActiveSupport.public_methods.include?(:on_load) &&
!Sass::Util.ap_geq?('3.1.0.beta')
require 'sass/plugin/configuration'
ActiveSupport.on_load(:before_configuration) do
require 'sass'
require 'sass/plugin'
require 'sass/plugin/rails'
end
e... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/root.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/root.rb | module Sass
# The root directory of the Sass source tree.
# This may be overridden by the package manager
# if the lib directory is separated from the main source tree.
# @api public
ROOT_DIR = File.expand_path(File.join(__FILE__, "../../.."))
end
| ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/scss.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/scss.rb | require 'sass/scss/rx'
require 'sass/scss/parser'
require 'sass/scss/static_parser'
require 'sass/scss/css_parser'
module Sass
# SCSS is the CSS syntax for Sass.
# It parses into the same syntax tree as Sass,
# and generates the same sort of output CSS.
#
# This module contains code for the parsing of SCSS.
... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | false |
grab/engineering-blog | https://github.com/grab/engineering-blog/blob/d8026a4e9cc6348bf38951ee96c523f4ec19f3c4/_vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/engine.rb | _vendor/ruby/2.6.0/gems/sass-3.6.0/lib/sass/engine.rb | require 'set'
require 'digest/sha1'
require 'sass/cache_stores'
require 'sass/deprecation'
require 'sass/source/position'
require 'sass/source/range'
require 'sass/source/map'
require 'sass/tree/node'
require 'sass/tree/root_node'
require 'sass/tree/rule_node'
require 'sass/tree/comment_node'
require 'sass/tree/prop_no... | ruby | MIT | d8026a4e9cc6348bf38951ee96c523f4ec19f3c4 | 2026-01-04T17:45:10.474201Z | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.