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/cask/config.rb | Library/Homebrew/cask/config.rb | # typed: strict
# frozen_string_literal: true
require "json"
require "lazy_object"
require "locale"
require "extend/hash/keys"
module Cask
# Configuration for installing casks.
#
# @api internal
class Config
ConfigHash = T.type_alias { T::Hash[Symbol, T.any(LazyObject, String, Pathname, T::Array[String])... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/auditor.rb | Library/Homebrew/cask/auditor.rb | # typed: strict
# frozen_string_literal: true
require "cask/audit"
require "utils/output"
module Cask
# Helper class for auditing all available languages of a cask.
class Auditor
include ::Utils::Output::Mixin
# TODO: use argument forwarding (...) when Sorbet supports it in strict mode
sig {
pa... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/cask.rb | Library/Homebrew/cask/cask.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "bundle_version"
require "cask/cask_loader"
require "cask/config"
require "cask/dsl"
require "cask/metadata"
require "cask/tab"
require "utils/bottles"
require "utils/output"
require "api_hashable"
module Cask
# An instance of a c... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/quarantine.rb | Library/Homebrew/cask/quarantine.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "development_tools"
require "cask/exceptions"
require "system_command"
require "utils/output"
module Cask
# Helper module for quarantining files.
module Quarantine
extend SystemCommand::Mixin
extend ::Utils::Output::Mixi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/pkg.rb | Library/Homebrew/cask/pkg.rb | # typed: strict
# frozen_string_literal: true
require "cask/macos"
require "utils/output"
module Cask
# Helper class for uninstalling `.pkg` installers.
class Pkg
include ::Utils::Output::Mixin
sig { params(regexp: String, command: T.class_of(SystemCommand)).returns(T::Array[Pkg]) }
def self.all_matc... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/cache.rb | Library/Homebrew/cask/cache.rb | # typed: strict
# frozen_string_literal: true
module Cask
# Helper functions for the cask cache.
module Cache
sig { returns(Pathname) }
def self.path
@path ||= T.let(HOMEBREW_CACHE/"Cask", T.nilable(Pathname))
end
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/cask/migrator.rb | Library/Homebrew/cask/migrator.rb | # typed: strict
# frozen_string_literal: true
require "cask/cask_loader"
require "utils/inreplace"
require "utils/output"
module Cask
class Migrator
include ::Utils::Output::Mixin
sig { returns(Cask) }
attr_reader :old_cask, :new_cask
sig { params(old_cask: Cask, new_cask: Cask).void }
def ini... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/metadata.rb | Library/Homebrew/cask/metadata.rb | # typed: strict
# frozen_string_literal: true
require "utils/output"
module Cask
# Helper module for reading and writing cask metadata.
module Metadata
extend T::Helpers
include ::Utils::Output::Mixin
METADATA_SUBDIR = ".metadata"
TIMESTAMP_FORMAT = "%Y%m%d%H%M%S.%L"
requires_ancestor { Cask... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/depends_on.rb | Library/Homebrew/cask/dsl/depends_on.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "delegate"
require "requirements/macos_requirement"
module Cask
class DSL
# Class corresponding to the `depends_on` stanza.
class DependsOn < SimpleDelegator
VALID_KEYS = Set.new([
:formula,
:cask,
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/version.rb | Library/Homebrew/cask/dsl/version.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
module Cask
class DSL
# Class corresponding to the `version` stanza.
class Version < ::String
DIVIDERS = {
"." => :dots,
"-" => :hyphens,
"_" => :underscores,
}.freeze
DIVIDER_REGEX = /(#{... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/rename.rb | Library/Homebrew/cask/dsl/rename.rb | # typed: strict
# frozen_string_literal: true
module Cask
class DSL
# Class corresponding to the `rename` stanza.
class Rename
sig { returns(String) }
attr_reader :from, :to
sig { params(from: String, to: String).void }
def initialize(from, to)
@from = from
@to = to
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/uninstall_preflight.rb | Library/Homebrew/cask/dsl/uninstall_preflight.rb | # typed: strict
# frozen_string_literal: true
require "cask/staged"
module Cask
class DSL
# Class corresponding to the `uninstall_preflight` stanza.
class UninstallPreflight < Base
include Staged
end
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/cask/dsl/caveats.rb | Library/Homebrew/cask/dsl/caveats.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
module Cask
class DSL
# Class corresponding to the `caveats` stanza.
#
# Each method should handle output, following the
# convention of at least one trailing blank line so that the user
# can distinguish separate cavea... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/base.rb | Library/Homebrew/cask/dsl/base.rb | # typed: strict
# frozen_string_literal: true
require "cask/utils"
require "on_system"
module Cask
class DSL
# Superclass for all stanzas which take a block.
class Base
extend Forwardable
sig { returns(Cask) }
attr_reader :cask
sig { returns(T.class_of(SystemCommand)) }
attr_... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/postflight.rb | Library/Homebrew/cask/dsl/postflight.rb | # typed: strict
# frozen_string_literal: true
require "cask/staged"
module Cask
class DSL
# Class corresponding to the `postflight` stanza.
class Postflight < Base
include Staged
end
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/cask/dsl/conflicts_with.rb | Library/Homebrew/cask/dsl/conflicts_with.rb | # typed: strict
# frozen_string_literal: true
require "delegate"
require "extend/hash/keys"
require "utils/output"
module Cask
class DSL
# Class corresponding to the `conflicts_with` stanza.
class ConflictsWith < SimpleDelegator
VALID_KEYS = [:cask].freeze
ODISABLED_KEYS = [
:formula,
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/dsl/preflight.rb | Library/Homebrew/cask/dsl/preflight.rb | # typed: strict
# frozen_string_literal: true
require "cask/staged"
module Cask
class DSL
# Class corresponding to the `preflight` stanza.
class Preflight < Base
include Staged
end
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/cask/dsl/uninstall_postflight.rb | Library/Homebrew/cask/dsl/uninstall_postflight.rb | # typed: strict
# frozen_string_literal: true
module Cask
class DSL
# Class corresponding to the `uninstall_postflight` stanza.
class UninstallPostflight < Base
end
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/cask/dsl/container.rb | Library/Homebrew/cask/dsl/container.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "unpack_strategy"
module Cask
class DSL
# Class corresponding to the `container` stanza.
class Container
attr_accessor :nested, :type
def initialize(nested: nil, type: nil)
@nested = nested
@ty... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/vst_plugin.rb | Library/Homebrew/cask/artifact/vst_plugin.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `vst_plugin` stanza.
class VstPlugin < Moved
sig { returns(String) }
def self.english_name
"VST Plugin"
end
end
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/cask/artifact/keyboard_layout.rb | Library/Homebrew/cask/artifact/keyboard_layout.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `keyboard_layout` stanza.
class KeyboardLayout < Moved
def install_phase(**options)
super
delete_keyboard_layout_cache... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/binary.rb | Library/Homebrew/cask/artifact/binary.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/symlinked"
module Cask
module Artifact
# Artifact corresponding to the `binary` stanza.
class Binary < Symlinked
def link(command: nil, **options)
super
return if source.executable?
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/symlinked.rb | Library/Homebrew/cask/artifact/symlinked.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/relocated"
module Cask
module Artifact
# Superclass for all artifacts which are installed by symlinking them to the target location.
class Symlinked < Relocated
sig { returns(String) }
def self.l... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/abstract_uninstall.rb | Library/Homebrew/cask/artifact/abstract_uninstall.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "timeout"
require "utils/user"
require "cask/artifact/abstract_artifact"
require "cask/pkg"
require "extend/hash/keys"
require "system_command"
module Cask
module Artifact
# Abstract superclass for uninstall artifacts.
cl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/zap.rb | Library/Homebrew/cask/artifact/zap.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/abstract_uninstall"
module Cask
module Artifact
# Artifact corresponding to the `zap` stanza.
class Zap < AbstractUninstall
sig { params(options: T.anything).void }
def zap_phase(**options)
dispatch_uninstall_directives... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/mdimporter.rb | Library/Homebrew/cask/artifact/mdimporter.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `mdimporter` stanza.
class Mdimporter < Moved
sig { returns(String) }
def self.english_name
"Spotlight metadata importer... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/qlplugin.rb | Library/Homebrew/cask/artifact/qlplugin.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `qlplugin` stanza.
class Qlplugin < Moved
sig { returns(String) }
def self.english_name
"Quick Look Plugin"
end
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/stage_only.rb | Library/Homebrew/cask/artifact/stage_only.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/abstract_artifact"
module Cask
module Artifact
# Artifact corresponding to the `stage_only` stanza.
class StageOnly < AbstractArtifact
def self.from_args(cask, *args, **kwargs)
if (args != [tru... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/uninstall.rb | Library/Homebrew/cask/artifact/uninstall.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/abstract_uninstall"
module Cask
module Artifact
# Artifact corresponding to the `uninstall` stanza.
class Uninstall < AbstractUninstall
UPGRADE_REINSTALL_SKIP_DIRECTIVES = [:quit, :signal].freeze
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/font.rb | Library/Homebrew/cask/artifact/font.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `font` stanza.
class Font < Moved
end
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/cask/artifact/moved.rb | Library/Homebrew/cask/artifact/moved.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/relocated"
require "cask/quarantine"
module Cask
module Artifact
# Superclass for all artifacts that are installed by moving them to the target location.
class Moved < Relocated
sig { returns(String) }... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/abstract_flight_block.rb | Library/Homebrew/cask/artifact/abstract_flight_block.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/abstract_artifact"
module Cask
module Artifact
# Abstract superclass for block artifacts.
class AbstractFlightBlock < AbstractArtifact
def self.dsl_key
super.to_s.sub(/_block$/, "").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/cask/artifact/zshcompletion.rb | Library/Homebrew/cask/artifact/zshcompletion.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/shellcompletion"
module Cask
module Artifact
# Artifact corresponding to the `zsh_completion` stanza.
class ZshCompletion < ShellCompletion
sig { params(target: T.any(String, Pathname)).returns(Pathname) }
def resolve_target(ta... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/shellcompletion.rb | Library/Homebrew/cask/artifact/shellcompletion.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/symlinked"
module Cask
module Artifact
class ShellCompletion < Symlinked
sig { params(_: T.any(String, Pathname)).returns(Pathname) }
def resolve_target(_)
raise CaskInvalidError, "Shell completion without shell info"
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/audio_unit_plugin.rb | Library/Homebrew/cask/artifact/audio_unit_plugin.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `audio_unit_plugin` stanza.
class AudioUnitPlugin < Moved
end
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/cask/artifact/abstract_artifact.rb | Library/Homebrew/cask/artifact/abstract_artifact.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "extend/object/deep_dup"
require "utils/output"
module Cask
module Artifact
# Abstract superclass for all artifacts.
class AbstractArtifact
extend T::Helpers
extend ::Utils::Output::Mixin
abstract!
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/preflight_block.rb | Library/Homebrew/cask/artifact/preflight_block.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/abstract_flight_block"
module Cask
module Artifact
# Artifact corresponding to the `preflight` stanza.
class PreflightBlock < AbstractFlightBlock
end
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/cask/artifact/bashcompletion.rb | Library/Homebrew/cask/artifact/bashcompletion.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/shellcompletion"
module Cask
module Artifact
# Artifact corresponding to the `bash_completion` stanza.
class BashCompletion < ShellCompletion
sig { params(target: T.any(String, Pathname)).returns(Pathname) }
def resolve_target(... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/app.rb | Library/Homebrew/cask/artifact/app.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `app` stanza.
class App < Moved
sig {
params(
adopt: T::Boolean,
auto_updates: T.nilable(T::Boolean),
force: T::Bo... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/manpage.rb | Library/Homebrew/cask/artifact/manpage.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/symlinked"
module Cask
module Artifact
# Artifact corresponding to the `manpage` stanza.
class Manpage < Symlinked
attr_reader :section
def self.from_args(cask, source)
section = source.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/artifact.rb | Library/Homebrew/cask/artifact/artifact.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Generic artifact corresponding to the `artifact` stanza.
class Artifact < Moved
sig { returns(String) }
def self.english_name
"Generic Artifact"
end
sig { params(cask: C... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/screen_saver.rb | Library/Homebrew/cask/artifact/screen_saver.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `screen_saver` stanza.
class ScreenSaver < Moved
end
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/cask/artifact/fishcompletion.rb | Library/Homebrew/cask/artifact/fishcompletion.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/shellcompletion"
module Cask
module Artifact
# Artifact corresponding to the `fish_completion` stanza.
class FishCompletion < ShellCompletion
sig { params(target: T.any(String, Pathname)).returns(Pathname) }
def resolve_target(... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/dictionary.rb | Library/Homebrew/cask/artifact/dictionary.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `dictionary` stanza.
class Dictionary < Moved
end
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/cask/artifact/internet_plugin.rb | Library/Homebrew/cask/artifact/internet_plugin.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `internet_plugin` stanza.
class InternetPlugin < Moved
end
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/cask/artifact/installer.rb | Library/Homebrew/cask/artifact/installer.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/abstract_artifact"
require "extend/hash/keys"
module Cask
module Artifact
# Artifact corresponding to the `installer` stanza.
class Installer < AbstractArtifact
VALID_KEYS = Set.new([
:manual,
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/input_method.rb | Library/Homebrew/cask/artifact/input_method.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `input_method` stanza.
class InputMethod < Moved
end
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/cask/artifact/prefpane.rb | Library/Homebrew/cask/artifact/prefpane.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `prefpane` stanza.
class Prefpane < Moved
sig { returns(String) }
def self.english_name
"Preference Pane"
end
end
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/cask/artifact/postflight_block.rb | Library/Homebrew/cask/artifact/postflight_block.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/abstract_flight_block"
module Cask
module Artifact
# Artifact corresponding to the `postflight` stanza.
class PostflightBlock < AbstractFlightBlock
end
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/cask/artifact/service.rb | Library/Homebrew/cask/artifact/service.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `service` stanza.
class Service < Moved
end
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/cask/artifact/pkg.rb | Library/Homebrew/cask/artifact/pkg.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "plist"
require "utils/user"
require "cask/artifact/abstract_artifact"
require "extend/hash/keys"
module Cask
module Artifact
# Artifact corresponding to the `pkg` stanza.
class Pkg < AbstractArtifact
attr_reader :p... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/vst3_plugin.rb | Library/Homebrew/cask/artifact/vst3_plugin.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `vst3_plugin` stanza.
class Vst3Plugin < Moved
sig { returns(String) }
def self.english_name
"VST3 Plugin"
end
end
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/cask/artifact/relocated.rb | Library/Homebrew/cask/artifact/relocated.rb | # typed: true # rubocop:todo Sorbet/StrictSigil
# frozen_string_literal: true
require "cask/artifact/abstract_artifact"
require "extend/hash/keys"
module Cask
module Artifact
# Superclass for all artifacts which have a source and a target location.
class Relocated < AbstractArtifact
def self.from_args... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/suite.rb | Library/Homebrew/cask/artifact/suite.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `suite` stanza.
class Suite < Moved
sig { returns(String) }
def self.english_name
"App Suite"
end
sig { returns(Symbol) }
def self.di... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cask/artifact/colorpicker.rb | Library/Homebrew/cask/artifact/colorpicker.rb | # typed: strict
# frozen_string_literal: true
require "cask/artifact/moved"
module Cask
module Artifact
# Artifact corresponding to the `colorpicker` stanza.
class Colorpicker < Moved
end
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/aliases/aliases.rb | Library/Homebrew/aliases/aliases.rb | # typed: strict
# frozen_string_literal: true
require "aliases/alias"
require "utils/output"
module Homebrew
module Aliases
extend Utils::Output::Mixin
RESERVED = T.let((
Commands.internal_commands +
Commands.internal_developer_commands +
Commands.internal_commands_aliases +
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/aliases/alias.rb | Library/Homebrew/aliases/alias.rb | # typed: strict
# frozen_string_literal: true
require "fileutils"
require "utils/output"
module Homebrew
module Aliases
class Alias
include ::Utils::Output::Mixin
sig { returns(String) }
attr_accessor :name
sig { returns(T.nilable(String)) }
attr_accessor :command
sig { pa... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_installer_bottle_spec.rb | Library/Homebrew/test/formula_installer_bottle_spec.rb | # frozen_string_literal: true
require "formula"
require "formula_installer"
require "keg"
require "tab"
require "cmd/install"
require "test/support/fixtures/testball"
require "test/support/fixtures/testball_bottle"
require "test/support/fixtures/testball_bottle_cellar"
RSpec.describe FormulaInstaller do
alias_match... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_spec_selection_spec.rb | Library/Homebrew/test/formula_spec_selection_spec.rb | # frozen_string_literal: true
require "formula"
RSpec.describe Formula do
describe "::new" do
it "selects stable by default" do
f = formula do
url "foo-1.0"
head "foo"
end
expect(f).to be_stable
end
it "selects stable when exclusive" do
f = formula { url "foo-1.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/pathname_spec.rb | Library/Homebrew/test/pathname_spec.rb | # frozen_string_literal: true
require "extend/pathname"
require "install_renamed"
RSpec.describe Pathname do
include FileUtils
let(:src) { mktmpdir }
let(:dst) { mktmpdir }
let(:file) { src/"foo" }
let(:dir) { src/"bar" }
describe DiskUsageExtension do
before do
mkdir_p dir/"a-directory"
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/macos_runner_spec_spec.rb | Library/Homebrew/test/macos_runner_spec_spec.rb | # frozen_string_literal: true
require "macos_runner_spec"
RSpec.describe MacOSRunnerSpec do
let(:spec) { described_class.new(name: "macOS 11-arm64", runner: "11-arm64", timeout: 90, cleanup: true) }
it "has immutable attributes" do
[:name, :runner, :timeout, :cleanup].each do |attribute|
expect(spec.re... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/linkage_cache_store_spec.rb | Library/Homebrew/test/linkage_cache_store_spec.rb | # frozen_string_literal: true
require "linkage_cache_store"
RSpec.describe LinkageCacheStore do
subject(:linkage_cache) { described_class.new(keg_name, database) }
let(:keg_name) { "keg_name" }
let(:database) { instance_double(CacheStoreDatabase, "database") }
describe "#keg_exists?" do
context "when `k... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/sbom_spec.rb | Library/Homebrew/test/sbom_spec.rb | # frozen_string_literal: true
require "sbom"
RSpec.describe SBOM do
describe "#schema_validation_errors" do
subject(:sbom) { described_class.create(f, tab) }
before { ENV.delete("HOMEBREW_ENFORCE_SBOM") }
let(:f) { formula { url "foo-1.0" } }
let(:tab) { Tab.new }
it "returns true if valid" d... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/macos_version_spec.rb | Library/Homebrew/test/macos_version_spec.rb | # frozen_string_literal: true
require "macos_version"
RSpec.describe MacOSVersion do
let(:version) { described_class.new("10.15") }
let(:tahoe_major) { described_class.new("26.0") }
let(:big_sur_major) { described_class.new("11.0") }
let(:big_sur_update) { described_class.new("11.1") }
let(:frozen_version) ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirement_spec.rb | Library/Homebrew/test/requirement_spec.rb | # frozen_string_literal: true
require "extend/ENV"
require "requirement"
RSpec.describe Requirement do
alias_matcher :be_a_build_requirement, :be_a_build
subject(:requirement) { klass.new }
let(:klass) { Class.new(described_class) }
describe "base class" do
it "raises an error when instantiated" do
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/search_spec.rb | Library/Homebrew/test/search_spec.rb | # frozen_string_literal: true
require "search"
require "descriptions"
require "cmd/desc"
RSpec.describe Homebrew::Search do
describe "#query_regexp" do
it "correctly parses a regex query" do
expect(described_class.query_regexp("/^query$/")).to eq(/^query$/)
end
it "returns the original string if ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bottle_filename_spec.rb | Library/Homebrew/test/bottle_filename_spec.rb | # frozen_string_literal: true
require "formula"
require "software_spec"
RSpec.describe Bottle::Filename do
subject(:filename) { described_class.new(name, version, tag, rebuild) }
let(:name) { "user/repo/foo" }
let(:version) { PkgVersion.new(Version.new("1.0"), 0) }
let(:tag) { Utils::Bottles::Tag.from_symbol... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/patching_spec.rb | Library/Homebrew/test/patching_spec.rb | # frozen_string_literal: true
require "formula"
RSpec.describe "patching", type: :system do
let(:formula_subclass) do
Class.new(Formula) do
# These are defined within an anonymous class to avoid polluting the global namespace.
# rubocop:disable RSpec/LeakyConstantDeclaration,Lint/ConstantDefinitionI... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/linux_runner_spec_spec.rb | Library/Homebrew/test/linux_runner_spec_spec.rb | # frozen_string_literal: true
require "linux_runner_spec"
RSpec.describe LinuxRunnerSpec do
let(:spec) do
described_class.new(
name: "Linux",
runner: "ubuntu-latest",
container: { image: "ghcr.io/homebrew/ubuntu22.04:main", options: "--user=linuxbrew" },
workdir: "/github/home"... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/version_spec.rb | Library/Homebrew/test/version_spec.rb | # frozen_string_literal: true
require "version"
RSpec.describe Version do
subject(:version) { described_class.new("1.2.3") }
specify ".formula_optionally_versioned_regex" do
expect(described_class.formula_optionally_versioned_regex("foo")).to match("foo@1.2")
end
describe Version::Token do
specify "... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependencies_spec.rb | Library/Homebrew/test/dependencies_spec.rb | # frozen_string_literal: true
require "dependencies"
require "dependency"
RSpec.describe Dependencies do
subject(:dependencies) { described_class.new }
describe "#<<" do
it "returns itself" do
expect(dependencies << Dependency.new("foo")).to eq(dependencies)
end
it "preserves order" do
h... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bump_version_parser_spec.rb | Library/Homebrew/test/bump_version_parser_spec.rb | # frozen_string_literal: true
require "bump_version_parser"
RSpec.describe Homebrew::BumpVersionParser do
let(:general_version) { "1.2.3" }
let(:intel_version) { "2.3.4" }
let(:arm_version) { "3.4.5" }
context "when initializing with no versions" do
it "raises a usage error" do
expect do
de... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/test_runner_formula_spec.rb | Library/Homebrew/test/test_runner_formula_spec.rb | # frozen_string_literal: true
require "test_runner_formula"
require "test/support/fixtures/testball"
RSpec.describe TestRunnerFormula do
let(:testball) { Testball.new }
let(:xcode_helper) { setup_test_runner_formula("xcode-helper", [:macos]) }
let(:linux_kernel_requirer) { setup_test_runner_formula("linux-kerne... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/completions_spec.rb | Library/Homebrew/test/completions_spec.rb | # frozen_string_literal: true
require "completions"
RSpec.describe Homebrew::Completions do
let(:completions_dir) { HOMEBREW_REPOSITORY/"completions" }
let(:internal_path) { HOMEBREW_REPOSITORY/"Library/Taps/homebrew/homebrew-bar" }
let(:external_path) { HOMEBREW_REPOSITORY/"Library/Taps/foo/homebrew-bar" }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/deprecate_disable_spec.rb | Library/Homebrew/test/deprecate_disable_spec.rb | # frozen_string_literal: true
require "deprecate_disable"
RSpec.describe DeprecateDisable do
let(:deprecate_date) { Date.parse("2020-01-01") }
let(:disable_date) { deprecate_date >> DeprecateDisable::REMOVE_DISABLED_TIME_WINDOW }
let(:deprecated_formula) do
instance_double(Formula, deprecated?: true, disabl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirements_spec.rb | Library/Homebrew/test/requirements_spec.rb | # frozen_string_literal: true
require "requirements"
RSpec.describe Requirements do
subject(:requirements) { described_class.new }
describe "#<<" do
it "returns itself" do
expect(requirements << Object.new).to be(requirements)
end
it "merges duplicate requirements" do
klass = Class.new(R... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependency_spec.rb | Library/Homebrew/test/dependency_spec.rb | # frozen_string_literal: true
require "dependency"
RSpec.describe Dependency do
alias_matcher :be_a_build_dependency, :be_build
describe "::new" do
it "accepts a single tag" do
dep = described_class.new("foo", %w[bar])
expect(dep.tags).to eq(%w[bar])
end
it "accepts multiple tags" do
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/caveats_spec.rb | Library/Homebrew/test/caveats_spec.rb | # frozen_string_literal: true
require "formula"
require "caveats"
RSpec.describe Caveats do
subject(:caveats) { described_class.new(f) }
let(:f) { formula { url "foo-1.0" } }
specify "#f" do
expect(caveats.formula).to eq(f)
end
describe "#empty?" do
it "returns true if the Formula has no caveats"... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/style_spec.rb | Library/Homebrew/test/style_spec.rb | # frozen_string_literal: true
require "style"
RSpec.describe Homebrew::Style do
around do |example|
FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew"
FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml"
example.run
ensure
FileUtils.rm_f HOMEB... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/installed_dependents_spec.rb | Library/Homebrew/test/installed_dependents_spec.rb | # frozen_string_literal: true
require "installed_dependents"
RSpec.describe InstalledDependents do
include FileUtils
def stub_formula(name, version = "1.0", &block)
f = formula(name) do
url "#{name}-#{version}"
instance_eval(&block) if block
end
stub_formula_loader f
stub_formula_loa... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/api_spec.rb | Library/Homebrew/test/api_spec.rb | # frozen_string_literal: true
require "api"
RSpec.describe Homebrew::API do
let(:text) { "foo" }
let(:json) { '{"foo":"bar"}' }
let(:json_hash) { JSON.parse(json) }
let(:json_invalid) { '{"foo":"bar"' }
def mock_curl_output(stdout: "", success: true)
curl_output = instance_double(SystemCommand::Result,... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/build_options_spec.rb | Library/Homebrew/test/build_options_spec.rb | # frozen_string_literal: true
require "build_options"
require "options"
RSpec.describe BuildOptions do
alias_matcher :be_built_with, :be_with
alias_matcher :be_built_without, :be_without
subject(:build_options) { described_class.new(args, opts) }
let(:bad_build) { described_class.new(bad_args, opts) }
let... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/exceptions_spec.rb | Library/Homebrew/test/exceptions_spec.rb | # frozen_string_literal: true
require "exceptions"
RSpec.describe "Exception" do
describe MultipleVersionsInstalledError do
subject(:error) do
described_class.new <<~EOS
foo has multiple installed versions
Run `brew uninstall --force foo` to remove all versions.
EOS
end
it(:... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/mcp_server_spec.rb | Library/Homebrew/test/mcp_server_spec.rb | # frozen_string_literal: true
require "mcp_server"
require "stringio"
require "timeout"
RSpec.describe Homebrew::McpServer do
let(:stdin) { StringIO.new }
let(:stdout) { StringIO.new }
let(:stderr) { StringIO.new }
let(:server) { described_class.new(stdin:, stdout:, stderr:) }
let(:jsonrpc) { Homebrew::McpS... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/livecheck_spec.rb | Library/Homebrew/test/livecheck_spec.rb | # frozen_string_literal: true
require "formula"
require "livecheck"
RSpec.describe Livecheck do
let(:f) do
formula do
homepage "https://brew.sh"
url "https://brew.sh/test-0.0.1.tgz"
head "https://github.com/Homebrew/brew.git", branch: "main"
end
end
let(:livecheck_f) { described_class.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/simulate_system_spec.rb | Library/Homebrew/test/simulate_system_spec.rb | # frozen_string_literal: true
require "settings"
RSpec.describe Homebrew::SimulateSystem do
after do
described_class.clear
end
describe "::simulating_or_running_on_macos?" do
it "returns true on macOS", :needs_macos do
described_class.clear
expect(described_class.simulating_or_running_on_ma... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_auditor_spec.rb | Library/Homebrew/test/formula_auditor_spec.rb | # frozen_string_literal: true
require "formula_auditor"
require "git_repository"
require "securerandom"
RSpec.describe Homebrew::FormulaAuditor do
include FileUtils
include Test::Helper::Formula
let(:dir) { mktmpdir }
let(:foo_version) do
@count ||= 0
@count += 1
end
let(:formula_subpath) { "Form... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_info_spec.rb | Library/Homebrew/test/formula_info_spec.rb | # frozen_string_literal: true
require "formula_info"
RSpec.describe FormulaInfo, :integration_test do
it "tests the FormulaInfo class" do
formula_path = setup_test_formula "testball"
info = described_class.lookup(formula_path)
expect(info).not_to be_nil
expect(info.revision).to eq(0)
expect(info... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependency_collector_spec.rb | Library/Homebrew/test/dependency_collector_spec.rb | # frozen_string_literal: true
require "dependency_collector"
RSpec.describe DependencyCollector do
alias_matcher :be_a_build_requirement, :be_build
subject(:collector) { described_class.new }
def find_dependency(name)
collector.deps.find { |dep| dep.name == name }
end
def find_requirement(klass)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/cask_dependent_spec.rb | Library/Homebrew/test/cask_dependent_spec.rb | # frozen_string_literal: true
require "cask/cask_loader"
require "cask_dependent"
RSpec.describe CaskDependent, :needs_macos do
subject(:dependent) { described_class.new test_cask }
let :test_cask do
Cask::CaskLoader.load(+<<-RUBY)
cask "testing" do
depends_on formula: "baz"
depends_on ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/ENV_spec.rb | Library/Homebrew/test/ENV_spec.rb | # frozen_string_literal: true
require "extend/ENV"
RSpec.describe "ENV" do
shared_examples EnvActivation do
subject(:env) { env_activation.extend(described_class) }
let(:env_activation) { {}.extend(EnvActivation) }
it "supports switching compilers" do
subject.clang
expect(subject["LD"]).to... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/attestation_spec.rb | Library/Homebrew/test/attestation_spec.rb | # frozen_string_literal: true
require "diagnostic"
RSpec.describe Homebrew::Attestation do
let(:fake_gh) { Pathname.new("/extremely/fake/gh") }
let(:fake_old_gh) { Pathname.new("/extremely/fake/old/gh") }
let(:fake_gh_creds) { "fake-gh-api-token" }
let(:fake_error_status) { instance_double(Process::Status, ex... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/tab_spec.rb | Library/Homebrew/test/tab_spec.rb | # frozen_string_literal: true
require "tab"
require "formula"
RSpec.describe Tab do
alias_matcher :be_built_with, :be_with
matcher :be_poured_from_bottle do
match do |actual|
actual.poured_from_bottle == true
end
end
matcher :be_built_as_bottle do
match do |actual|
actual.built_as_bo... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_validation_spec.rb | Library/Homebrew/test/formula_validation_spec.rb | # frozen_string_literal: true
require "formula"
RSpec.describe Formula do
describe "::new" do
matcher :fail_with_invalid do |attr|
match do |actual|
expect do
actual.call
rescue => e
expect(e.attr).to eq(attr)
raise e
end.to raise_error(FormulaValidati... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/cleaner_spec.rb | Library/Homebrew/test/cleaner_spec.rb | # frozen_string_literal: true
require "cleaner"
require "formula"
RSpec.describe Cleaner do
include FileUtils
describe "#clean" do
subject(:cleaner) { described_class.new(f) }
let(:f) { formula("cleaner_test") { url "foo-1.0" } }
before do
f.prefix.mkpath
end
it "cleans files" do
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/system_command_spec.rb | Library/Homebrew/test/system_command_spec.rb | # frozen_string_literal: true
require "system_command"
RSpec.describe SystemCommand do
describe "#initialize" do
subject(:command) do
described_class.new(
"env",
args: env_args,
env:,
must_succeed: true,
sudo:,
sudo_as_root:,
)
end
let... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/head_software_spec_spec.rb | Library/Homebrew/test/head_software_spec_spec.rb | # frozen_string_literal: true
require "head_software_spec"
RSpec.describe HeadSoftwareSpec do
subject(:head_spec) { described_class.new }
specify "#version" do
expect(head_spec.version).to eq(Version.new("HEAD"))
end
specify "#verify_download_integrity" do
expect(head_spec.verify_download_integrity(... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/compiler_failure_spec.rb | Library/Homebrew/test/compiler_failure_spec.rb | # frozen_string_literal: true
require "compilers"
RSpec.describe CompilerFailure do
alias_matcher :fail_with, :be_fails_with
describe "::create" do
it "creates a failure when given a symbol" do
failure = described_class.create(:clang)
expect(failure).to fail_with(
instance_double(Compiler... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/keg_spec.rb | Library/Homebrew/test/keg_spec.rb | # frozen_string_literal: true
require "keg"
require "stringio"
RSpec.describe Keg do
include FileUtils
def setup_test_keg(name, version)
path = HOMEBREW_CELLAR/name/version
(path/"bin").mkpath
%w[hiworld helloworld goodbye_cruel_world].each do |file|
touch path/"bin"/file
end
keg = de... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependable_spec.rb | Library/Homebrew/test/dependable_spec.rb | # frozen_string_literal: true
require "dependable"
RSpec.describe Dependable do
alias_matcher :be_a_build_dependency, :be_build
subject(:dependable) do
Class.new do
include Dependable
def initialize
@tags = ["foo", "bar", :build]
end
end.new
end
specify "#options" do
e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.