source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/startup/config.rb | Ruby | bsd-2-clause | 47,751 | main | 3,466 | # typed: true
# frozen_string_literal: true
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"]
# The path to the executable that should be used to run `brew`.
# This may be HOMEBREW_ORIGINAL_BREW_FILE depending on the system configuration.
# Favour this instea... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/version/parser.rb | Ruby | bsd-2-clause | 47,751 | main | 1,581 | # typed: strict
# frozen_string_literal: true
class Version
class Parser
extend T::Helpers
abstract!
sig { abstract.params(spec: Pathname).returns(T.nilable(String)) }
def parse(spec); end
end
class RegexParser < Parser
extend T::Helpers
abstract!
sig { params(regex: Regexp, bloc... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/require.rb | Ruby | bsd-2-clause | 47,751 | main | 991 | # typed: strict
# frozen_string_literal: true
# These should not be made constants or Tapioca will think they are part of a gem.
dependency_require_map = {
"ruby-macho" => "macho",
}.freeze
additional_requires_map = {
"parser" => ["parser/current"],
"rubocop-rspec" => ["rubocop/rspec/expect_offense"],
}.... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/utils.rb | Ruby | bsd-2-clause | 47,751 | main | 1,521 | # typed: strict
# frozen_string_literal: true
module Homebrew
module Tapioca
module Utils
sig { params(klass: T::Class[T.anything]).returns(T::Module[T.anything]) }
def self.named_object_for(klass)
return klass if klass.name
attached_object = klass.attached_object
case attach... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/env_config.rb | Ruby | bsd-2-clause | 47,751 | main | 1,158 | # typed: strict
# frozen_string_literal: true
require_relative "../../../global"
require "env_config"
module Tapioca
module Compilers
class EnvConfig < Tapioca::Dsl::Compiler
ConstantType = type_member { { fixed: T::Module[T.anything] } }
sig { override.returns(T::Enumerable[T::Module[T.anything]])... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/tty.rb | Ruby | bsd-2-clause | 47,751 | main | 755 | # typed: strict
# frozen_string_literal: true
require_relative "../../../global"
require "utils/tty"
module Tapioca
module Compilers
class Tty < Tapioca::Dsl::Compiler
ConstantType = type_member { { fixed: T::Module[T.anything] } }
sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/api_structs.rb | Ruby | bsd-2-clause | 47,751 | main | 764 | # typed: strict
# frozen_string_literal: true
require_relative "../../../global"
require "api/formula_struct"
require "api/cask_struct"
module Tapioca
module Compilers
class ApiStructs < Tapioca::Dsl::Compiler
ConstantType = type_member { { fixed: T.class_of(T::Struct) } }
sig { override.returns(T:... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb | Ruby | bsd-2-clause | 47,751 | main | 2,841 | # typed: strict
# frozen_string_literal: true
require_relative "../../../global"
require "sorbet/tapioca/utils"
require "utils/ast"
module Tapioca
module Compilers
class Forwardables < Tapioca::Dsl::Compiler
FORWARDABLE_FILENAME = "forwardable.rb"
ARRAY_METHODS = T.let(["to_a", "to_ary"].freeze, T::... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/args.rb | Ruby | bsd-2-clause | 47,751 | main | 2,863 | # typed: strict
# frozen_string_literal: true
require_relative "../../../global"
require "cli/parser"
module Tapioca
module Compilers
class Args < Tapioca::Dsl::Compiler
GLOBAL_OPTIONS = T.let(
Homebrew::CLI::Parser.global_options.map do |short_option, long_option, _|
[short_option, long... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/rubocop_cask_ast_stanza.rb | Ruby | bsd-2-clause | 47,751 | main | 729 | # typed: strict
# frozen_string_literal: true
require "method_source"
require "rubocop"
require_relative "../../../rubocops"
module Tapioca
module Compilers
class Stanza < Tapioca::Dsl::Compiler
ConstantType = type_member { { fixed: T::Module[T.anything] } }
sig { override.returns(T::Enumerable[T::... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb | Ruby | bsd-2-clause | 47,751 | main | 2,921 | # typed: strict
# frozen_string_literal: true
require "method_source"
require "rubocop"
require_relative "../../../rubocops"
module Tapioca
module Compilers
class RuboCop < Tapioca::Dsl::Compiler
# This should be a module whose singleton class contains RuboCop::AST::NodePattern::Macros,
# but I do... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/sorbet/tapioca/compilers/cask/config.rb | Ruby | bsd-2-clause | 47,751 | main | 1,087 | # typed: strict
# frozen_string_literal: true
require_relative "../../../../global"
require "cask/config"
module Tapioca
module Compilers
class CaskConfig < Tapioca::Dsl::Compiler
ConstantType = type_member { { fixed: T::Module[T.anything] } }
sig { override.returns(T::Enumerable[T::Module[T.anythi... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/cli.rb | Ruby | bsd-2-clause | 47,751 | main | 15,047 | # typed: strict
# frozen_string_literal: true
require "services/formula_wrapper"
require "fileutils"
require "utils/output"
module Homebrew
module Services
module Cli
extend FileUtils
extend Utils::Output::Mixin
sig { returns(T.nilable(String)) }
def self.sudo_service_user
@sudo... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/formulae.rb | Ruby | bsd-2-clause | 47,751 | main | 1,073 | # typed: strict
# frozen_string_literal: true
require "services/formula_wrapper"
module Homebrew
module Services
module Formulae
# All available services, with optional filters applied
# @private
sig { params(loaded: T.nilable(T::Boolean), skip_root: T::Boolean).returns(T::Array[Services::Form... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/formula_wrapper.rb | Ruby | bsd-2-clause | 47,751 | main | 12,224 | # typed: strict
# frozen_string_literal: true
require "utils/output"
# Wrapper for a formula to handle service-related stuff like parsing and
# generating the service/plist files.
module Homebrew
module Services
class FormulaWrapper
include Utils::Output::Mixin
# Access the `Formula` instance.
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/system.rb | Ruby | bsd-2-clause | 47,751 | main | 3,901 | # typed: strict
# frozen_string_literal: true
require_relative "system/systemctl"
require "utils/output"
module Homebrew
module Services
module System
extend Utils::Output::Mixin
LAUNCHCTL_DOMAIN_ACTION_NOT_SUPPORTED = 125
MISSING_DAEMON_MANAGER_EXCEPTION_MESSAGE = "`brew services` is support... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/stop.rb | Ruby | bsd-2-clause | 47,751 | main | 688 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Stop
TRIGGERS = %w[stop unload terminate term t u].freeze
sig {
params(
targets: T::Array[Services::FormulaWrapper],
verbose: T::... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/restart.rb | Ruby | bsd-2-clause | 47,751 | main | 1,372 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Restart
# NOTE: The restart command is used to update service files
# after a package gets updated through `brew upgrade`.
# This works by removing the old fi... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/info.rb | Ruby | bsd-2-clause | 47,751 | main | 2,417 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Info
TRIGGERS = %w[info i].freeze
sig {
params(
targets: T::Array[Services::FormulaWrapper],
verbose: T::Boolean,
json:... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/kill.rb | Ruby | bsd-2-clause | 47,751 | main | 443 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Kill
TRIGGERS = %w[kill k].freeze
sig { params(targets: T::Array[Services::FormulaWrapper], verbose: T::Boolean).void }
def self.run(targets, verbose:)
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/start.rb | Ruby | bsd-2-clause | 47,751 | main | 598 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Start
TRIGGERS = %w[start launch load s l].freeze
sig {
params(
targets: T::Array[Services::FormulaWrapper],
custom_plist: T.n... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/run.rb | Ruby | bsd-2-clause | 47,751 | main | 576 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Run
TRIGGERS = ["run"].freeze
sig {
params(
targets: T::Array[Services::FormulaWrapper],
custom_plist: T.nilable(String),
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/cleanup.rb | Ruby | bsd-2-clause | 47,751 | main | 536 | # typed: strict
# frozen_string_literal: true
require "services/cli"
module Homebrew
module Services
module Commands
module Cleanup
TRIGGERS = %w[cleanup clean cl rm].freeze
sig { void }
def self.run
cleaned = []
cleaned += Services::Cli.kill_orphaned_services... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/commands/list.rb | Ruby | bsd-2-clause | 47,751 | main | 3,402 | # typed: strict
# frozen_string_literal: true
require "services/cli"
require "services/formulae"
require "utils/output"
module Homebrew
module Services
module Commands
module List
extend Utils::Output::Mixin
TRIGGERS = T.let([nil, "list", "ls"].freeze, T::Array[T.nilable(String)])
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/services/system/systemctl.rb | Ruby | bsd-2-clause | 47,751 | main | 1,713 | # typed: strict
# frozen_string_literal: true
module Homebrew
module Services
module System
module Systemctl
sig { returns(T.nilable(Pathname)) }
def self.executable
@executable ||= T.let(which("systemctl"), T.nilable(Pathname))
end
sig { void }
def self.r... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/cli/parser.rb | Ruby | bsd-2-clause | 47,751 | main | 27,149 | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "env_config"
require "cask/config"
require "cli/args"
require "cli/error"
require "commands"
require "optparse"
require "utils/tty"
require "utils/formatter"
require "utils/output"
module Homebrew
module CLI
class Parser
incl... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/cli/error.rb | Ruby | bsd-2-clause | 47,751 | main | 2,621 | # typed: strict
# frozen_string_literal: true
require "utils/formatter"
module Homebrew
module CLI
class OptionConstraintError < UsageError
sig { params(arg1: String, arg2: String, missing: T::Boolean).void }
def initialize(arg1, arg2, missing: false)
message = if missing
"`#{arg2}... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/cli/named_args.rb | Ruby | bsd-2-clause | 47,751 | main | 21,939 | # typed: strict
# frozen_string_literal: true
require "cli/args"
require "utils"
require "utils/output"
module Homebrew
module CLI
# Helper class for loading formulae/casks from named arguments.
class NamedArgs < Array
include Utils::Output::Mixin
extend T::Generic
Elem = type_member(:out... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/cli/args.rb | Ruby | bsd-2-clause | 47,751 | main | 5,728 | # typed: strict
# frozen_string_literal: true
module Homebrew
module CLI
class Args
# Represents a processed option. The array elements are:
# 0: short option name (e.g. "-d")
# 1: long option name (e.g. "--debug")
# 2: option description (e.g. "Print debugging information")
#... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/manpages/converter/kramdown.rb | Ruby | bsd-2-clause | 47,751 | main | 1,089 | # typed: strict
# frozen_string_literal: true
require "kramdown/converter/kramdown"
module Homebrew
module Manpages
module Converter
# Converts our Kramdown-like input to pure Kramdown.
class Kramdown < ::Kramdown::Converter::Kramdown
sig { override.params(root: ::Kramdown::Element, options:... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/manpages/converter/roff.rb | Ruby | bsd-2-clause | 47,751 | main | 2,023 | # typed: strict
# frozen_string_literal: true
require "kramdown/converter/man"
module Homebrew
module Manpages
module Converter
# Converts our Kramdown-like input to roff.
class Roff < ::Kramdown::Converter::Man
# Override that adds Homebrew metadata for the top level header
# and do... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/manpages/parser/ronn.rb | Ruby | bsd-2-clause | 47,751 | main | 1,971 | # typed: strict
# frozen_string_literal: true
require "kramdown/parser/kramdown"
module Homebrew
module Manpages
module Parser
# Kramdown parser with compatibility for ronn variable syntax.
class Ronn < ::Kramdown::Parser::Kramdown
sig { params(source: String, options: T::Hash[Symbol, T.unty... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/options.rb | Ruby | bsd-2-clause | 47,751 | main | 4,213 | # typed: strong
# frozen_string_literal: true
module Homebrew
module Livecheck
# Options to modify livecheck's behavior. These primarily come from
# `livecheck` blocks but they can also be set by livecheck at runtime.
#
# Option values use a `nil` default to indicate that the value has not been
#... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy.rb | Ruby | bsd-2-clause | 47,751 | main | 13,554 | # typed: strict
# frozen_string_literal: true
require "utils/curl"
require "livecheck/options"
module Homebrew
module Livecheck
# The `Livecheck::Strategy` module contains the various strategies as well
# as some general-purpose methods for working with them. Within the context
# of the `brew livecheck`... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategic.rb | Ruby | bsd-2-clause | 47,751 | main | 1,309 | # typed: strong
# frozen_string_literal: true
module Homebrew
module Livecheck
# The interface for livecheck strategies. Because third-party strategies
# are not required to extend this module, we do not provide any default
# method implementations here.
module Strategic
extend T::Helpers
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/livecheck_version.rb | Ruby | bsd-2-clause | 47,751 | main | 1,638 | # typed: strict
# frozen_string_literal: true
module Homebrew
module Livecheck
# A formula or cask version, split into its component sub-versions.
class LivecheckVersion
include Comparable
sig {
params(package_or_resource: T.any(Formula, Cask::Cask, Resource), version: Version).returns(L... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/skip_conditions.rb | Ruby | bsd-2-clause | 47,751 | main | 11,935 | # typed: strict
# frozen_string_literal: true
module Homebrew
module Livecheck
# The `Livecheck::SkipConditions` module primarily contains methods that
# check for various formula/cask/resource conditions where a check should be skipped.
module SkipConditions
sig {
params(
package... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/constants.rb | Ruby | bsd-2-clause | 47,751 | main | 457 | # typed: strict
# frozen_string_literal: true
module Homebrew
module Livecheck
# The {Constants} module provides constants that are intended to be used
# in `livecheck` block values (e.g. `url`, `regex`).
module Constants
# A placeholder string used in resource `livecheck` block URLs that will
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/livecheck.rb | Ruby | bsd-2-clause | 47,751 | main | 47,836 | # typed: strict
# frozen_string_literal: true
require "livecheck/constants"
require "livecheck/error"
require "livecheck/livecheck_version"
require "livecheck/skip_conditions"
require "livecheck/strategy"
require "formula_versions"
require "addressable"
require "utils/git"
require "utils/output"
module Homebrew
# T... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/launchpad.rb | Ruby | bsd-2-clause | 47,751 | main | 3,575 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Launchpad} strategy identifies versions of software at
# launchpad.net by checking the main page for a project.
#
# Launchpad URLs take a variety of formats... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/bitbucket.rb | Ruby | bsd-2-clause | 47,751 | main | 4,964 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Bitbucket} strategy identifies versions of software at
# bitbucket.org by checking a repository's available downloads.
#
# Bitbucket URLs generally take one... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/hackage.rb | Ruby | bsd-2-clause | 47,751 | main | 3,771 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Hackage} strategy identifies versions of software at
# hackage.haskell.org by checking directory listing pages.
#
# Hackage URLs take one of the following f... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/github_latest.rb | Ruby | bsd-2-clause | 47,751 | main | 4,377 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {GithubLatest} strategy identifies versions of software at
# github.com by checking a repository's "latest" release using the
# GitHub API.
#
# GitHub ... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/gnome.rb | Ruby | bsd-2-clause | 47,751 | main | 4,369 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Gnome} strategy identifies versions of software at gnome.org by
# checking the available downloads found in a project's `cache.json`
# file.
#
# GNOME... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/yaml.rb | Ruby | bsd-2-clause | 47,751 | main | 4,926 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Yaml} strategy fetches content at a URL, parses it as YAML and
# provides the parsed data to a `strategy` block. If a regex is present
# in the `livecheck` block,... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/xml.rb | Ruby | bsd-2-clause | 47,751 | main | 6,790 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Xml} strategy fetches content at a URL, parses it as XML using
# `REXML` and provides the `REXML::Document` to a `strategy` block.
# If a regex is present in the ... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/electron_builder.rb | Ruby | bsd-2-clause | 47,751 | main | 2,241 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {ElectronBuilder} strategy fetches content at a URL and parses it
# as an electron-builder appcast in YAML format.
#
# This strategy is not applied automatic... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/header_match.rb | Ruby | bsd-2-clause | 47,751 | main | 4,028 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {HeaderMatch} strategy follows all URL redirections and scans
# the resulting headers for matching text using the provided regex.
#
# This strategy is not ap... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/extract_plist.rb | Ruby | bsd-2-clause | 47,751 | main | 7,515 | # typed: strict
# frozen_string_literal: true
require "bundle_version"
require "livecheck/strategic"
require "unversioned_cask_checker"
module Homebrew
module Livecheck
module Strategy
# The {ExtractPlist} strategy downloads the file at a URL and extracts
# versions from contained `.plist` files usi... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/sparkle.rb | Ruby | bsd-2-clause | 47,751 | main | 9,329 | # typed: strict
# frozen_string_literal: true
require "bundle_version"
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Sparkle} strategy fetches content at a URL and parses it as a
# Sparkle appcast in XML format.
#
# This strategy is not applied aut... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/cpan.rb | Ruby | bsd-2-clause | 47,751 | main | 3,816 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Cpan} strategy identifies versions of software at
# cpan.metacpan.org by checking directory listing pages.
#
# CPAN URLs take the following formats:
#... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/npm.rb | Ruby | bsd-2-clause | 47,751 | main | 3,527 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Npm} strategy identifies versions of software at
# registry.npmjs.org by checking the latest version for a package.
#
# npm URLs take one of the following f... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/xorg.rb | Ruby | bsd-2-clause | 47,751 | main | 6,315 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Xorg} strategy identifies versions of software at x.org by
# checking directory listing pages.
#
# X.Org URLs take one of the following formats, among sever... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/json.rb | Ruby | bsd-2-clause | 47,751 | main | 4,936 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Json} strategy fetches content at a URL, parses it as JSON and
# provides the parsed data to a `strategy` block. If a regex is present
# in the `livecheck` block,... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/pypi.rb | Ruby | bsd-2-clause | 47,751 | main | 3,887 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Pypi} strategy identifies the newest version of a PyPI package by
# checking the JSON API endpoint for the project and using the
# `info.version` field from the r... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/crate.rb | Ruby | bsd-2-clause | 47,751 | main | 4,069 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Crate} strategy identifies versions of a Rust crate by checking
# the information from the `versions` API endpoint.
#
# Crate URLs have the following format... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/apache.rb | Ruby | bsd-2-clause | 47,751 | main | 4,547 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Apache} strategy identifies versions of software at apache.org
# by checking directory listing pages.
#
# Most Apache URLs start with `https://www.apache.or... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/sourceforge.rb | Ruby | bsd-2-clause | 47,751 | main | 4,545 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Sourceforge} strategy identifies versions of software at
# sourceforge.net by checking a project's RSS feed.
#
# SourceForge URLs take a few different forma... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/page_match.rb | Ruby | bsd-2-clause | 47,751 | main | 4,192 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {PageMatch} strategy fetches content at a URL and scans it for
# matching text using the provided regex.
#
# This strategy can be used in a `livecheck` block... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/github_releases.rb | Ruby | bsd-2-clause | 47,751 | main | 6,038 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {GithubReleases} strategy identifies versions of software at
# github.com by checking a repository's recent releases using the
# GitHub API.
#
# GitHub... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/gnu.rb | Ruby | bsd-2-clause | 47,751 | main | 4,338 | # typed: strict
# frozen_string_literal: true
require "livecheck/strategic"
module Homebrew
module Livecheck
module Strategy
# The {Gnu} strategy identifies versions of software at gnu.org by
# checking directory listing pages.
#
# GNU URLs use a variety of formats:
#
# * Arc... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/livecheck/strategy/git.rb | Ruby | bsd-2-clause | 47,751 | main | 8,137 | # typed: strict
# frozen_string_literal: true
require "addressable"
require "livecheck/strategic"
require "system_command"
module Homebrew
module Livecheck
module Strategy
# The {Git} strategy identifies versions of software in a Git repository
# by checking the tags using `git ls-remote --tags`.
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/subversion.rb | Ruby | bsd-2-clause | 47,751 | main | 687 | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Subversion repositories.
class Subversion < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".svn").directory?... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/bzip2.rb | Ruby | bsd-2-clause | 47,751 | main | 813 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking bzip2 archives.
class Bzip2
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".bz2"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/tar.rb | Ruby | bsd-2-clause | 47,751 | main | 2,021 | # typed: strict
# frozen_string_literal: true
require "system_command"
module UnpackStrategy
# Strategy for unpacking tar archives.
class Tar
include UnpackStrategy
extend SystemCommand::Mixin
sig { override.returns(T::Array[String]) }
def self.extensions
[
".tar",
".tbz", "... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/lha.rb | Ruby | bsd-2-clause | 47,751 | main | 997 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking LHa archives.
class Lha
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lha", ".lzh"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/mercurial.rb | Ruby | bsd-2-clause | 47,751 | main | 780 | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Mercurial repositories.
class Mercurial < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".hg").directory?)
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/ttf.rb | Ruby | bsd-2-clause | 47,751 | main | 551 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking TrueType fonts.
class Ttf < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".ttc", ".ttf"]
end
sig { override.params(path: Pathname).ret... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/self_extracting_executable.rb | Ruby | bsd-2-clause | 47,751 | main | 510 | # typed: strict
# frozen_string_literal: true
require_relative "generic_unar"
module UnpackStrategy
# Strategy for unpacking self-extracting executables.
class SelfExtractingExecutable < GenericUnar
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/zstd.rb | Ruby | bsd-2-clause | 47,751 | main | 1,089 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking zstd archives.
class Zstd
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".zst"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def s... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/compress.rb | Ruby | bsd-2-clause | 47,751 | main | 415 | # typed: strict
# frozen_string_literal: true
require_relative "tar"
module UnpackStrategy
# Strategy for unpacking compress archives.
class Compress < Tar
sig { override.returns(T::Array[String]) }
def self.extensions
[".Z"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/xar.rb | Ruby | bsd-2-clause | 47,751 | main | 704 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking xar archives.
class Xar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".xar"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/lzip.rb | Ruby | bsd-2-clause | 47,751 | main | 1,061 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking lzip archives.
class Lzip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def se... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/cvs.rb | Ruby | bsd-2-clause | 47,751 | main | 325 | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking CVS repositories.
class Cvs < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/"CVS").directory?)
end
end... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/directory.rb | Ruby | bsd-2-clause | 47,751 | main | 2,440 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking directories.
class Directory
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def self... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/air.rb | Ruby | bsd-2-clause | 47,751 | main | 1,211 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking Adobe Air archives.
class Air
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".air"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
d... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/fossil.rb | Ruby | bsd-2-clause | 47,751 | main | 1,264 | # typed: strict
# frozen_string_literal: true
require "system_command"
module UnpackStrategy
# Strategy for unpacking Fossil repositories.
class Fossil
include UnpackStrategy
extend SystemCommand::Mixin
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { ove... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/uncompressed.rb | Ruby | bsd-2-clause | 47,751 | main | 1,036 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking uncompressed files.
class Uncompressed
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions = []
sig { override.params(_path: Pathname).returns(T::Boolean) }
def self.... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/executable.rb | Ruby | bsd-2-clause | 47,751 | main | 484 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking executables.
class Executable < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".sh", ".bash"]
end
sig { override.params(path: Pathname)... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/lua_rock.rb | Ruby | bsd-2-clause | 47,751 | main | 547 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking LuaRock archives.
class LuaRock < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".rock"]
end
sig { override.params(path: Pathname).retu... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/zip.rb | Ruby | bsd-2-clause | 47,751 | main | 1,413 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking ZIP archives.
class Zip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".zip"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/microsoft_office_xml.rb | Ruby | bsd-2-clause | 47,751 | main | 737 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking Microsoft Office documents.
class MicrosoftOfficeXml < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[
".doc", ".docx",
".ppt", "... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/sit.rb | Ruby | bsd-2-clause | 47,751 | main | 427 | # typed: strict
# frozen_string_literal: true
require_relative "generic_unar"
module UnpackStrategy
# Strategy for unpacking Stuffit archives.
class Sit < GenericUnar
sig { override.returns(T::Array[String]) }
def self.extensions
[".sit"]
end
sig { override.params(path: Pathname).returns(T:... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/jar.rb | Ruby | bsd-2-clause | 47,751 | main | 537 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking Java archives.
class Jar < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".apk", ".jar"]
end
sig { override.params(path: Pathname).retu... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/cab.rb | Ruby | bsd-2-clause | 47,751 | main | 955 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking Cabinet archives.
class Cab
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".cab"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/gzip.rb | Ruby | bsd-2-clause | 47,751 | main | 826 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking gzip archives.
class Gzip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".gz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def se... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/generic_unar.rb | Ruby | bsd-2-clause | 47,751 | main | 1,062 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking archives with `unar`.
class GenericUnar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[]
end
sig { override.params(_path: Pathname).returns(T::Boolean) }
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/p7zip.rb | Ruby | bsd-2-clause | 47,751 | main | 986 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking P7ZIP archives.
class P7Zip
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".7z"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def ... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/pax.rb | Ruby | bsd-2-clause | 47,751 | main | 696 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking pax archives.
class Pax
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".pax"]
end
sig { override.params(_path: Pathname).returns(T::Boolean) }
def se... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/dmg.rb | Ruby | bsd-2-clause | 47,751 | main | 8,253 | # typed: strict
# frozen_string_literal: true
require "tempfile"
require "system_command"
require "utils/output"
module UnpackStrategy
# Strategy for unpacking disk images.
class Dmg
extend SystemCommand::Mixin
include UnpackStrategy
# Helper module for listing the contents of a volume mounted from a... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/xz.rb | Ruby | bsd-2-clause | 47,751 | main | 1,068 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking xz archives.
class Xz
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".xz"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.c... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/pkg.rb | Ruby | bsd-2-clause | 47,751 | main | 508 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking macOS package installers.
class Pkg < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".pkg", ".mkpg"]
end
sig { override.params(path: Pa... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/rar.rb | Ruby | bsd-2-clause | 47,751 | main | 965 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking RAR archives.
class Rar
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".rar"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def sel... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/git.rb | Ruby | bsd-2-clause | 47,751 | main | 326 | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Git repositories.
class Git < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".git").directory?)
end
en... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/bazaar.rb | Ruby | bsd-2-clause | 47,751 | main | 658 | # typed: strict
# frozen_string_literal: true
require_relative "directory"
module UnpackStrategy
# Strategy for unpacking Bazaar archives.
class Bazaar < Directory
sig { override.params(path: Pathname).returns(T::Boolean) }
def self.can_extract?(path)
!!(super && (path/".bzr").directory?)
end
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/lzma.rb | Ruby | bsd-2-clause | 47,751 | main | 1,075 | # typed: strict
# frozen_string_literal: true
module UnpackStrategy
# Strategy for unpacking LZMA archives.
class Lzma
include UnpackStrategy
sig { override.returns(T::Array[String]) }
def self.extensions
[".lzma"]
end
sig { override.params(path: Pathname).returns(T::Boolean) }
def ... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/unpack_strategy/otf.rb | Ruby | bsd-2-clause | 47,751 | main | 423 | # typed: strict
# frozen_string_literal: true
require_relative "uncompressed"
module UnpackStrategy
# Strategy for unpacking OpenType fonts.
class Otf < Uncompressed
sig { override.returns(T::Array[String]) }
def self.extensions
[".otf"]
end
sig { override.params(path: Pathname).returns(T::... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/dev-cmd/generate-cask-api.rb | Ruby | bsd-2-clause | 47,751 | main | 3,391 | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "cask/cask"
require "fileutils"
require "formula"
module Homebrew
module DevCmd
class GenerateCaskApi < AbstractCommand
CASK_JSON_TEMPLATE = <<~EOS
---
layout: cask_json
---
{{ content }}
... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/dev-cmd/linkage.rb | Ruby | bsd-2-clause | 47,751 | main | 2,380 | # typed: strict
# frozen_string_literal: true
require "abstract_command"
require "cache_store"
require "linkage_checker"
module Homebrew
module DevCmd
class Linkage < AbstractCommand
cmd_args do
description <<~EOS
Check the library links from the given <formula> kegs. If no <formula> are... |
github | Homebrew/brew | https://github.com/Homebrew/brew | Library/Homebrew/dev-cmd/contributions.rb | Ruby | bsd-2-clause | 47,751 | main | 12,291 | # typed: strict
# frozen_string_literal: true
require "abstract_command"
module Homebrew
module DevCmd
class Contributions < AbstractCommand
PRIMARY_REPOS = T.let(%w[
Homebrew/brew
Homebrew/homebrew-core
Homebrew/homebrew-cask
].freeze, T::Array[String])
CONTRIBUTION_TY... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.