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
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/dangerfile_dsl.rb
lib/danger/danger_core/dangerfile_dsl.rb
# frozen_string_literal: true module Danger class Dangerfile # Anything inside this module is considered public API, and in the future # documentation will be generated from it via rdoc. module DSL # @!group Danger Zone # Provides access to the raw Travis/Circle/Buildkite/GitHub objects, whi...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/dangerfile.rb
lib/danger/danger_core/dangerfile.rb
# frozen_string_literal: true # So much was ripped direct from CocoaPods-Core - thanks! require "danger/danger_core/dangerfile_dsl" require "danger/danger_core/standard_error" require "danger/danger_core/message_aggregator" require "danger/danger_core/plugins/dangerfile_messaging_plugin" require "danger/danger_core/...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/executor.rb
lib/danger/danger_core/executor.rb
# frozen_string_literal: true module Danger class Executor def initialize(system_env) @system_env = system_env end def run(env: nil, dm: nil, cork: nil, base: nil, head: nil, dangerfile_path: nil, danger_id: nil, n...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/messages/base.rb
lib/danger/danger_core/messages/base.rb
# frozen_string_literal: true module Danger class BaseMessage attr_accessor :message, :file, :line, :type def initialize(type:, message:, file: nil, line: nil) @type = type @message = message @file = file @line = line end def compare_by_file_and_line(other) order = cmp...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/messages/markdown.rb
lib/danger/danger_core/messages/markdown.rb
# frozen_string_literal: true require "danger/danger_core/messages/base" module Danger class Markdown < BaseMessage def initialize(message, file = nil, line = nil) super(type: :markdown, message: message, file: file, line: line) end def ==(other) return false if other.nil? return fals...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/messages/violation.rb
lib/danger/danger_core/messages/violation.rb
# frozen_string_literal: true require "danger/danger_core/messages/base" module Danger class Violation < BaseMessage VALID_TYPES = %I[error warning message].freeze attr_accessor :sticky def initialize(message, sticky, file = nil, line = nil, type: :warning) raise ArgumentError unless VALID_TYPES....
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_github_plugin.rb
lib/danger/danger_core/plugins/dangerfile_github_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # Handles interacting with GitHub inside a Dangerfile. Provides a few functions which wrap `pr_json` and also # through a few standard functions to simplify your code. # # @example Warn when a PR is classed as work in progress ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_git_plugin.rb
lib/danger/danger_core/plugins/dangerfile_git_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" require "danger/core_ext/file_list" # Danger module Danger # Handles interacting with git inside a Dangerfile. Providing access to files that have changed, and useful statistics. Also provides # access to the commits in the form of [Git::Log](ht...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_gitlab_plugin.rb
lib/danger/danger_core/plugins/dangerfile_gitlab_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # Handles interacting with GitLab inside a Dangerfile. Provides a few functions which wrap `mr_json` and also # through a few standard functions to simplify your code. # # @example Warn when an MR is classed as work in progress...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb
lib/danger/danger_core/plugins/dangerfile_local_only_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" # Danger module Danger # Handles interacting with local only plugin inside a Dangerfile. # It is support plugin for dry_run command and does not expose any methods. # But you can still use other plugins like git # # @example Check that add...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_danger_plugin.rb
lib/danger/danger_core/plugins/dangerfile_danger_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # A way to interact with Danger herself. Offering APIs to import plugins, # and Dangerfiles from multiple sources. # # @example Import a plugin available over HTTP # # device_grid = "https://raw.githubusercontent.c...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_vsts_plugin.rb
lib/danger/danger_core/plugins/dangerfile_vsts_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # Handles interacting with VSTS inside a Dangerfile. Provides a few functions which wrap `pr_json` and also # through a few standard functions to simplify your code. # # @example Warn when a PR is classed as work in progress ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_bitbucket_cloud_plugin.rb
lib/danger/danger_core/plugins/dangerfile_bitbucket_cloud_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # Handles interacting with Bitbucket Cloud inside a Dangerfile. Provides a few functions which wrap `pr_json` and also # through a few standard functions to simplify your code. # # @example Warn when a PR is classed as work in ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_bitbucket_server_plugin.rb
lib/danger/danger_core/plugins/dangerfile_bitbucket_server_plugin.rb
# frozen_string_literal: true require "danger/plugin_support/plugin" module Danger # Handles interacting with Bitbucket Server inside a Dangerfile. Provides a few functions which wrap `pr_json` and also # through a few standard functions to simplify your code. # # @example Warn when a PR is classed as work in...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
lib/danger/danger_core/plugins/dangerfile_messaging_plugin.rb
# frozen_string_literal: true require "danger/danger_core/messages/violation" require "danger/danger_core/messages/markdown" require "danger/plugin_support/plugin" module Danger # Provides the feedback mechanism for Danger. Danger can keep track of # messages, warnings, failure and post arbitrary markdown into a ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/clients/rubygems_client.rb
lib/danger/clients/rubygems_client.rb
# frozen_string_literal: true module Danger class RubyGemsClient API_URL = "https://rubygems.org/api/v1/versions/danger/latest.json" DUMMY_VERSION = "0.0.0" def self.latest_danger_version require "json" json = JSON.parse(Faraday.get(API_URL).body) json.fetch("version") { DUMMY_VERSION ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/local_only.rb
lib/danger/request_sources/local_only.rb
# frozen_string_literal: true require "danger/helpers/comments_helper" require "danger/helpers/comment" module Danger module RequestSources class LocalOnly < RequestSource include Danger::Helpers::CommentsHelper attr_accessor :mr_json, :commits_json def self.env_vars ["DANGER_LOCAL_ON...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/vsts.rb
lib/danger/request_sources/vsts.rb
# frozen_string_literal: true require "danger/helpers/comments_helper" require "danger/request_sources/vsts_api" module Danger module RequestSources class VSTS < RequestSource include Danger::Helpers::CommentsHelper attr_accessor :pr_json def self.env_vars [ "DANGER_VSTS_API...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/bitbucket_cloud_api.rb
lib/danger/request_sources/bitbucket_cloud_api.rb
# frozen_string_literal: true require "danger/helpers/comments_helper" module Danger module RequestSources class BitbucketCloudAPI attr_accessor :host, :project, :slug, :access_token, :pull_request_id attr_reader :my_uuid def initialize(repo_slug, pull_request_id, branch_name, environment) ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/gitlab.rb
lib/danger/request_sources/gitlab.rb
# frozen_string_literal: true require "uri" require "danger/helpers/comments_helper" require "danger/helpers/comment" require "danger/request_sources/support/get_ignored_violation" module Danger module RequestSources class GitLab < RequestSource include Danger::Helpers::CommentsHelper attr_accessor ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/bitbucket_server_api.rb
lib/danger/request_sources/bitbucket_server_api.rb
# frozen_string_literal: true require "openssl" require "danger/helpers/comments_helper" module Danger module RequestSources class BitbucketServerAPI attr_accessor :host, :verify_ssl, :pr_api_endpoint, :key, :project def initialize(project, slug, pull_request_id, environment) @username = en...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/bitbucket_server.rb
lib/danger/request_sources/bitbucket_server.rb
# frozen_string_literal: true require "danger/helpers/comments_helper" require "danger/request_sources/bitbucket_server_api" require "danger/request_sources/code_insights_api" require_relative "request_source" module Danger module RequestSources class BitbucketServer < RequestSource include Danger::Helper...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/bitbucket_cloud.rb
lib/danger/request_sources/bitbucket_cloud.rb
# frozen_string_literal: true require "danger/helpers/comments_helper" require "danger/request_sources/bitbucket_cloud_api" require "danger/danger_core/message_group" module Danger module RequestSources class BitbucketCloud < RequestSource include Danger::Helpers::CommentsHelper attr_accessor :pr_js...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/code_insights_api.rb
lib/danger/request_sources/code_insights_api.rb
# frozen_string_literal: true module Danger module RequestSources # # Provides ability for Danger to interact with Atlassian's Code Insights API in order to provide code quality # reports along with inline comments for specific lines in specific files. # See https://developer.atlassian.com/server/bi...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/vsts_api.rb
lib/danger/request_sources/vsts_api.rb
# frozen_string_literal: true require "base64" require "danger/helpers/comments_helper" module Danger module RequestSources class VSTSAPI attr_accessor :host, :pr_api_endpoint, :min_api_version_for_comments def initialize(slug, pull_request_id, environment) self.min_api_version_for_comments...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/request_source.rb
lib/danger/request_sources/request_source.rb
# frozen_string_literal: true module Danger module RequestSources class RequestSource DANGER_REPO_NAME = "danger" attr_accessor :ci_source, :scm, :host, :ignored_violations def self.env_vars raise "Subclass and overwrite self.env_vars" end def self.optional_env_vars ...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/support/get_ignored_violation.rb
lib/danger/request_sources/support/get_ignored_violation.rb
# frozen_string_literal: true class GetIgnoredViolation IGNORE_REGEXP = />*\s*danger\s*:\s*ignore\s*"(?<error>[^"]*)"/i.freeze def initialize(body) @body = body end def call return [] unless body body.chomp.scan(IGNORE_REGEXP).flatten end private attr_reader :body end
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/github/github_review.rb
lib/danger/request_sources/github/github_review.rb
# frozen_string_literal: true require "octokit" require "danger/ci_source/ci_source" require "danger/request_sources/github/github_review_resolver" require "danger/danger_core/messages/violation" require "danger/danger_core/messages/markdown" require "danger/helpers/comments_helper" require "danger/helpers/comment" m...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/github/github_review_resolver.rb
lib/danger/request_sources/github/github_review_resolver.rb
# frozen_string_literal: true require "danger/request_sources/github/github_review" module Danger module RequestSources module GitHubSource class ReviewResolver def self.should_submit?(review, body) return !same_body?(body, review.body) end def self.same_body?(body1, bod...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/github/github.rb
lib/danger/request_sources/github/github.rb
# frozen_string_literal: true # rubocop:disable Metrics/ClassLength require "octokit" require "danger/helpers/comments_helper" require "danger/helpers/comment" require "danger/request_sources/github/github_review" require "danger/request_sources/github/github_review_unsupported" require "danger/request_sources/suppor...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
danger/danger
https://github.com/danger/danger/blob/20f1243775da2ce53f55ad5ba65112de5da6e118/lib/danger/request_sources/github/github_review_unsupported.rb
lib/danger/request_sources/github/github_review_unsupported.rb
# frozen_string_literal: true module Danger module RequestSources module GitHubSource class ReviewUnsupported attr_reader :id, :body, :status, :review_json def initialize; end def start; end def submit; end def message(message, sticky = true, file = nil, line = n...
ruby
MIT
20f1243775da2ce53f55ad5ba65112de5da6e118
2026-01-04T15:42:56.145797Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/docs/.mdl_ruleset.rb
docs/.mdl_ruleset.rb
# typed: true # frozen_string_literal: true rule "HB034", "Bare unstyled URL used" do tags :links, :url aliases "no-bare-unstyled-urls" check do |doc| doc.matching_text_element_lines(%r{(?<=\s)https?://}) end end rule "HB100", "Full URL for internal link used" do tags :links, :url aliases "no-full-urls...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/docs/.mdl_style.rb
docs/.mdl_style.rb
# typed: true # frozen_string_literal: true all rule "MD007", indent: 2 # Unordered list indentation rule "MD026", punctuation: ",;:" # Trailing punctuation in header exclude_rule "MD013" # Line length exclude_rule "MD029" # Ordered list item prefix exclude_rule "MD033" # Inline HTML exclude_rule "MD034" # Bare URL us...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/hardware.rb
Library/Homebrew/hardware.rb
# typed: strict # frozen_string_literal: true require "utils/popen" # Helper module for querying hardware information. module Hardware # Helper module for querying CPU information. class CPU INTEL_32BIT_ARCHS = [:i386].freeze INTEL_64BIT_ARCHS = [:x86_64].freeze INTEL_ARCHS = T.let((INTEL_32BIT_...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula_info.rb
Library/Homebrew/formula_info.rb
# typed: strict # frozen_string_literal: true # Formula information drawn from an external `brew info --json` call. class FormulaInfo # The whole info structure parsed from the JSON. sig { returns(T::Hash[String, T.untyped]) } attr_accessor :info sig { params(info: T::Hash[String, T.untyped]).void } def ini...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test.rb
Library/Homebrew/test.rb
# typed: strict # frozen_string_literal: true raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__ old_trap = trap("INT") { exit! 130 } require_relative "global" require "extend/ENV" require "timeout" require "formula_assertions" require "formula_free_port" require "fcntl" require "util...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/brew.rb
Library/Homebrew/brew.rb
# typed: strict # frozen_string_literal: true # `HOMEBREW_STACKPROF` should be set via `brew prof --stackprof`, not manually. if ENV["HOMEBREW_STACKPROF"] require "rubygems" require "stackprof" StackProf.start(mode: :wall, raw: true) end raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/resource.rb
Library/Homebrew/resource.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "downloadable" require "mktemp" require "livecheck" require "on_system" require "utils/output" # Resource is the fundamental representation of an external resource. The # primary formula download, along with other declared resources...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/readall.rb
Library/Homebrew/readall.rb
# typed: strict # frozen_string_literal: true require "formula" require "cask/cask_loader" require "system_command" require "utils/output" # Helper module for validating syntax in taps. module Readall extend Cachable extend SystemCommand::Mixin extend Utils::Output::Mixin # TODO: remove this once the `MacOS`...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unpack_strategy.rb
Library/Homebrew/unpack_strategy.rb
# typed: strict # frozen_string_literal: true require "mktemp" require "system_command" require "utils/output" # Module containing all available strategies for unpacking archives. module UnpackStrategy extend T::Helpers extend Utils::Output::Mixin include SystemCommand::Mixin include Utils::Output::Mixin a...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula_pin.rb
Library/Homebrew/formula_pin.rb
# typed: strict # frozen_string_literal: true require "keg" # Helper functions for pinning a formula. class FormulaPin sig { params(formula: Formula).void } def initialize(formula) @formula = formula end sig { returns(Pathname) } def path HOMEBREW_PINNED_KEGS/@formula.name end sig { params(ver...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/executables_db.rb
Library/Homebrew/executables_db.rb
# typed: strict # frozen_string_literal: true # License: MIT # The license text can be found in Library/Homebrew/command-not-found/LICENSE require "formula" require "formulary" require "tap" require "utils/output" module Homebrew # ExecutablesDB represents a DB associating formulae to the binaries they # provide...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/metafiles.rb
Library/Homebrew/metafiles.rb
# typed: strict # frozen_string_literal: true # Helper for checking if a file is considered a metadata file. module Metafiles LICENSES = T.let(Set.new(%w[copying copyright license licence]).freeze, T::Set[String]) # {https://github.com/github/markup#markups} EXTENSIONS = T.let(Set.new(%w[ .adoc .asc .asciido...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula_name_cask_token_auditor.rb
Library/Homebrew/formula_name_cask_token_auditor.rb
# typed: strict # frozen_string_literal: true module Homebrew class FormulaNameCaskTokenAuditor sig { returns(String) } attr_reader :token sig { params(token: String).void } def initialize(token) @token = token end sig { returns(T::Array[String]) } def errors errors = [] ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/macos_version.rb
Library/Homebrew/macos_version.rb
# typed: strong # frozen_string_literal: true require "version" # A macOS version. class MacOSVersion < Version # Raised when a macOS version is unsupported. class Error < RuntimeError sig { returns(T.nilable(T.any(String, Symbol))) } attr_reader :version sig { params(version: T.nilable(T.any(String,...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/sandbox.rb
Library/Homebrew/sandbox.rb
# typed: strict # frozen_string_literal: true require "erb" require "io/console" require "pty" require "tempfile" require "utils/fork" require "utils/output" # Helper class for running a sub-process inside of a sandboxed environment. class Sandbox include Utils::Output::Mixin SANDBOX_EXEC = "/usr/bin/sandbox-exe...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/download_queue.rb
Library/Homebrew/download_queue.rb
# typed: strict # frozen_string_literal: true require "downloadable" require "concurrent/promises" require "concurrent/executors" require "retryable_download" require "resource" require "utils/output" module Homebrew class DownloadQueue include Utils::Output::Mixin sig { params(retries: Integer, force: T::...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula_versions.rb
Library/Homebrew/formula_versions.rb
# typed: strict # frozen_string_literal: true require "formula" require "utils/output" # Helper class for traversing a formula's previous versions. # # @api internal class FormulaVersions include Context include Utils::Output::Mixin IGNORED_EXCEPTIONS = [ ArgumentError, NameError, SyntaxError, TypeError, ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test_runner_formula.rb
Library/Homebrew/test_runner_formula.rb
# typed: strict # frozen_string_literal: true require "formula" class TestRunnerFormula sig { returns(String) } attr_reader :name sig { returns(Formula) } attr_reader :formula sig { returns(T::Boolean) } attr_reader :eval_all sig { params(formula: Formula, eval_all: T::Boolean).void } def initializ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bundle.rb
Library/Homebrew/bundle.rb
# typed: strict # frozen_string_literal: true require "English" module Homebrew module Bundle class << self sig { params(args_upgrade_formula: T.nilable(String)).void } def upgrade_formulae=(args_upgrade_formula) @upgrade_formulae = args_upgrade_formula.to_s.split(",") end sig {...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cache_store.rb
Library/Homebrew/cache_store.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "json" # # {CacheStoreDatabase} acts as an interface to a persistent storage mechanism # residing in the `HOMEBREW_CACHE`. # class CacheStoreDatabase # Yields the cache store database. # Closes the database after use if it has b...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/system_command.rb
Library/Homebrew/system_command.rb
# typed: strict # frozen_string_literal: true require "plist" require "shellwords" require "uri" require "context" require "readline_nonblock" require "utils/timer" require "utils/output" # Class for running sub-processes and capturing their output and exit status. # # @api internal class SystemCommand # Helper fu...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bump_version_parser.rb
Library/Homebrew/bump_version_parser.rb
# typed: strict # frozen_string_literal: true module Homebrew # Class handling architecture-specific version information. class BumpVersionParser VERSION_SYMBOLS = [:general, :arm, :intel].freeze sig { returns(T.nilable(T.any(Version, Cask::DSL::Version))) } attr_reader :arm, :general, :intel sig...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/unversioned_cask_checker.rb
Library/Homebrew/unversioned_cask_checker.rb
# typed: strict # frozen_string_literal: true require "bundle_version" require "cask/cask" require "cask/installer" require "system_command" require "utils/output" module Homebrew # Check unversioned casks for updates by extracting their # contents and guessing the version from contained files. class Unversione...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/startup.rb
Library/Homebrew/startup.rb
# typed: strict # frozen_string_literal: true # This file should be the first `require` in all entrypoints of `brew`. # Bootsnap should be loaded as early as possible. require_relative "standalone/init" require_relative "startup/bootsnap" require_relative "startup/ruby_path" require "startup/config" require_relative ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/version.rb
Library/Homebrew/version.rb
# typed: strict # frozen_string_literal: true require "version/parser" # A formula's version. class Version include Comparable sig { params(name: T.any(String, Symbol), full: T::Boolean).returns(Regexp) } def self.formula_optionally_versioned_regex(name, full: true) /#{"^" if full}#{Regexp.escape(name)}(@\...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/mcp_server.rb
Library/Homebrew/mcp_server.rb
# typed: strict # frozen_string_literal: true # This is a standalone Ruby script as MCP servers need a faster startup time # than a normal Homebrew Ruby command allows. require_relative "standalone" require "json" require "stringio" module Homebrew # Provides a Model Context Protocol (MCP) server for Homebrew. # ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/deprecate_disable.rb
Library/Homebrew/deprecate_disable.rb
# typed: strict # frozen_string_literal: true # Helper module for handling `disable!` and `deprecate!`. # @api internal module DeprecateDisable module_function FORMULA_DEPRECATE_DISABLE_REASONS = T.let({ does_not_build: "does not build", no_license: "has no license", repo_archived: ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/bottle_specification.rb
Library/Homebrew/bottle_specification.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true class BottleSpecification RELOCATABLE_CELLARS = [:any, :any_skip_relocation].freeze sig { returns(T.nilable(Tap)) } attr_accessor :tap attr_reader :collector sig { returns(T::Hash[Symbol, T.untyped]) } attr_reader :root_url_sp...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/exceptions.rb
Library/Homebrew/exceptions.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "utils/output" # Raised when a command is used wrong. # # @api internal class UsageError < RuntimeError attr_reader :reason def initialize(reason = nil) super @reason = reason end sig { returns(String) } def to_...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/requirement.rb
Library/Homebrew/requirement.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "dependable" require "dependency" require "dependencies" require "build_environment" require "utils/output" # A base class for non-formula requirements needed by formulae. # A fatal requirement is one that will fail the build if it ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/attestation.rb
Library/Homebrew/attestation.rb
# typed: strict # frozen_string_literal: true require "date" require "json" require "utils/popen" require "utils/github/api" require "exceptions" require "system_command" require "utils/output" module Homebrew module Attestation extend SystemCommand::Mixin extend Utils::Output::Mixin # @api private ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/checksum.rb
Library/Homebrew/checksum.rb
# typed: strict # frozen_string_literal: true # A formula's checksum. class Checksum extend Forwardable sig { returns(String) } attr_reader :hexdigest sig { params(hexdigest: String).void } def initialize(hexdigest) @hexdigest = T.let(hexdigest.downcase, String) end sig { returns(String) } def i...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/keg_relocate.rb
Library/Homebrew/keg_relocate.rb
# typed: strict # frozen_string_literal: true class Keg PREFIX_PLACEHOLDER = T.let("@@HOMEBREW_PREFIX@@", String) CELLAR_PLACEHOLDER = T.let("@@HOMEBREW_CELLAR@@", String) REPOSITORY_PLACEHOLDER = T.let("@@HOMEBREW_REPOSITORY@@", String) LIBRARY_PLACEHOLDER = T.let("@@HOMEBREW_LIBRARY@@", String) PERL_PLACEH...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/resource_auditor.rb
Library/Homebrew/resource_auditor.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "utils/svn" module Homebrew # Auditor for checking common violations in {Resource}s. class ResourceAuditor include Utils::Curl attr_reader :name, :version, :checksum, :url, :mirrors, :using, :specs, :owner, :spec_name, ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/reinstall.rb
Library/Homebrew/reinstall.rb
# typed: strict # frozen_string_literal: true require "development_tools" require "messages" require "utils/output" # Needed to handle circular require dependency. # rubocop:disable Lint/EmptyClass class FormulaInstaller; end # rubocop:enable Lint/EmptyClass module Homebrew module Reinstall extend Utils::Outpu...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/autobump_constants.rb
Library/Homebrew/autobump_constants.rb
# typed: strict # frozen_string_literal: true NO_AUTOBUMP_REASONS_INTERNAL = T.let({ extract_plist: "livecheck uses `:extract_plist` strategy", latest_version: "`version` is set to `:latest`", }.freeze, T::Hash[Symbol, String]) # The valid symbols for passing to `no_autobump!` in a `Formula` or `Cask`. # @api pu...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cachable.rb
Library/Homebrew/cachable.rb
# typed: strict # frozen_string_literal: true module Cachable sig { returns(T::Hash[T.untyped, T.untyped]) } def cache @cache ||= T.let({}, T.nilable(T::Hash[T.untyped, T.untyped])) end sig { void } def clear_cache cache.clear end end
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/completions.rb
Library/Homebrew/completions.rb
# typed: strict # frozen_string_literal: true require "utils/link" require "settings" require "erb" module Homebrew # Helper functions for generating shell completions. module Completions extend Utils::Output::Mixin Variables = Struct.new( :aliases, :builtin_command_descriptions, :compl...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/ast_constants.rb
Library/Homebrew/ast_constants.rb
# typed: strict # frozen_string_literal: true require "macos_version" FORMULA_COMPONENT_PRECEDENCE_LIST = T.let([ [{ name: :include, type: :method_call }], [{ name: :desc, type: :method_call }], [{ name: :homepage, type: :method_call }], [{ name: :url, type: :method_call }], [{ name: :mirror, ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/build.rb
Library/Homebrew/build.rb
# typed: strict # frozen_string_literal: true # This script is loaded by formula_installer as a separate instance. # Thrown exceptions are propagated back to the parent process over a pipe raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__ old_trap = trap("INT") { exit! 130 } require...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/description_cache_store.rb
Library/Homebrew/description_cache_store.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "cache_store" # # {DescriptionCacheStore} provides methods to fetch and mutate formula descriptions used # by the `brew desc` and `brew search` commands. # class DescriptionCacheStore < CacheStore # Inserts a formula description i...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cleanup.rb
Library/Homebrew/cleanup.rb
# typed: strict # frozen_string_literal: true require "utils/bottles" require "utils/output" require "formula" require "cask/cask_loader" module Homebrew # Helper class for cleaning up the Homebrew cache. class Cleanup extend Utils::Output::Mixin include Utils::Output::Mixin CLEANUP_DEFAULT_DAYS = T...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/options.rb
Library/Homebrew/options.rb
# typed: strict # frozen_string_literal: true # A formula option. class Option sig { returns(String) } attr_reader :name sig { returns(String) } attr_reader :description, :flag sig { params(name: String, description: String).void } def initialize(name, description = "") @name = name @flag = T.let...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/missing_formula.rb
Library/Homebrew/missing_formula.rb
# typed: strict # frozen_string_literal: true require "formulary" require "utils/output" module Homebrew # Helper module for checking if there is a reason a formula is missing. module MissingFormula extend Utils::Output::Mixin class << self sig { params(name: String, silent: T::Boolean, show_info: ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/caveats.rb
Library/Homebrew/caveats.rb
# typed: strict # frozen_string_literal: true require "language/python" require "utils/service" # A formula's caveats. class Caveats extend Forwardable sig { returns(Formula) } attr_reader :formula sig { params(formula: Formula).void } def initialize(formula) @formula = formula @caveats = T.let(ni...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/linkage_cache_store.rb
Library/Homebrew/linkage_cache_store.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "cache_store" # # {LinkageCacheStore} provides methods to fetch and mutate linkage-specific data used # by the `brew linkage` command. # class LinkageCacheStore < CacheStore # @param keg_path [String] # @param database [CacheSto...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/livecheck.rb
Library/Homebrew/livecheck.rb
# typed: strict # frozen_string_literal: true require "livecheck/constants" require "livecheck/options" require "cask/cask" # The {Livecheck} class implements the DSL methods used in a formula's, cask's # or resource's `livecheck` block and stores related instance variables. Most # of these methods also return the re...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/uninstall.rb
Library/Homebrew/uninstall.rb
# typed: strict # frozen_string_literal: true require "dependents_message" require "installed_dependents" require "utils/output" module Homebrew # Helper module for uninstalling kegs. module Uninstall extend ::Utils::Output::Mixin sig { params( kegs_by_rack: T::Hash[Pathname, T::Arra...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/descriptions.rb
Library/Homebrew/descriptions.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "formula" require "formula_versions" require "search" # Helper class for printing and searching descriptions. class Descriptions # Given a regex, find all formulae whose specified fields contain a match. def self.search(string_o...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/utils.rb
Library/Homebrew/utils.rb
# typed: strict # frozen_string_literal: true require "context" module Homebrew extend Context sig { params(path: T.nilable(T.any(String, Pathname))).returns(T::Boolean) } def self.require?(path) return false if path.nil? if defined?(Warnings) # Work around require warning when done repeatedly: ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/linux_runner_spec.rb
Library/Homebrew/linux_runner_spec.rb
# typed: strict # frozen_string_literal: true class LinuxRunnerSpec < T::Struct const :name, String const :runner, String const :container, T::Hash[Symbol, String] const :workdir, String const :timeout, Integer const :cleanup, T::Boolean prop :testing_formulae, T::Array[String], default: [] sig { ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/tap_auditor.rb
Library/Homebrew/tap_auditor.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true module Homebrew # Auditor for checking common violations in {Tap}s. class TapAuditor attr_reader :name, :path, :formula_names, :formula_aliases, :formula_renames, :cask_tokens, :cask_renames, :tap_audit_exceptions, :t...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/postinstall.rb
Library/Homebrew/postinstall.rb
# typed: strict # frozen_string_literal: true raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__ old_trap = trap("INT") { exit! 130 } require_relative "global" require "fcntl" require "utils/socket" require "cli/parser" require "cmd/postinstall" require "json/add/exception" require "...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/os.rb
Library/Homebrew/os.rb
# typed: strict # frozen_string_literal: true require "version" # Helper functions for querying operating system information. module OS # Check whether the operating system is macOS. # # @api public sig { returns(T::Boolean) } def self.mac? return false if ENV["HOMEBREW_TEST_GENERIC_OS"] RbConfig::...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/warnings.rb
Library/Homebrew/warnings.rb
# typed: strict # frozen_string_literal: true require "warning" # Helper module for handling warnings. module Warnings COMMON_WARNINGS = T.let({ parser_syntax: [ %r{warning: parser/current is loading parser/ruby\d+, which recognizes}, /warning: \d+\.\d+\.\d+-compliant syntax, but you are running \d+...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/sbom.rb
Library/Homebrew/sbom.rb
# typed: strict # frozen_string_literal: true require "cxxstdlib" require "json" require "development_tools" require "cachable" require "utils/curl" require "utils/output" # Rather than calling `new` directly, use one of the class methods like {SBOM.create}. class SBOM include Utils::Output::Mixin FILENAME = "sb...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/cleaner.rb
Library/Homebrew/cleaner.rb
# typed: strict # frozen_string_literal: true require "utils/output" # Cleans a newly installed keg. # By default: # # * removes `.la` files # * removes `.tbd` files # * removes `perllocal.pod` files # * removes `.packlist` files # * removes empty directories # * sets permissions on executables # * removes unresolved...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/on_system.rb
Library/Homebrew/on_system.rb
# typed: strict # frozen_string_literal: true require "simulate_system" module OnSystem ARCH_OPTIONS = [:intel, :arm].freeze BASE_OS_OPTIONS = [:macos, :linux].freeze ALL_OS_OPTIONS = T.let([*MacOSVersion::SYMBOLS.keys, :linux].freeze, T::Array[Symbol]) ALL_OS_ARCH_COMBINATIONS = T.let(ALL_OS_OPTIONS.product(...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/formula_assertions.rb
Library/Homebrew/formula_assertions.rb
# typed: strict # frozen_string_literal: true require "utils/output" module Homebrew # Helper functions available in formula `test` blocks. module Assertions include Context include ::Utils::Output::Mixin extend T::Helpers requires_ancestor { Kernel } require "minitest" require "minitest...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/tab.rb
Library/Homebrew/tab.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "cxxstdlib" require "options" require "json" require "development_tools" require "cachable" # Rather than calling `new` directly, use one of the class methods like {Tab.create}. class AbstractTab extend Cachable extend T::Helper...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/github_packages.rb
Library/Homebrew/github_packages.rb
# typed: strict # frozen_string_literal: true require "utils/curl" require "utils/gzip" require "utils/output" require "json" require "zlib" require "extend/hash/keys" require "system_command" # GitHub Packages client. class GitHubPackages include Context include SystemCommand::Mixin include Utils::Output::Mixi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/patch.rb
Library/Homebrew/patch.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "resource" require "erb" require "utils/output" # Helper module for creating patches. module Patch def self.create(strip, src, &block) case strip when :DATA DATAPatch.new(:p1) when String StringPatch.new(:p...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/tap_constants.rb
Library/Homebrew/tap_constants.rb
# typed: strict # frozen_string_literal: true # Match a formula name. HOMEBREW_TAP_FORMULA_NAME_REGEX = T.let(/(?<name>[\w+\-.@]+)/, Regexp) # Match taps' formulae, e.g. `someuser/sometap/someformula`. HOMEBREW_TAP_FORMULA_REGEX = T.let( %r{\A(?<user>[^/]+)/(?<repository>[^/]+)/#{HOMEBREW_TAP_FORMULA_NAME_REGEX.sour...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/keg_only_reason.rb
Library/Homebrew/keg_only_reason.rb
# typed: strict # frozen_string_literal: true # Used to annotate formulae that duplicate macOS-provided software # or cause conflicts when linked in. class KegOnlyReason sig { returns(T.any(Symbol, String)) } attr_reader :reason sig { params(reason: T.any(Symbol, String), explanation: String).void } def initi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/download_strategy.rb
Library/Homebrew/download_strategy.rb
# typed: strict # frozen_string_literal: true require "json" require "time" require "unpack_strategy" require "lazy_object" require "lock_file" require "system_command" require "utils/output" # Need to define this before requiring Mechanize to avoid: # uninitialized constant Mechanize # rubocop:disable Lint/EmptyCl...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
true
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/api_hashable.rb
Library/Homebrew/api_hashable.rb
# typed: strict # frozen_string_literal: true # Used to substitute common paths with generic placeholders when generating JSON for the API. module APIHashable sig { void } def generating_hash! return if generating_hash? # Apply monkeypatches for API generation @old_homebrew_prefix = T.let(HOMEBREW_PRE...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/search.rb
Library/Homebrew/search.rb
# typed: true # rubocop:todo Sorbet/StrictSigil # frozen_string_literal: true require "description_cache_store" require "utils/output" module Homebrew # Helper module for searching formulae or casks. module Search extend Utils::Output::Mixin def self.query_regexp(query) if (m = query.match(%r{^/(.*...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/source_location.rb
Library/Homebrew/source_location.rb
# typed: strict # frozen_string_literal: true module Homebrew # A location in source code. class SourceLocation sig { returns(Integer) } attr_reader :line sig { returns(T.nilable(Integer)) } attr_reader :column sig { params(line: Integer, column: T.nilable(Integer)).void } def initialize(...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/install_renamed.rb
Library/Homebrew/install_renamed.rb
# typed: strict # frozen_string_literal: true # Helper module for installing default files. module InstallRenamed sig { params(src: T.any(String, Pathname), new_basename: String, _block: T.nilable(T.proc.params(src: Pathname, dst: Pathname).returns(T.nilable(Pathname)))).void } def install_p(src, ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false