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 |
|---|---|---|---|---|---|---|---|---|
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/info.rb | Library/Homebrew/cask/cmd/info.rb | require "json"
module Cask
class Cmd
class Info < AbstractCommand
option "--json=VERSION", :json
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
end
def run
if json == "v1"
puts JSON.generate(casks.map(&:to_h))
else
c... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/internal_stanza.rb | Library/Homebrew/cask/cmd/internal_stanza.rb | module Cask
class Cmd
class InternalStanza < AbstractInternalCommand
# Syntax
#
# brew cask _stanza <stanza_name> [ --quiet ] [ --table | --yaml ] [ <cask_token> ... ]
#
# If no tokens are given, then data for all Casks is returned.
#
# The pseudo-stanza "artifacts" i... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/upgrade.rb | Library/Homebrew/cask/cmd/upgrade.rb | module Cask
class Cmd
class Upgrade < AbstractCommand
option "--greedy", :greedy, false
option "--quiet", :quiet, false
option "--force", :force, false
option "--skip-cask-deps", :skip_cask_deps, false
def initialize(*)
super
self.verbose = ($stdout.tty? || verbose?... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/fetch.rb | Library/Homebrew/cask/cmd/fetch.rb | require "cask/download"
module Cask
class Cmd
class Fetch < AbstractCommand
option "--force", :force, false
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
end
def run
casks.each do |cask|
Installer.print_caveats(cask)
ohai "... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/create.rb | Library/Homebrew/cask/cmd/create.rb | module Cask
class Cmd
class Create < AbstractCommand
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
raise ArgumentError, "Only one Cask can be created at a time." if args.count > 1
end
def run
cask_token = args.first
cask_path = CaskLoa... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/audit.rb | Library/Homebrew/cask/cmd/audit.rb | module Cask
class Cmd
class Audit < AbstractCommand
option "--download", :download, false
option "--token-conflicts", :token_conflicts, false
def self.help
"verifies installability of Casks"
end
def run
failed_casks = casks(alternative: -> { Cask.to_a ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/list.rb | Library/Homebrew/cask/cmd/list.rb | module Cask
class Cmd
class List < AbstractCommand
option "-1", :one, false
option "--versions", :versions, false
option "--full-name", :full_name, false
option "-l", (lambda do |*|
one = true # rubocop:disable Lint/UselessAssignment
opoo "Option -l is obsolete! Implying o... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/abstract_command.rb | Library/Homebrew/cask/cmd/abstract_command.rb | require_relative "options"
require "search"
module Cask
class Cmd
class AbstractCommand
include Options
include Homebrew::Search
option "--[no-]binaries", :binaries, true
option "--debug", :debug, false
option "--verbose", :verbose, false
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/install.rb | Library/Homebrew/cask/cmd/install.rb | module Cask
class Cmd
class Install < AbstractCommand
option "--force", :force, false
option "--skip-cask-deps", :skip_cask_deps, false
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
end
def run
odie "Installing casks is ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/style.rb | Library/Homebrew/cask/cmd/style.rb | module Cask
class Cmd
class Style < AbstractCommand
def self.help
"checks Cask style using RuboCop"
end
option "--fix", :fix, false
def run
install_rubocop
cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" }
hide_warnings = debug? ? [] : [ENV["HO... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/cat.rb | Library/Homebrew/cask/cmd/cat.rb | module Cask
class Cmd
class Cat < AbstractCommand
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
end
def run
casks.each do |cask|
puts File.open(cask.sourcefile_path, &:read)
end
end
def self.help
"dump raw source... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/cmd/edit.rb | Library/Homebrew/cask/cmd/edit.rb | module Cask
class Cmd
class Edit < AbstractCommand
def initialize(*)
super
raise CaskUnspecifiedError if args.empty?
raise ArgumentError, "Only one Cask can be edited at a time." if args.count > 1
end
def run
exec_editor cask_path
rescue CaskUnavailableErro... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/depends_on.rb | Library/Homebrew/cask/dsl/depends_on.rb | require "rubygems"
module Cask
class DSL
class DependsOn < DelegateClass(Hash)
VALID_KEYS = Set.new [
:formula,
:cask,
:macos,
:arch,
:x11,
:java,
].freeze
VALID_ARCHES = {
intel: { type: :intel, bits: 64 },
# specific
x8... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/version.rb | Library/Homebrew/cask/dsl/version.rb | module Cask
class DSL
class Version < ::String
DIVIDERS = {
"." => :dots,
"-" => :hyphens,
"_" => :underscores,
"/" => :slashes,
}.freeze
DIVIDER_REGEX = /(#{DIVIDERS.keys.map { |v| Regexp.quote(v) }.join('|')})/.freeze
MAJOR_MINOR_PATCH_REGEX = /^(\d+)(?:... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/uninstall_preflight.rb | Library/Homebrew/cask/dsl/uninstall_preflight.rb | require "cask/staged"
module Cask
class DSL
class UninstallPreflight < Base
include Staged
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/caveats.rb | Library/Homebrew/cask/dsl/caveats.rb | # Caveats DSL. Each method should handle output, following the
# convention of at least one trailing blank line so that the user
# can distinguish separate caveats.
#
# ( The return value of the last method in the block is also sent
# to the output by the caller, but that feature is only for the
# convenience of Ca... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/base.rb | Library/Homebrew/cask/dsl/base.rb | module Cask
class DSL
class Base
extend Forwardable
def initialize(cask, command = SystemCommand)
@cask = cask
@command = command
end
def_delegators :@cask, :token, :version, :caskroom_path, :staged_path, :appdir, :language
def system_command(executable, **options)... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/postflight.rb | Library/Homebrew/cask/dsl/postflight.rb | require "cask/staged"
module Cask
class DSL
class Postflight < Base
include Staged
def suppress_move_to_applications(options = {})
# TODO: Remove from all casks because it is no longer needed
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/appcast.rb | Library/Homebrew/cask/dsl/appcast.rb | module Cask
class DSL
class Appcast
attr_reader :uri, :parameters
def initialize(uri, **parameters)
@uri = URI(uri)
@parameters = parameters
end
def to_yaml
[uri, parameters].to_yaml
end
def to_s
uri.to_s
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/conflicts_with.rb | Library/Homebrew/cask/dsl/conflicts_with.rb | module Cask
class DSL
class ConflictsWith
VALID_KEYS = Set.new [
:formula,
:cask,
:macos,
:arch,
:x11,
:java,
]
attr_reader *VALID_KEYS
def initialize(pairs = {})
@pairs = pairs
VALID_KEYS.each do |key|
instance_v... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/preflight.rb | Library/Homebrew/cask/dsl/preflight.rb | module Cask
class DSL
class Preflight < Base
include Staged
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/uninstall_postflight.rb | Library/Homebrew/cask/dsl/uninstall_postflight.rb | module Cask
class DSL
class UninstallPostflight < Base
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/dsl/container.rb | Library/Homebrew/cask/dsl/container.rb | require "unpack_strategy"
module Cask
class DSL
class Container
VALID_KEYS = Set.new [
:type,
:nested,
]
attr_accessor(*VALID_KEYS)
attr_accessor :pairs
def initialize(pairs = {})
@pairs = pairs
pairs.each do |key, value|
raise "invalid co... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/vst_plugin.rb | Library/Homebrew/cask/artifact/vst_plugin.rb | require "cask/artifact/moved"
module Cask
module Artifact
class VstPlugin < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/binary.rb | Library/Homebrew/cask/artifact/binary.rb | require "cask/artifact/symlinked"
module Cask
module Artifact
class Binary < Symlinked
def link(command: nil, **options)
super(command: command, **options)
return if source.executable?
if source.writable?
FileUtils.chmod "+x", source
else
command.run!("/... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/symlinked.rb | Library/Homebrew/cask/artifact/symlinked.rb | require "cask/artifact/relocated"
module Cask
module Artifact
class Symlinked < Relocated
def self.link_type_english_name
"Symlink"
end
def self.english_description
"#{english_name} #{link_type_english_name}s"
end
def install_phase(**options)
link(**options... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/abstract_uninstall.rb | Library/Homebrew/cask/artifact/abstract_uninstall.rb | require "timeout"
require "utils/user"
require "cask/artifact/abstract_artifact"
module Cask
module Artifact
class AbstractUninstall < AbstractArtifact
ORDERED_DIRECTIVES = [
:early_script,
:launchctl,
:quit,
:signal,
:login_item,
:kext,
:script,
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/zap.rb | Library/Homebrew/cask/artifact/zap.rb | require "cask/artifact/abstract_uninstall"
module Cask
module Artifact
class Zap < AbstractUninstall
def zap_phase(**options)
dispatch_uninstall_directives(**options)
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/qlplugin.rb | Library/Homebrew/cask/artifact/qlplugin.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Qlplugin < Moved
def self.english_name
"QuickLook Plugin"
end
def install_phase(**options)
super(**options)
reload_quicklook(**options)
end
def uninstall_phase(**options)
super(**option... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/stage_only.rb | Library/Homebrew/cask/artifact/stage_only.rb | require "cask/artifact/abstract_artifact"
module Cask
module Artifact
class StageOnly < AbstractArtifact
def self.from_args(cask, *args)
if args != [true]
raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true")
end
new(cask)
end
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/uninstall.rb | Library/Homebrew/cask/artifact/uninstall.rb | require "cask/artifact/abstract_uninstall"
module Cask
module Artifact
class Uninstall < AbstractUninstall
def uninstall_phase(**options)
dispatch_uninstall_directives(**options)
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/font.rb | Library/Homebrew/cask/artifact/font.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Font < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/moved.rb | Library/Homebrew/cask/artifact/moved.rb | require "cask/artifact/relocated"
module Cask
module Artifact
class Moved < Relocated
def self.english_description
"#{english_name}s"
end
def install_phase(**options)
move(**options)
end
def uninstall_phase(**options)
move_back(**options)
end
d... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/abstract_flight_block.rb | Library/Homebrew/cask/artifact/abstract_flight_block.rb | require "cask/artifact/abstract_artifact"
module Cask
module Artifact
class AbstractFlightBlock < AbstractArtifact
def self.dsl_key
super.to_s.sub(/_block$/, "").to_sym
end
def self.uninstall_dsl_key
dsl_key.to_s.prepend("uninstall_").to_sym
end
attr_reader :direct... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/audio_unit_plugin.rb | Library/Homebrew/cask/artifact/audio_unit_plugin.rb | require "cask/artifact/moved"
module Cask
module Artifact
class AudioUnitPlugin < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/abstract_artifact.rb | Library/Homebrew/cask/artifact/abstract_artifact.rb | module Cask
module Artifact
class AbstractArtifact
include Comparable
extend Predicable
def self.english_name
@english_name ||= name.sub(/^.*:/, "").gsub(/(.)([A-Z])/, '\1 \2')
end
def self.english_article
@english_article ||= (english_name =~ /^[aeiou]/i) ? "an" : ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/preflight_block.rb | Library/Homebrew/cask/artifact/preflight_block.rb | require "cask/artifact/abstract_flight_block"
module Cask
module Artifact
class PreflightBlock < AbstractFlightBlock
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/app.rb | Library/Homebrew/cask/artifact/app.rb | require "cask/artifact/moved"
module Cask
module Artifact
class App < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/artifact.rb | Library/Homebrew/cask/artifact/artifact.rb | require "cask/artifact/moved"
require "extend/hash_validator"
using HashValidator
module Cask
module Artifact
class Artifact < Moved
def self.english_name
"Generic Artifact"
end
def self.from_args(cask, *args)
source_string, target_hash = args
if source_string.nil?
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/screen_saver.rb | Library/Homebrew/cask/artifact/screen_saver.rb | require "cask/artifact/moved"
module Cask
module Artifact
class ScreenSaver < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/dictionary.rb | Library/Homebrew/cask/artifact/dictionary.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Dictionary < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/internet_plugin.rb | Library/Homebrew/cask/artifact/internet_plugin.rb | require "cask/artifact/moved"
module Cask
module Artifact
class InternetPlugin < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/installer.rb | Library/Homebrew/cask/artifact/installer.rb | require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator
module Cask
module Artifact
class Installer < AbstractArtifact
VALID_KEYS = Set.new [
:manual,
:script,
]
module ManualInstaller
def install_phase(**)
puts <<~EOS
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/input_method.rb | Library/Homebrew/cask/artifact/input_method.rb | require "cask/artifact/moved"
module Cask
module Artifact
class InputMethod < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/prefpane.rb | Library/Homebrew/cask/artifact/prefpane.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Prefpane < Moved
def self.english_name
"Preference Pane"
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/postflight_block.rb | Library/Homebrew/cask/artifact/postflight_block.rb | require "cask/artifact/abstract_flight_block"
module Cask
module Artifact
class PostflightBlock < AbstractFlightBlock
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/service.rb | Library/Homebrew/cask/artifact/service.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Service < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/pkg.rb | Library/Homebrew/cask/artifact/pkg.rb | require "plist"
require "utils/user"
require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator
module Cask
module Artifact
class Pkg < AbstractArtifact
attr_reader :pkg_relative_path
def self.from_args(cask, path, **stanza_options)
stanza_options.assert_... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/vst3_plugin.rb | Library/Homebrew/cask/artifact/vst3_plugin.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Vst3Plugin < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/relocated.rb | Library/Homebrew/cask/artifact/relocated.rb | require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator
module Cask
module Artifact
class Relocated < AbstractArtifact
def self.from_args(cask, *args)
source_string, target_hash = args
if target_hash
raise CaskInvalidError unless target_hash... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/suite.rb | Library/Homebrew/cask/artifact/suite.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Suite < Moved
def self.english_name
"App Suite"
end
def self.dirmethod
:appdir
end
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/cask/artifact/colorpicker.rb | Library/Homebrew/cask/artifact/colorpicker.rb | require "cask/artifact/moved"
module Cask
module Artifact
class Colorpicker < Moved
end
end
end
| ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formula_installer_bottle_spec.rb | Library/Homebrew/test/formula_installer_bottle_spec.rb | require "formula"
require "formula_installer"
require "keg"
require "tab"
require "test/support/fixtures/testball"
require "test/support/fixtures/testball_bottle"
describe FormulaInstaller do
alias_matcher :pour_bottle, :be_pour_bottle
matcher :be_poured_from_bottle do
match(&:poured_from_bottle)
end
def... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formula_spec_selection_spec.rb | Library/Homebrew/test/formula_spec_selection_spec.rb | require "formula"
describe Formula do
describe "::new" do
it "selects stable by default" do
f = formula do
url "foo-1.0"
devel { url "foo-1.1a" }
head "foo"
end
expect(f).to be_stable
end
it "selects stable when exclusive" do
f = formula { url "foo-1.0" }... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/pathname_spec.rb | Library/Homebrew/test/pathname_spec.rb | require "extend/pathname"
require "install_renamed"
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"
touch [dir/".DS_Store", dir/"a-file"... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/linkage_cache_store_spec.rb | Library/Homebrew/test/linkage_cache_store_spec.rb | require "linkage_cache_store"
describe LinkageCacheStore do
subject { described_class.new(keg_name, database) }
let(:keg_name) { "keg_name" }
let(:database) { double("database") }
describe "#keg_exists?" do
context "`keg_name` exists in cache" do
before do
expect(database).to receive(:get).... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/requirement_spec.rb | Library/Homebrew/test/requirement_spec.rb | require "extend/ENV"
require "requirement"
describe Requirement do
alias_matcher :be_a_build_requirement, :be_a_build
subject { klass.new }
let(:klass) { Class.new(described_class) }
describe "#tags" do
subject { described_class.new(tags) }
context "single tag" do
let(:tags) { ["bar"] }
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/search_spec.rb | Library/Homebrew/test/search_spec.rb | require "search"
describe Homebrew::Search do
subject(:mod) { Object.new }
before do
mod.extend(described_class)
end
describe "#search_taps" do
before do
ENV.delete("HOMEBREW_NO_GITHUB_API")
end
it "does not raise if `HOMEBREW_NO_GITHUB_API` is set" do
ENV["HOMEBREW_NO_GITHUB_API... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/bottle_filename_spec.rb | Library/Homebrew/test/bottle_filename_spec.rb | require "formula"
require "software_spec"
describe Bottle::Filename do
subject { described_class.new(name, version, tag, rebuild) }
let(:name) { "user/repo/foo" }
let(:version) { "1.0" }
let(:tag) { :tag }
let(:rebuild) { 0 }
describe "#extname" do
its(:extname) { is_expected.to eq ".tag.bottle.tar.g... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/patching_spec.rb | Library/Homebrew/test/patching_spec.rb | require "formula"
describe "patching" do
TESTBALL_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz".freeze
TESTBALL_PATCHES_URL = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1-patches.tgz".freeze
PATCH_URL_A = "file://#{TEST_FIXTURE_DIR}/patches/noop-a.diff".freeze
PATCH_URL_B = "file://#{TEST_F... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/version_spec.rb | Library/Homebrew/test/version_spec.rb | require "version"
describe Version do
specify ".formula_optionally_versioned_regex" do
expect(described_class.formula_optionally_versioned_regex("foo")).to match("foo@1.2")
end
end
describe Version::Token do
specify "#inspect" do
expect(described_class.new("foo").inspect).to eq('#<Version::Token "foo">'... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/string_spec.rb | Library/Homebrew/test/string_spec.rb | require "extend/string"
describe StringInreplaceExtension do
subject { string.extend(described_class) }
let(:string) { "foobar" }
describe "#sub!" do
it "adds an error to #errors when no replacement was made" do
subject.sub! "not here", "test"
expect(subject.errors).to eq(['expected replacement... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dependencies_spec.rb | Library/Homebrew/test/dependencies_spec.rb | require "dependencies"
require "dependency"
describe Dependencies do
describe "#<<" do
it "returns itself" do
expect(subject << Dependency.new("foo")).to eq(subject)
end
it "preserves order" do
hash = { 0 => "foo", 1 => "bar", 2 => "baz" }
subject << Dependency.new(hash[0])
subj... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/inreplace_spec.rb | Library/Homebrew/test/inreplace_spec.rb | require "extend/string"
require "tempfile"
require "utils/inreplace"
describe StringInreplaceExtension do
subject { string.extend(described_class) }
describe "#change_make_var!" do
context "flag" do
context "with spaces" do
let(:string) do
<<~EOS
OTHER=def
FLAG ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/requirements_spec.rb | Library/Homebrew/test/requirements_spec.rb | require "requirements"
describe Requirements do
describe "#<<" do
it "returns itself" do
expect(subject << Object.new).to be(subject)
end
it "merges duplicate requirements" do
subject << X11Requirement.new << X11Requirement.new
expect(subject.count).to eq(1)
subject << Requiremen... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/searchable_spec.rb | Library/Homebrew/test/searchable_spec.rb | require "searchable"
describe Searchable do
subject { collection.extend(described_class) }
let(:collection) { ["with-dashes"] }
describe "#search" do
context "when given a block" do
let(:collection) { [["with-dashes", "withdashes"]] }
it "searches by the selected argument" do
expect(su... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dependency_spec.rb | Library/Homebrew/test/dependency_spec.rb | require "dependency"
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
dep = described_class.new("foo", %... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/caveats_spec.rb | Library/Homebrew/test/caveats_spec.rb | require "formula"
require "caveats"
describe Caveats do
subject { described_class.new(f) }
let(:f) { formula { url "foo-1.0" } }
specify "#f" do
expect(subject.f).to eq(f)
end
describe "#empty?" do
it "returns true if the Formula has no caveats" do
expect(subject).to be_empty
end
it... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/build_options_spec.rb | Library/Homebrew/test/build_options_spec.rb | require "build_options"
require "options"
describe BuildOptions do
alias_matcher :be_built_with, :be_with
alias_matcher :be_built_without, :be_without
subject { described_class.new(args, opts) }
let(:bad_build) { described_class.new(bad_args, opts) }
let(:args) { Options.create(%w[--with-foo --with-bar --w... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cli_parser_spec.rb | Library/Homebrew/test/cli_parser_spec.rb | require_relative "../cli_parser"
describe Homebrew::CLI::Parser do
describe "test switch options" do
subject(:parser) {
described_class.new do
switch :verbose, description: "Flag for verbosity"
switch "--more-verbose", description: "Flag for higher verbosity"
switch "--pry", env: :p... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/exceptions_spec.rb | Library/Homebrew/test/exceptions_spec.rb | require "exceptions"
describe MultipleVersionsInstalledError do
subject { described_class.new("foo") }
its(:to_s) { is_expected.to eq("foo has multiple installed versions") }
end
describe NoSuchKegError do
subject { described_class.new("foo") }
its(:to_s) { is_expected.to eq("No such keg: #{HOMEBREW_CELLAR}... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dependency_collector_spec.rb | Library/Homebrew/test/dependency_collector_spec.rb | require "dependency_collector"
describe DependencyCollector do
alias_matcher :be_a_build_requirement, :be_build
def find_dependency(name)
subject.deps.find { |dep| dep.name == name }
end
def find_requirement(klass)
subject.requirements.find { |req| req.is_a? klass }
end
after do
described_cl... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/ENV_spec.rb | Library/Homebrew/test/ENV_spec.rb | require "extend/ENV"
shared_examples EnvActivation do
subject { env.extend(described_class) }
let(:env) { {}.extend(EnvActivation) }
it "supports switching compilers" do
subject.clang
expect(subject["LD"]).to be nil
expect(subject["CC"]).to eq(subject["OBJC"])
end
describe "#with_build_environ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/tab_spec.rb | Library/Homebrew/test/tab_spec.rb | require "tab"
require "formula"
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_bottle == true
end
end
subject... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formula_validation_spec.rb | Library/Homebrew/test/formula_validation_spec.rb | require "formula"
describe Formula do
describe "::new" do
matcher :fail_with_invalid do |attr|
match do |actual|
expect {
begin
actual.call
rescue => e
expect(e.attr).to eq(attr)
raise e
end
}.to raise_error(FormulaValidation... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/deps_spec.rb | Library/Homebrew/test/deps_spec.rb | describe "brew deps", :integration_test do
before do
setup_test_formula "foo"
setup_test_formula "bar"
setup_test_formula "baz", <<~RUBY
url "https://brew.sh/baz-1.0"
depends_on "bar"
RUBY
end
it "outputs no dependencies for a Formula that has no dependencies" do
expect { brew "de... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cleaner_spec.rb | Library/Homebrew/test/cleaner_spec.rb | require "cleaner"
require "formula"
describe Cleaner do
include FileUtils
subject { described_class.new(f) }
let(:f) { formula("cleaner_test") { url "foo-1.0" } }
before do
f.prefix.mkpath
end
describe "#clean" do
it "cleans files" do
f.bin.mkpath
f.lib.mkpath
if OS.mac?
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/system_command_spec.rb | Library/Homebrew/test/system_command_spec.rb | describe SystemCommand do
describe "#initialize" do
subject(:command) {
described_class.new(
"env",
args: env_args,
env: env,
must_succeed: true,
sudo: sudo,
)
}
let(:env_args) { ["bash", "-c", 'printf "%s" "${A?}" "${B?}" "${C?... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/compiler_failure_spec.rb | Library/Homebrew/test/compiler_failure_spec.rb | require "compilers"
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(double("Compiler", name: :clang, version: 425))
end
it "can b... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/keg_spec.rb | Library/Homebrew/test/keg_spec.rb | require "keg"
require "stringio"
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 = described_class.new(path)
kegs << k... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dependable_spec.rb | Library/Homebrew/test/dependable_spec.rb | require "dependable"
describe Dependable do
alias_matcher :be_a_build_dependency, :be_build
subject { double(tags: tags).extend(described_class) }
let(:tags) { ["foo", "bar", :build] }
specify "#options" do
expect(subject.options.as_flags.sort).to eq(%w[--foo --bar].sort)
end
specify "#build?" do
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formula_spec.rb | Library/Homebrew/test/formula_spec.rb | require "test/support/fixtures/testball"
require "formula"
describe Formula do
alias_matcher :follow_installed_alias, :be_follow_installed_alias
alias_matcher :have_any_version_installed, :be_any_version_installed
alias_matcher :need_migration, :be_migration_needed
alias_matcher :have_changed_installed_alias_... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | true |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/emoji_spec.rb | Library/Homebrew/test/emoji_spec.rb | require "emoji"
describe Emoji do
describe "#install_badge" do
subject { described_class.install_badge }
before do
ENV.delete("HOMEBREW_INSTALL_BADGE")
end
it "returns 🍺 by default" do
expect(subject).to eq "🍺"
end
it "returns the contents of HOMEBREW_INSTALL_BADGE if set" d... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/patch_spec.rb | Library/Homebrew/test/patch_spec.rb | require "patch"
describe Patch do
describe "#create" do
context "simple patch" do
subject { described_class.create(:p2, nil) }
it { is_expected.to be_kind_of ExternalPatch }
it { is_expected.to be_external }
its(:strip) { is_expected.to eq(:p2) }
end
context "string patch" do
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/locale_spec.rb | Library/Homebrew/test/locale_spec.rb | require "locale"
describe Locale do
describe "::parse" do
it "parses a string in the correct format" do
expect(described_class.parse("zh")).to eql(described_class.new("zh", nil, nil))
expect(described_class.parse("zh-CN")).to eql(described_class.new("zh", "CN", nil))
expect(described_class.pars... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formulary_spec.rb | Library/Homebrew/test/formulary_spec.rb | require "formula"
require "formula_installer"
require "utils/bottles"
describe Formulary do
let(:formula_name) { "testball_bottle" }
let(:formula_path) { CoreTap.new.formula_dir/"#{formula_name}.rb" }
let(:formula_content) do
<<~RUBY
class #{described_class.class_s(formula_name)} < Formula
url ... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/utils_spec.rb | Library/Homebrew/test/utils_spec.rb | describe "globally-scoped helper methods" do
let(:dir) { mktmpdir }
def esc(code)
/(\e\[\d+m)*\e\[#{code}m/
end
describe "#ofail" do
it "sets Homebrew.failed to true" do
expect {
ofail "foo"
}.to output("Error: foo\n").to_stderr
expect(Homebrew).to have_failed
end
end
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/formatter_spec.rb | Library/Homebrew/test/formatter_spec.rb | require "utils/formatter"
require "utils/tty"
describe Formatter do
describe "::columns" do
subject { described_class.columns(input) }
let(:input) {
%w[
aa
bbb
ccc
dd
]
}
it "doesn't output columns if $stdout is not a TTY." do
allow_any_instance_of(... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/compiler_selector_spec.rb | Library/Homebrew/test/compiler_selector_spec.rb | require "compilers"
require "software_spec"
describe CompilerSelector do
subject { described_class.new(software_spec, versions, compilers) }
let(:compilers) { [:clang, :gcc_4_2, :gnu] }
let(:software_spec) { SoftwareSpec.new }
let(:cc) { :clang }
let(:versions) do
double(
gcc_4_2_build_version: Ve... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/software_spec_spec.rb | Library/Homebrew/test/software_spec_spec.rb | require "software_spec"
describe SoftwareSpec do
alias_matcher :have_defined_resource, :be_resource_defined
alias_matcher :have_defined_option, :be_option_defined
let(:owner) { double(name: "some_name", full_name: "some_name", tap: "homebrew/core") }
describe "#resource" do
it "defines a resource" do
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/checksum_spec.rb | Library/Homebrew/test/checksum_spec.rb | require "checksum"
describe Checksum do
describe "#empty?" do
subject { described_class.new(:sha256, "") }
it { is_expected.to be_empty }
end
describe "#==" do
subject { described_class.new(:sha256, TEST_SHA256) }
let(:other) { described_class.new(:sha256, TEST_SHA256) }
let(:other_reverse... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/description_cache_store_spec.rb | Library/Homebrew/test/description_cache_store_spec.rb | require "description_cache_store"
describe DescriptionCacheStore do
subject(:cache_store) { described_class.new(database) }
let(:database) { double("database") }
let(:formula_name) { "test_name" }
let(:description) { "test_description" }
describe "#update!" do
it "sets the formula description" do
... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/x11_requirement_spec.rb | Library/Homebrew/test/x11_requirement_spec.rb | require "requirements/x11_requirement"
describe X11Requirement do
let(:default_name) { "x11" }
describe "#name" do
it "defaults to x11" do
expect(subject.name).to eq(default_name)
end
end
describe "#eql?" do
it "returns true if the requirements are equal" do
other = described_class.ne... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/rubocop_spec.rb | Library/Homebrew/test/rubocop_spec.rb | require "open3"
describe "RuboCop" do
context "when calling `rubocop` outside of the Homebrew environment" do
before do
ENV.keys.each do |key|
ENV.delete(key) if key.start_with?("HOMEBREW_")
end
ENV["XDG_CACHE_HOME"] = "#{HOMEBREW_CACHE}/style"
end
it "loads all Formula cops w... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cxxstdlib_spec.rb | Library/Homebrew/test/cxxstdlib_spec.rb | require "formula"
require "cxxstdlib"
describe CxxStdlib do
let(:clang) { described_class.create(:libstdcxx, :clang) }
let(:gcc) { described_class.create(:libstdcxx, :gcc) }
let(:gcc42) { described_class.create(:libstdcxx, :gcc_4_2) }
let(:gcc6) { described_class.create(:libstdcxx, "gcc-6") }
let(:gcc7) { de... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/error_during_execution_spec.rb | Library/Homebrew/test/error_during_execution_spec.rb | describe ErrorDuringExecution do
subject(:error) { described_class.new(command, status: status, output: output) }
let(:command) { ["false"] }
let(:status) { instance_double(Process::Status, exitstatus: exitstatus) }
let(:exitstatus) { 1 }
let(:output) { nil }
describe "#initialize" do
it "fails when o... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/migrator_spec.rb | Library/Homebrew/test/migrator_spec.rb | require "migrator"
require "test/support/fixtures/testball"
require "tab"
require "keg"
describe Migrator do
subject { described_class.new(new_formula) }
let(:new_formula) { Testball.new("newname") }
let(:old_formula) { Testball.new("oldname") }
let(:new_keg_record) { HOMEBREW_CELLAR/"newname/0.1" }
let(:o... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/diagnostic_checks_spec.rb | Library/Homebrew/test/diagnostic_checks_spec.rb | require "diagnostic"
describe Homebrew::Diagnostic::Checks do
specify "#inject_file_list" do
expect(subject.inject_file_list([], "foo:\n")).to eq("foo:\n")
expect(subject.inject_file_list(%w[/a /b], "foo:\n")).to eq("foo:\n /a\n /b\n")
end
specify "#check_build_from_source" do
ENV["HOMEBREW_BUILD_... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/tap_spec.rb | Library/Homebrew/test/tap_spec.rb | describe Tap do
alias_matcher :have_formula_file, :be_formula_file
alias_matcher :have_custom_remote, :be_custom_remote
subject { described_class.new("Homebrew", "foo") }
let(:path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" }
let(:formula_file) { path/"Formula/foo.rb" }
let(:alias_file) { path/"Aliases... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Linuxbrew/brew | https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/lock_file_spec.rb | Library/Homebrew/test/lock_file_spec.rb | require "lock_file"
describe LockFile do
subject { described_class.new("foo") }
describe "#lock" do
it "does not raise an error when already locked" do
subject.lock
expect { subject.lock }.not_to raise_error
end
it "raises an error if a lock already exists" do
subject.lock
e... | ruby | BSD-2-Clause | 93389fde63974f096156344e281610acec44130c | 2026-01-04T15:53:38.399858Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.