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 |
|---|---|---|---|---|---|---|---|---|
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/linkage_checker.rb | Library/Homebrew/extend/os/linux/linkage_checker.rb | # typed: strict
# frozen_string_literal: true
require "compilers"
require "os/linux/libstdcxx"
module OS
module Linux
module LinkageChecker
extend T::Helpers
requires_ancestor { ::LinkageChecker }
# Libraries provided by glibc and gcc.
SYSTEM_LIBRARY_ALLOWLIST = T.let(%W[
ld-li... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/formula.rb | Library/Homebrew/extend/os/linux/formula.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Formula
extend T::Helpers
requires_ancestor { ::Formula }
sig { params(name: String, version: T.nilable(T.any(String, Integer))).returns(String) }
def shared_library(name, version = nil)
suffix = if vers... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/keg.rb | Library/Homebrew/extend/os/linux/keg.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Keg
sig { returns(T::Array[ELFShim]) }
def binary_executable_or_library_files = elf_files
end
end
end
Keg.prepend(OS::Linux::Keg)
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/install.rb | Library/Homebrew/extend/os/linux/install.rb | # typed: strict
# frozen_string_literal: true
require "os/linux/ld"
require "os/linux/libstdcxx"
require "utils/output"
module OS
module Linux
module Install
module ClassMethods
# We link GCC runtime libraries that are not specifically used for Fortran,
# which are linked by the GCC formul... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/simulate_system.rb | Library/Homebrew/extend/os/linux/simulate_system.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module SimulateSystem
module ClassMethods
sig { returns(T.nilable(Symbol)) }
def os
@os ||= T.let(nil, T.nilable(Symbol))
return :macos if @os.blank? && Homebrew::EnvConfig.simulate_macos_on_linux?
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/development_tools.rb | Library/Homebrew/extend/os/linux/development_tools.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module DevelopmentTools
module ClassMethods
extend T::Helpers
requires_ancestor { ::DevelopmentTools }
sig { params(tool: T.any(String, Symbol)).returns(T.nilable(::Pathname)) }
def locate(tool)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/formula_installer.rb | Library/Homebrew/extend/os/linux/formula_installer.rb | # typed: strict
# frozen_string_literal: true
class FormulaInstaller
sig { params(formula: Formula).returns(T.nilable(T::Boolean)) }
def fresh_install?(formula)
!Homebrew::EnvConfig.developer? &&
(!installed_as_dependency? || !formula.any_version_installed?)
end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cmd/update-report.rb | Library/Homebrew/extend/os/linux/cmd/update-report.rb | # typed: strict
# frozen_string_literal: true
module Homebrew
module_function
sig { returns(String) }
def no_changes_message
"No changes to formulae."
end
sig { void }
def migrate_gcc_dependents_if_needed
return if Settings.read("gcc-rpaths.fixed") == "true"
Formula.installed.each do |formul... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/dev-cmd/update-test.rb | Library/Homebrew/extend/os/linux/dev-cmd/update-test.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module DevCmd
module UpdateTest
private
sig { returns(String) }
def git_tags
super.presence || Utils.popen_read("git tag --list | sort -rV")
end
end
end
end
end
Homebrew::DevCmd::Upd... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb | Library/Homebrew/extend/os/linux/dev-cmd/bottle.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module DevCmd
module Bottle
sig { params(formula: Formula).returns(T::Array[Regexp]) }
def formula_ignores(formula)
ignores = super
cellar_regex = Regexp.escape(HOMEBREW_CELLAR)
prefix_regex ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/dev-cmd/tests.rb | Library/Homebrew/extend/os/linux/dev-cmd/tests.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module DevCmd
module Tests
extend T::Helpers
requires_ancestor { Homebrew::DevCmd::Tests }
private
sig { params(bundle_args: T::Array[String]).returns(T::Array[String]) }
def os_bundle_args(bundl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/hardware/cpu.rb | Library/Homebrew/extend/os/linux/hardware/cpu.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Hardware
module CPU
module ClassMethods
extend T::Helpers
requires_ancestor { T.class_of(::Hardware::CPU) }
sig { returns(T::Hash[Symbol, String]) }
def optimization_flags
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cask/caskroom.rb | Library/Homebrew/extend/os/linux/cask/caskroom.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Cask
module Caskroom
module ClassMethods
sig { params(path: ::Pathname, _sudo: T::Boolean).void }
def chgrp_path(path, _sudo)
SystemCommand.run("chgrp", args: ["root", path], sudo: true)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cask/installer.rb | Library/Homebrew/extend/os/linux/cask/installer.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Cask
module Installer
extend T::Helpers
requires_ancestor { ::Cask::Installer }
sig { void }
def check_stanza_os_requirements
return if artifacts.all? { |artifact| supported_artifact?(art... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cask/config.rb | Library/Homebrew/extend/os/linux/cask/config.rb | # typed: strict
# frozen_string_literal: true
require "os/linux"
module OS
module Linux
module Cask
module Config
module ClassMethods
DEFAULT_DIRS = T.let({
vst_plugindir: "~/.vst",
vst3_plugindir: "~/.vst3",
fontdir: "#{ENV.fetch("XDG_DATA_HOM... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cask/quarantine.rb | Library/Homebrew/extend/os/linux/cask/quarantine.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Cask
module Quarantine
module ClassMethods
extend T::Helpers
requires_ancestor { ::Cask::Quarantine }
sig { returns(T::Boolean) }
def available? = false
end
end
en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/cask/artifact/relocated.rb | Library/Homebrew/extend/os/linux/cask/artifact/relocated.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Cask
module Artifact
module Relocated
extend T::Helpers
requires_ancestor { ::Cask::Artifact::Relocated }
sig { params(file: ::Pathname, altname: ::Pathname, command: T.class_of(SystemCommand... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/requirements/xcode_requirement.rb | Library/Homebrew/extend/os/linux/requirements/xcode_requirement.rb | # typed: strict
# frozen_string_literal: true
require "requirement"
class XcodeRequirement < Requirement
sig { returns(T::Boolean) }
def xcode_installed_version!
true
end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/bundle/bundle.rb | Library/Homebrew/extend/os/linux/bundle/bundle.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Bundle
module ClassMethods
sig { returns(T::Boolean) }
def mas_installed?
false
end
# Setup pkg-config, if present, to help locate packages
# Only need this on Linux as Homebrew pr... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/bundle/skipper.rb | Library/Homebrew/extend/os/linux/bundle/skipper.rb | # typed: strict
# frozen_string_literal: true
require "cask/cask_loader"
require "cask/installer"
module OS
module Linux
module Bundle
module Skipper
module ClassMethods
sig { params(entry: Homebrew::Bundle::Dsl::Entry).returns(T::Boolean) }
def macos_only_entry?(entry)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/extend/pathname.rb | Library/Homebrew/extend/os/linux/extend/pathname.rb | # typed: strict
# frozen_string_literal: true
require "os/linux/elf"
module ELFPathname
module ClassMethods
sig { params(path: T.any(Pathname, String, ELFShim)).returns(ELFShim) }
def wrap(path)
return path if path.is_a?(ELFShim)
path = ::Pathname.new(path)
path.extend(ELFShim)
T.ca... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/extend/ENV/std.rb | Library/Homebrew/extend/os/linux/extend/ENV/std.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Stdenv
extend T::Helpers
requires_ancestor { ::SharedEnvExtension }
sig {
params(
formula: T.nilable(::Formula),
cc: T.nilable(String),
build_bottle: T.nil... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/extend/ENV/super.rb | Library/Homebrew/extend/os/linux/extend/ENV/super.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module Superenv
extend T::Helpers
requires_ancestor { SharedEnvExtension }
requires_ancestor { ::Superenv }
module ClassMethods
sig { returns(::Pathname) }
def shims_path
HOMEBREW_SHIMS_PATH/"... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb | Library/Homebrew/extend/os/linux/extend/ENV/shared.rb | # typed: strict
# frozen_string_literal: true
module OS
module Linux
module SharedEnvExtension
extend T::Helpers
requires_ancestor { ::SharedEnvExtension }
sig { returns(Symbol) }
def effective_arch
if build_bottle && (bottle_arch = self.bottle_arch)
bottle_arch.to_sym... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/extend/ENV/std.rb | Library/Homebrew/extend/os/extend/ENV/std.rb | # typed: strict
# frozen_string_literal: true
if OS.mac?
require "extend/os/mac/extend/ENV/std"
elsif OS.linux?
require "extend/os/linux/extend/ENV/std"
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/extend/ENV/super.rb | Library/Homebrew/extend/os/extend/ENV/super.rb | # typed: strict
# frozen_string_literal: true
if OS.mac?
require "extend/os/mac/extend/ENV/super"
elsif OS.linux?
require "extend/os/linux/extend/ENV/super"
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/extend/ENV/shared.rb | Library/Homebrew/extend/os/extend/ENV/shared.rb | # typed: strict
# frozen_string_literal: true
if OS.mac?
require "extend/os/mac/extend/ENV/shared"
elsif OS.linux?
require "extend/os/linux/extend/ENV/shared"
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/unpack_strategy/zip.rb | Library/Homebrew/extend/os/unpack_strategy/zip.rb | # typed: strict
# frozen_string_literal: true
require "extend/os/mac/unpack_strategy/zip" if OS.mac?
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/os/language/java.rb | Library/Homebrew/extend/os/language/java.rb | # typed: strict
# frozen_string_literal: true
require "extend/os/mac/language/java" if OS.mac?
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/ENV/std.rb | Library/Homebrew/extend/ENV/std.rb | # typed: strict
# frozen_string_literal: true
require "hardware"
require "extend/ENV/shared"
module Stdenv
include SharedEnvExtension
SAFE_CFLAGS_FLAGS = "-w -pipe"
private_constant :SAFE_CFLAGS_FLAGS
sig {
params(
formula: T.nilable(Formula),
cc: T.nilable(String),
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/ENV/super.rb | Library/Homebrew/extend/ENV/super.rb | # typed: strict
# frozen_string_literal: true
require "extend/ENV/shared"
require "development_tools"
require "utils/output"
# ### Why `superenv`?
#
# 1. Only specify the environment we need (*NO* LDFLAGS for cmake)
# 2. Only apply compiler-specific options when we are calling that compiler
# 3. Force all incpaths an... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/extend/ENV/shared.rb | Library/Homebrew/extend/ENV/shared.rb | # typed: strict
# frozen_string_literal: true
require "compilers"
require "development_tools"
# Homebrew extends Ruby's `ENV` to make our code more readable.
# Implemented in {SharedEnvExtension} and either {Superenv} or
# {Stdenv} (depending on the build mode).
# @see Superenv
# @see Stdenv
# @see https://www.rubydo... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cli/named_args.rb | Library/Homebrew/cli/named_args.rb | # typed: strict
# frozen_string_literal: true
require "cli/args"
require "utils/output"
module Homebrew
module CLI
# Helper class for loading formulae/casks from named arguments.
class NamedArgs < Array
include Utils::Output::Mixin
extend T::Generic
Elem = type_member(:out) { { fixed: Str... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cli/parser.rb | Library/Homebrew/cli/parser.rb | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "env_config"
require "cask/config"
require "cli/args"
require "cli/error"
require "commands"
require "optparse"
require "utils/tty"
require "utils/formatter"
require "utils/output"
module Homebrew
module CLI
class Parser
incl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cli/args.rb | Library/Homebrew/cli/args.rb | # typed: strict
# frozen_string_literal: true
module Homebrew
module CLI
class Args
# Represents a processed option. The array elements are:
# 0: short option name (e.g. "-d")
# 1: long option name (e.g. "--debug")
# 2: option description (e.g. "Print debugging information")
#... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cli/error.rb | Library/Homebrew/cli/error.rb | # typed: strict
# frozen_string_literal: true
require "utils/formatter"
module Homebrew
module CLI
class OptionConstraintError < UsageError
sig { params(arg1: String, arg2: String, missing: T::Boolean).void }
def initialize(arg1, arg2, missing: false)
message = if missing
"`#{arg2}... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/air.rb | Library/Homebrew/unpack_strategy/air.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking Adobe Air archives.
class Air
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".air"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
d... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/executable.rb | Library/Homebrew/unpack_strategy/executable.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking executables.
class Executable < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".sh", ".bash"]
end
sig { override.params(path: Pathname)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/mercurial.rb | Library/Homebrew/unpack_strategy/mercurial.rb | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Mercurial repositories.
class Mercurial < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".hg").directory?)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/directory.rb | Library/Homebrew/unpack_strategy/directory.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking directories.
class Directory
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def self... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/jar.rb | Library/Homebrew/unpack_strategy/jar.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking Java archives.
class Jar < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".apk", ".jar"]
end
sig { override.params(path: Pathname).retu... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/compress.rb | Library/Homebrew/unpack_strategy/compress.rb | # typed: strict
# frozen_string_literal: true
require_relative "tar"
module UnpackStrategy
# Strategy for unpacking compress archives.
class Compress < Tar
sig { override.returns(T::Array[String]) }
def self.extensions
[".Z"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/p7zip.rb | Library/Homebrew/unpack_strategy/p7zip.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking P7ZIP archives.
class P7Zip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".7z"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/pax.rb | Library/Homebrew/unpack_strategy/pax.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking pax archives.
class Pax
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".pax"]
end
sig { override.params(_path: Pathname).returns(T::Boolean) }
def se... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/tar.rb | Library/Homebrew/unpack_strategy/tar.rb | # typed: strict
# frozen_string_literal: true
require "system_command"
module UnpackStrategy
# Strategy for unpacking tar archives.
class Tar
include UnpackStrategy
extend SystemCommand::Mixin
sig { override.returns(T::Array[String]) }
def self.extensions
[
".tar",
".tbz", "... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/cab.rb | Library/Homebrew/unpack_strategy/cab.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking Cabinet archives.
class Cab
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".cab"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/subversion.rb | Library/Homebrew/unpack_strategy/subversion.rb | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Subversion repositories.
class Subversion < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".svn").directory?... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/bazaar.rb | Library/Homebrew/unpack_strategy/bazaar.rb | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Bazaar archives.
class Bazaar < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".bzr").directory?)
end
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/bzip2.rb | Library/Homebrew/unpack_strategy/bzip2.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking bzip2 archives.
class Bzip2
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".bz2"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/zstd.rb | Library/Homebrew/unpack_strategy/zstd.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking zstd archives.
class Zstd
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".zst"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def s... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/lha.rb | Library/Homebrew/unpack_strategy/lha.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking LHa archives.
class Lha
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lha", ".lzh"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/zip.rb | Library/Homebrew/unpack_strategy/zip.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking ZIP archives.
class Zip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".zip"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/cvs.rb | Library/Homebrew/unpack_strategy/cvs.rb | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking CVS repositories.
class Cvs < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/"CVS").directory?)
end
end... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/rar.rb | Library/Homebrew/unpack_strategy/rar.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking RAR archives.
class Rar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".rar"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/lua_rock.rb | Library/Homebrew/unpack_strategy/lua_rock.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking LuaRock archives.
class LuaRock < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".rock"]
end
sig { override.params(path: Pathname).retu... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/gzip.rb | Library/Homebrew/unpack_strategy/gzip.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking gzip archives.
class Gzip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".gz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def se... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/otf.rb | Library/Homebrew/unpack_strategy/otf.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking OpenType fonts.
class Otf < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".otf"]
end
sig { override.params(path: Pathname).returns(T::... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/xz.rb | Library/Homebrew/unpack_strategy/xz.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking xz archives.
class Xz
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".xz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.c... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/uncompressed.rb | Library/Homebrew/unpack_strategy/uncompressed.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking uncompressed files.
class Uncompressed
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions = []
sig { override.params(_path: Pathname).returns(T::Boolean) }
def self.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/dmg.rb | Library/Homebrew/unpack_strategy/dmg.rb | # typed: strict
# frozen_string_literal: true
require "tempfile"
require "system_command"
require "utils/output"
module UnpackStrategy
# Strategy for unpacking disk images.
class Dmg
extend SystemCommand::Mixin
include UnpackStrategy
# Helper module for listing the contents of a volume mounted from a... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/fossil.rb | Library/Homebrew/unpack_strategy/fossil.rb | # typed: strict
# frozen_string_literal: true
require "system_command"
module UnpackStrategy
# Strategy for unpacking Fossil repositories.
class Fossil
include UnpackStrategy
extend SystemCommand::Mixin
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { ove... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/xar.rb | Library/Homebrew/unpack_strategy/xar.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking xar archives.
class Xar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".xar"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/microsoft_office_xml.rb | Library/Homebrew/unpack_strategy/microsoft_office_xml.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking Microsoft Office documents.
class MicrosoftOfficeXml < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[
".doc", ".docx",
".ppt", "... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/pkg.rb | Library/Homebrew/unpack_strategy/pkg.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking macOS package installers.
class Pkg < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".pkg", ".mkpg"]
end
sig { override.params(path: Pa... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/self_extracting_executable.rb | Library/Homebrew/unpack_strategy/self_extracting_executable.rb | # typed: strict
# frozen_string_literal: true
require_relative "generic_unar"
module UnpackStrategy
# Strategy for unpacking self-extracting executables.
class SelfExtractingExecutable < GenericUnar
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/generic_unar.rb | Library/Homebrew/unpack_strategy/generic_unar.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking archives with `unar`.
class GenericUnar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(_path: Pathname).returns(T::Boolean) }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/git.rb | Library/Homebrew/unpack_strategy/git.rb | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Git repositories.
class Git < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".git").directory?)
end
en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/ttf.rb | Library/Homebrew/unpack_strategy/ttf.rb | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking TrueType fonts.
class Ttf < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".ttc", ".ttf"]
end
sig { override.params(path: Pathname).ret... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/lzip.rb | Library/Homebrew/unpack_strategy/lzip.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking lzip archives.
class Lzip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def se... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/sit.rb | Library/Homebrew/unpack_strategy/sit.rb | # typed: strict
# frozen_string_literal: true
require_relative "generic_unar"
module UnpackStrategy
# Strategy for unpacking Stuffit archives.
class Sit < GenericUnar
sig { override.returns(T::Array[String]) }
def self.extensions
[".sit"]
end
sig { override.params(path: Pathname).returns(T:... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy/lzma.rb | Library/Homebrew/unpack_strategy/lzma.rb | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking LZMA archives.
class Lzma
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lzma"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/standalone/sorbet.rb | Library/Homebrew/standalone/sorbet.rb | # typed: true
# frozen_string_literal: true
require "sorbet-runtime"
require "extend/module"
# Disable runtime checking unless enabled.
# In the future we should consider not doing this monkey patch,
# if assured that there is no performance hit from removing this.
# There are mechanisms to achieve a middle ground (`... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/standalone/init.rb | Library/Homebrew/standalone/init.rb | # typed: true
# frozen_string_literal: true
# This file is included before any other files.
# It intentionally has typing disabled and uses `Homebrew::FastBootRequire`
# or `require_relative` to load all files
# (except "rbconfig" which is needed by `Homebrew::FastBootRequire`)
required_ruby_major, required_ruby_mino... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/language/perl.rb | Library/Homebrew/language/perl.rb | # typed: strict
# frozen_string_literal: true
module Language
# Helper functions for Perl formulae.
#
# @api public
module Perl
# Helper module for replacing `perl` shebangs.
module Shebang
extend T::Helpers
requires_ancestor { Formula }
module_function
# A regex to match pot... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/language/python.rb | Library/Homebrew/language/python.rb | # typed: strict
# frozen_string_literal: true
require "utils/output"
module Language
# Helper functions for Python formulae.
#
# @api public
module Python
extend ::Utils::Output::Mixin
sig { params(python: T.any(String, Pathname)).returns(T.nilable(Version)) }
def self.major_minor_version(python)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/language/node.rb | Library/Homebrew/language/node.rb | # typed: strict
# frozen_string_literal: true
require "utils/output"
module Language
# Helper functions for Node formulae.
#
# @api public
module Node
extend ::Utils::Output::Mixin
sig { returns(String) }
def self.npm_cache_config
"cache=#{HOMEBREW_CACHE}/npm_cache"
end
sig { retur... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/language/php.rb | Library/Homebrew/language/php.rb | # typed: strict
# frozen_string_literal: true
module Language
# Helper functions for PHP formulae.
#
# @api public
module PHP
# Helper module for replacing `php` shebangs.
module Shebang
extend T::Helpers
requires_ancestor { Formula }
module_function
# A regex to match potent... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/language/java.rb | Library/Homebrew/language/java.rb | # typed: strict
# frozen_string_literal: true
module Language
# Helper functions for Java formulae.
#
# @api public
module Java
sig { params(version: T.nilable(String)).returns(T.nilable(Formula)) }
def self.find_openjdk_formula(version = nil)
can_be_newer = version&.end_with?("+")
version ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/startup/ruby_path.rb | Library/Homebrew/startup/ruby_path.rb | # typed: true
# frozen_string_literal: true
RUBY_PATH = Pathname.new(RbConfig.ruby).freeze
RUBY_BIN = RUBY_PATH.dirname.freeze
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/startup/bootsnap.rb | Library/Homebrew/startup/bootsnap.rb | # typed: true
# frozen_string_literal: true
module Homebrew
module Bootsnap
def self.key
@key ||= begin
require "digest/sha2"
checksum = Digest::SHA256.new
checksum << RUBY_VERSION
checksum << RUBY_PLATFORM
checksum << Dir.children(File.join(Gem.paths.path, "gems"))... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/startup/config.rb | Library/Homebrew/startup/config.rb | # typed: true
# frozen_string_literal: true
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"]
# The path to the executable that should be used to run `brew`.
# This may be HOMEBREW_ORIGINAL_BREW_FILE depending on the system configuration.
# Favour this instea... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/compiler_test.rb | test/compiler_test.rb | require "test_helper"
class CompilerTest < Minitest::Test
def remove_compilation_digest_path
Webpacker.compiler.send(:compilation_digest_path).tap do |path|
path.delete if path.exist?
end
end
def setup
remove_compilation_digest_path
end
def teardown
remove_compilation_digest_path
en... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/engine_rake_tasks_test.rb | test/engine_rake_tasks_test.rb | require "test_helper"
class EngineRakeTasksTest < Minitest::Test
def setup
remove_webpack_binstubs
end
def teardown
remove_webpack_binstubs
end
def test_task_mounted
output = Dir.chdir(mounted_app_path) { `rake -T` }
assert_includes output, "app:webpacker"
end
def test_binstubs
Dir... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/command_test.rb | test/command_test.rb | require "test_helper"
class CommandTest < Minitest::Test
def test_compile_command_returns_success_status_when_stale
Webpacker.compiler.stub :stale?, true do
Webpacker.compiler.stub :run_webpack, true do
assert_equal true, Webpacker.commands.compile
end
end
end
def test_compile_comman... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/rake_tasks_test.rb | test/rake_tasks_test.rb | require "test_helper"
class RakeTasksTest < Minitest::Test
def test_rake_tasks
output = Dir.chdir(test_app_path) { `rake -T` }
assert_includes output, "webpacker"
assert_includes output, "webpacker:check_binstubs"
assert_includes output, "webpacker:check_node"
assert_includes output, "webpacker:c... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/dev_server_test.rb | test/dev_server_test.rb | require "test_helper"
class DevServerTest < Webpacker::Test
def test_running?
refute Webpacker.dev_server.running?
end
def test_host
with_rails_env("development") do
assert_equal Webpacker.dev_server.host, "localhost"
end
end
def test_port
with_rails_env("development") do
assert... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/test_helper.rb | test/test_helper.rb | # frozen_string_literal: true
require "minitest/autorun"
require "rails"
require "rails/test_help"
require "byebug"
require_relative "test_app/config/environment"
Rails.env = "production"
Webpacker.instance = ::Webpacker::Instance.new
class Webpacker::Test < Minitest::Test
private
def reloaded_config
We... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/helper_test.rb | test/helper_test.rb | require "test_helper"
class HelperTest < ActionView::TestCase
tests Webpacker::Helper
attr_reader :request
def setup
@request = Class.new do
def send_early_hints(links) end
def base_url
"https://example.com"
end
end.new
end
def test_asset_pack_path
assert_equal "/pack... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/dev_server_runner_test.rb | test/dev_server_runner_test.rb | require "test_helper"
require "webpacker/dev_server_runner"
class DevServerRunnerTest < Webpacker::Test
def setup
@original_node_env, ENV["NODE_ENV"] = ENV["NODE_ENV"], "development"
@original_rails_env, ENV["RAILS_ENV"] = ENV["RAILS_ENV"], "development"
@original_webpacker_config = ENV["WEBPACKER_CONFIG... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/manifest_test.rb | test/manifest_test.rb | require "test_helper"
class ManifestTest < Minitest::Test
def test_lookup_exception!
asset_file = "calendar.js"
error = assert_raises_manifest_missing_entry_error do
Webpacker.manifest.lookup!(asset_file)
end
assert_match "Webpacker can't find #{asset_file} in #{manifest_path}", error.message... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/configuration_test.rb | test/configuration_test.rb | require "test_helper"
class ConfigurationTest < Webpacker::Test
def setup
@config = Webpacker::Configuration.new(
root_path: Pathname.new(File.expand_path("test_app", __dir__)),
config_path: Pathname.new(File.expand_path("./test_app/config/webpacker.yml", __dir__)),
env: "production"
)
en... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/webpack_runner_test.rb | test/webpack_runner_test.rb | require "test_helper"
require "webpacker/webpack_runner"
class WebpackRunnerTest < Webpacker::Test
def setup
@original_node_env, ENV["NODE_ENV"] = ENV["NODE_ENV"], "development"
@original_rails_env, ENV["RAILS_ENV"] = ENV["RAILS_ENV"], "development"
end
def teardown
ENV["NODE_ENV"] = @original_node_... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/webpacker_test.rb | test/webpacker_test.rb | require "test_helper"
class WebpackerTest < Webpacker::Test
def test_config_params
assert_equal Rails.env, Webpacker.config.env
assert_equal Webpacker.instance.root_path, Webpacker.config.root_path
assert_equal Webpacker.instance.config_path, Webpacker.config.config_path
with_rails_env("test") do
... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/env_test.rb | test/env_test.rb | require "test_helper"
class EnvTest < Webpacker::Test
def test_current
assert_equal Webpacker.env, Rails.env
end
def test_custom_without_config
with_rails_env("foo") do
assert_equal Webpacker.env, "production"
end
end
def test_custom_with_config
with_rails_env("staging") do
asse... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/test_app/config/application.rb | test/test_app/config/application.rb | require "action_controller/railtie"
require "action_view/railtie"
require "webpacker"
module TestApp
class Application < ::Rails::Application
config.secret_key_base = "abcdef"
config.eager_load = true
config.active_support.test_order = :sorted
end
end
| ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/test_app/config/environment.rb | test/test_app/config/environment.rb | require_relative "application"
Rails.backtrace_cleaner.remove_silencers!
Rails.application.initialize!
| ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/test_app/config/initializers/inspect_autoload_paths.rb | test/test_app/config/initializers/inspect_autoload_paths.rb | $test_app_autoload_paths_in_initializer = ActiveSupport::Dependencies.autoload_paths
| ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/mounted_app/test/dummy/config/application.rb | test/mounted_app/test/dummy/config/application.rb | require "action_controller/railtie"
require "action_view/railtie"
require "webpacker"
module TestDummyApp
class Application < Rails::Application
config.secret_key_base = "abcdef"
config.eager_load = true
end
end
| ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/test/mounted_app/test/dummy/config/environment.rb | test/mounted_app/test/dummy/config/environment.rb | require_relative "application"
Rails.application.initialize!
| ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
rails/webpacker | https://github.com/rails/webpacker/blob/a715e055d937748c7cfd34b0450295348ca13ee6/lib/webpacker.rb | lib/webpacker.rb | require "active_support/core_ext/module/attribute_accessors"
require "active_support/core_ext/string/inquiry"
require "active_support/logger"
require "active_support/tagged_logging"
module Webpacker
extend self
def instance=(instance)
@instance = instance
end
def instance
@instance ||= Webpacker::Ins... | ruby | MIT | a715e055d937748c7cfd34b0450295348ca13ee6 | 2026-01-04T15:43:16.273438Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.