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/test/dev-cmd/tap-new_spec.rb
Ruby
bsd-2-clause
47,751
main
746
# typed: false # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/tap-new" RSpec.describe Homebrew::DevCmd::TapNew do it_behaves_like "parseable arguments" it "initializes a new tap with a README file and GitHub Actions CI", :integration_test do # To ensure that Utils::Gi...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/release_spec.rb
Ruby
bsd-2-clause
47,751
main
1,693
# typed: false # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/release" RSpec.describe Homebrew::DevCmd::Release do it_behaves_like "parseable arguments" describe "release lookup helpers" do let(:command) { described_class.new([]) } let(:releases) do [ ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/cat_spec.rb
Ruby
bsd-2-clause
47,751
main
483
# typed: false # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/cat" RSpec.describe Homebrew::DevCmd::Cat do it_behaves_like "parseable arguments" it "prints the content of a given Formula", :integration_test do formula_file = setup_test_formula "testball" content =...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/update-license-data_spec.rb
Ruby
bsd-2-clause
47,751
main
225
# typed: strict # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/update-license-data" RSpec.describe Homebrew::DevCmd::UpdateLicenseData do it_behaves_like "parseable arguments" end
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/bump-formula-pr_spec.rb
Ruby
bsd-2-clause
47,751
main
4,202
# typed: false # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/bump-formula-pr" RSpec.describe Homebrew::DevCmd::BumpFormulaPr do subject(:bump_formula_pr) { described_class.new(["test"]) } let(:f) do formula("test") do url "https://brew.sh/test-1.2.3.tgz" en...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/ruby_spec.rb
Ruby
bsd-2-clause
47,751
main
929
# typed: false # frozen_string_literal: true require "cmd/shared_examples/args_parse" require "dev-cmd/ruby" RSpec.describe Homebrew::DevCmd::Ruby do it_behaves_like "parseable arguments" it "executes ruby code with Homebrew's libraries loaded", :integration_test do expect { brew "ruby", "-e", "exit 0" } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dev-cmd/pr-pull_spec.rb
Ruby
bsd-2-clause
47,751
main
6,426
# typed: false # frozen_string_literal: true require "dev-cmd/pr-pull" require "utils/git" require "tap" require "cmd/shared_examples/args_parse" RSpec.describe Homebrew::DevCmd::PrPull do include FileUtils let(:pr_pull) { described_class.new(["foo"]) } let(:formula_rebuild) do <<~EOS class Foo < For...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/cargo_spec.rb
Ruby
bsd-2-clause
47,751
main
4,879
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/cargo" RSpec.describe Homebrew::Bundle::Cargo do around do |example| with_env({ "HOMEBREW_CARGO_HOME" => "~/.cargo", "HOMEBREW_CARGO_INSTALL_ROOT" => "~/.cargo/bin", "HOMEBREW_...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/flatpak_spec.rb
Ruby
bsd-2-clause
47,751
main
18,975
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/flatpak" RSpec.describe Homebrew::Bundle::Flatpak do describe "checking" do subject(:checker) { described_class.new } before do allow(described_class).to receive(:package_installed?).and_retu...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/skipper_spec.rb
Ruby
bsd-2-clause
47,751
main
4,347
# typed: false # frozen_string_literal: true require "bundle" require "bundle/skipper" require "bundle/dsl" RSpec.describe Homebrew::Bundle::Skipper do subject(:skipper) { described_class } before do allow(ENV).to receive(:[]).and_return(nil) allow(ENV).to receive(:[]).with("HOMEBREW_BUNDLE_BREW_SKIP").a...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/dumper_spec.rb
Ruby
bsd-2-clause
47,751
main
3,309
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dumper" require "bundle/brew_services" require "cask" RSpec.describe Homebrew::Bundle::Dumper do subject(:dumper) { described_class } before do ENV["HOMEBREW_BUNDLE_FILE"] = "" allow(Homebrew::Bundle).to receive(:cask_installe...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/brewfile_spec.rb
Ruby
bsd-2-clause
47,751
main
7,640
# typed: false # frozen_string_literal: true require "bundle" require "bundle/brewfile" RSpec.describe Homebrew::Bundle::Brewfile do describe "path" do subject(:path) do described_class.path(dash_writes_to_stdout:, global: has_global, file: file_value) end let(:dash_writes_to_stdout) { false } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/brew_services_spec.rb
Ruby
bsd-2-clause
47,751
main
7,195
# typed: false # frozen_string_literal: true require "bundle" require "bundle/brew_services" RSpec.describe Homebrew::Bundle::Brew::Services do describe ".started_services" do before do described_class.reset! end it "returns started services" do allow(Utils).to receive(:safe_popen_read).and...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/go_spec.rb
Ruby
bsd-2-clause
47,751
main
5,593
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/go" RSpec.describe Homebrew::Bundle::Go do describe "dumping" do subject(:dumper) { described_class } context "when go is not installed" do before do described_class.reset! al...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/npm_spec.rb
Ruby
bsd-2-clause
47,751
main
5,162
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/npm" RSpec.describe Homebrew::Bundle::Npm do describe "dumping" do subject(:dumper) { described_class } context "when npm is not installed" do before do described_class.reset! ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/installer_spec.rb
Ruby
bsd-2-clause
47,751
main
8,086
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/installer" require "bundle/parallel_installer" RSpec.describe Homebrew::Bundle::Installer do let(:formula_entry) { Homebrew::Bundle::Dsl::Entry.new(:brew, "mysql") } let(:second_formula_entry) { Homebrew::Bundle::Ds...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/cask_spec.rb
Ruby
bsd-2-clause
47,751
main
11,860
# typed: false # frozen_string_literal: true require "bundle" require "bundle/cask" require "cask" RSpec.describe Homebrew::Bundle::Cask do describe "dumping" do subject(:dumper) { described_class } context "when brew-cask is not installed" do before do described_class.reset! allow(Ho...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/krew_spec.rb
Ruby
bsd-2-clause
47,751
main
4,297
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/krew" RSpec.describe Homebrew::Bundle::Krew do describe "dumping" do subject(:dumper) { described_class } context "when krew is not installed" do before do described_class.reset! ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/dsl_spec.rb
Ruby
bsd-2-clause
47,751
main
7,242
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" RSpec.describe Homebrew::Bundle::Dsl do def dsl_from_string(string) described_class.new(StringIO.new(string)) end context "with a DSL example" do subject(:dsl) do dsl_from_string <<~EOS # frozen_string_lite...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/vscode_extension_spec.rb
Ruby
bsd-2-clause
47,751
main
4,826
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/vscode_extension" require "extend/kernel" RSpec.describe Homebrew::Bundle::VscodeExtension do describe "dumping" do subject(:dumper) { described_class } context "when vscode is not installed" do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/remover_spec.rb
Ruby
bsd-2-clause
47,751
main
441
# typed: false # frozen_string_literal: true require "bundle" require "bundle/remover" RSpec.describe Homebrew::Bundle::Remover do subject(:remover) { described_class } let(:name) { "foo" } before { allow(Formulary).to receive(:factory).with(name).and_raise(FormulaUnavailableError.new(name)) } it "raises n...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/tap_spec.rb
Ruby
bsd-2-clause
47,751
main
4,175
# typed: false # frozen_string_literal: true require "bundle" require "bundle/skipper" require "bundle/tap" RSpec.describe Homebrew::Bundle::Tap do describe "dumping" do subject(:dumper) { described_class } context "when there is no tap" do before do described_class.reset! allow(Tap)....
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/brew_spec.rb
Ruby
bsd-2-clause
47,751
main
36,056
# typed: false # frozen_string_literal: true require "bundle" require "bundle/brew" require "bundle/brew_services" require "tsort" require "formula" require "tab" require "utils/bottles" RSpec.describe Homebrew::Bundle::Brew do describe "dumping" do subject(:dumper) { described_class } let(:foo) do i...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/uv_spec.rb
Ruby
bsd-2-clause
47,751
main
11,277
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/uv" RSpec.describe Homebrew::Bundle::Uv do describe "checking" do subject(:checker) { described_class.new } describe "#installed_and_up_to_date?" do it "returns false when package is not inst...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/mac_app_store_spec.rb
Ruby
bsd-2-clause
47,751
main
9,543
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/extensions/mac_app_store" RSpec.describe Homebrew::Bundle::MacAppStore do describe "dumping" do subject(:dumper) { described_class } context "when mas is not installed" do before do described_cl...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/bundle_spec.rb
Ruby
bsd-2-clause
47,751
main
3,619
# typed: false # frozen_string_literal: true require "bundle" require "bundle/dsl" RSpec.describe Homebrew::Bundle do context "when the system call succeeds" do it "omits all stdout output if verbose is false" do expect { described_class.system "echo", "foo", verbose: false }.not_to output.to_stdout_from_...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/dump_spec.rb
Ruby
bsd-2-clause
47,751
main
2,500
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/dump" RSpec.describe Homebrew::Bundle::Commands::Dump do subject(:dump) do described_class.run(global:, file: nil, describe: false, force:, no_restart: false, taps: true, formulae: true, casks: true, e...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/exec_spec.rb
Ruby
bsd-2-clause
47,751
main
11,462
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/exec" require "bundle/brewfile" require "bundle/brew_services" RSpec.describe Homebrew::Bundle::Commands::Exec do context "when a Brewfile is not found" do it "raises an error" do expect { described_class.run }.to raise...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/add_spec.rb
Ruby
bsd-2-clause
47,751
main
1,313
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/add" require "cask/cask_loader" RSpec.describe Homebrew::Bundle::Commands::Add do subject(:add) do described_class.run(*args, type:, global:, file:) end before { FileUtils.touch file } after { FileUtils.rm_f file } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/list_spec.rb
Ruby
bsd-2-clause
47,751
main
2,848
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/list" TYPES_AND_DEPS = { taps: "phinze/cask", formulae: "mysql", casks: "google-chrome", mas: "1Password", vscode: "shopify.ruby-lsp", go: "github.com/charmbracelet/crush", cargo: "ripgrep", u...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/cleanup_spec.rb
Ruby
bsd-2-clause
47,751
main
16,928
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/cleanup" require "utils" RSpec.describe Homebrew::Bundle::Commands::Cleanup do describe "read Brewfile and current installation", :no_api do before do described_class.reset! # don't try to load gcc/glibc al...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/check_spec.rb
Ruby
bsd-2-clause
47,751
main
12,792
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/check" require "bundle/dsl" require "bundle/skipper" RSpec.describe Homebrew::Bundle::Commands::Check, :no_api do let(:do_check) do described_class.run(no_upgrade:, verbose:) end let(:no_upgrade) { false } let(:verbose)...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/remove_spec.rb
Ruby
bsd-2-clause
47,751
main
3,338
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/remove" require "cask/cask_loader" RSpec.describe Homebrew::Bundle::Commands::Remove do subject(:remove) do described_class.run(*args, type:, global:, file:) end before { File.write(file, content) } after { FileUtils.r...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle/commands/install_spec.rb
Ruby
bsd-2-clause
47,751
main
5,394
# typed: false # frozen_string_literal: true require "bundle" require "bundle/commands/install" require "bundle/skipper" RSpec.describe Homebrew::Bundle::Commands::Install do before do allow_any_instance_of(IO).to receive(:puts) end context "when a Brewfile is not found" do it "raises an error" do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/debrew/irb.rb
Ruby
bsd-2-clause
47,751
main
486
# typed: strict # frozen_string_literal: true require "irb" module IRB sig { params(binding: Binding).void } def self.start_within(binding) old_stdout_sync = $stdout.sync $stdout.sync = true @setup_done ||= T.let(false, T.nilable(T::Boolean)) unless @setup_done setup(nil, argv: []) @s...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/remover.rb
Ruby
bsd-2-clause
47,751
main
2,901
# typed: strict # frozen_string_literal: true require "utils/output" module Homebrew module Bundle module Remover extend ::Utils::Output::Mixin sig { params(args: String, type: Symbol, global: T::Boolean, file: T.nilable(String)).void } def self.remove(*args, type:, global:, file:) re...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/cask.rb
Ruby
bsd-2-clause
47,751
main
9,808
# typed: strict # frozen_string_literal: true require "utils" require "utils/output" require "bundle/package_type" module Homebrew module Bundle class Cask < Homebrew::Bundle::PackageType extend ::Utils::Output::Mixin PACKAGE_TYPE = :cask PACKAGE_TYPE_NAME = "Cask" class << self ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/package_type.rb
Ruby
bsd-2-clause
47,751
main
6,691
# typed: strict # frozen_string_literal: true module Homebrew module Bundle EntryOptionScalar = T.type_alias { T.nilable(T.any(String, Integer, Symbol, TrueClass, FalseClass)) } NestedEntryOptionValue = T.type_alias { T.any(EntryOptionScalar, T::Array[String]) } NestedEntryOptions = T.type_alias { T::Has...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/installer.rb
Ruby
bsd-2-clause
47,751
main
4,518
# typed: strict # frozen_string_literal: true require "bundle/dsl" require "bundle/package_types" require "bundle/skipper" module Homebrew module Bundle module Installer class InstallableEntry < T::Struct const :name, String const :options, Homebrew::Bundle::EntryOptions const :ver...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions.rb
Ruby
bsd-2-clause
47,751
main
634
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" extensions_dir = File.join(__dir__, "extensions") # Preserve the historical Brewfile section order for dumped extension entries. legacy_order = %w[mac_app_store vscode_extension go cargo uv flatpak].freeze extension_files = Dir.glob(F...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/tap.rb
Ruby
bsd-2-clause
47,751
main
4,862
# typed: strict # frozen_string_literal: true require "json" require "bundle/package_type" module Homebrew module Bundle class Tap < Homebrew::Bundle::PackageType PACKAGE_TYPE = :tap PACKAGE_TYPE_NAME = "Tap" class << self sig { override.void } def reset! @taps = T.l...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/lister.rb
Ruby
bsd-2-clause
47,751
main
1,102
# typed: strict # frozen_string_literal: true require "bundle/dsl" require "bundle/extensions" module Homebrew module Bundle module Lister sig { params(entries: T::Array[Dsl::Entry], formulae: T::Boolean, casks: T::Boolean, taps: T::Boolean, extension_types: Homebrew::Bundle::Extens...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/brew_services.rb
Ruby
bsd-2-clause
47,751
main
5,905
# typed: strict # frozen_string_literal: true require "services/system" require "utils/output" require "bundle/brew" require "bundle/dsl" module Homebrew module Bundle class Brew class Services < Homebrew::Bundle::Brew extend Utils::Output::Mixin class << self sig { override.voi...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/brewfile.rb
Ruby
bsd-2-clause
47,751
main
2,256
# typed: strict # frozen_string_literal: true require "bundle/dsl" module Homebrew module Bundle module Brewfile sig { params( dash_writes_to_stdout: T::Boolean, global: T::Boolean, file: T.nilable(String), ).returns(Pathname) ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/parallel_installer.rb
Ruby
bsd-2-clause
47,751
main
9,366
# typed: strict # frozen_string_literal: true require "concurrent/executors" require "concurrent/promises" require "monitor" require "bundle/package_types" module Homebrew module Bundle class ParallelInstaller sig { params( entries: T::Array[Installer::InstallableEntry], job...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/adder.rb
Ruby
bsd-2-clause
47,751
main
1,122
# typed: strict # frozen_string_literal: true require "bundle/brewfile" require "bundle/dumper" module Homebrew module Bundle module Adder module_function sig { params(args: String, type: Symbol, global: T::Boolean, file: String, describe: T::Boolean).void } def add(*args, type:, global:, fil...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/dsl.rb
Ruby
bsd-2-clause
47,751
main
5,567
# typed: strict # frozen_string_literal: true require "bundle/package_type" require "utils" module Homebrew module Bundle class Dsl class Entry sig { returns(Symbol) } attr_reader :type sig { returns(String) } attr_reader :name sig { returns(Homebrew::Bundle::Entr...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/dumper.rb
Ruby
bsd-2-clause
47,751
main
2,984
# typed: strict # frozen_string_literal: true require "fileutils" require "bundle/dsl" require "bundle/package_types" module Homebrew module Bundle module Dumper sig { params(brewfile_path: Pathname, force: T::Boolean).returns(T::Boolean) } private_class_method def self.can_write_to_brewfile?(brewfi...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/brew.rb
Ruby
bsd-2-clause
47,751
main
25,951
# typed: strict # frozen_string_literal: true require "json" require "tsort" require "utils" require "utils/output" require "bundle/package_type" module Homebrew module Bundle class Brew < Homebrew::Bundle::PackageType extend Utils::Output::Mixin PACKAGE_TYPE = :brew PACKAGE_TYPE_NAME = "Form...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/skipper.rb
Ruby
bsd-2-clause
47,751
main
1,813
# typed: strict # frozen_string_literal: true module Homebrew module Bundle module Skipper class << self sig { params(entry: Dsl::Entry, silent: T::Boolean).returns(T::Boolean) } def skip?(entry, silent: false) require "bundle/brew" full_name = entry.options[:full_name]...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/checker.rb
Ruby
bsd-2-clause
47,751
main
3,982
# typed: true # frozen_string_literal: true require "bundle/dsl" require "bundle/package_types" require "bundle/brew_services" module Homebrew module Bundle module Checker CheckResult = Struct.new :work_to_be_done, :errors CheckStep = T.type_alias { Symbol } CORE_CHECKS = T.let([ :tap...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/uv.rb
Ruby
bsd-2-clause
47,751
main
7,903
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Uv < Extension WithOptions = T.type_alias { T::Hash[Symbol, T::Array[String]] } Tool = T.type_alias { { name: String, with: T::Array[String] } } Checkable = T.type_alias { { ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/vscode_extension.rb
Ruby
bsd-2-clause
47,751
main
5,803
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class VscodeExtension < Extension PACKAGE_TYPE = :vscode PACKAGE_TYPE_NAME = "VSCode Extension" BANNER_NAME = "VSCode (and forks/variants) extensions" class << self ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/cargo.rb
Ruby
bsd-2-clause
47,751
main
3,316
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Cargo < Extension PACKAGE_TYPE = :cargo PACKAGE_TYPE_NAME = "Cargo Package" BANNER_NAME = "Cargo packages" class << self sig { override.void } def rese...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/npm.rb
Ruby
bsd-2-clause
47,751
main
2,550
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Npm < Extension PACKAGE_TYPE = :npm PACKAGE_TYPE_NAME = "npm Package" BANNER_NAME = "npm packages" class << self sig { override.void } def reset! ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/go.rb
Ruby
bsd-2-clause
47,751
main
4,075
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Go < Extension PACKAGE_TYPE = :go PACKAGE_TYPE_NAME = "Go Package" BANNER_NAME = "Go packages" class << self sig { override.void } def reset! ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/krew.rb
Ruby
bsd-2-clause
47,751
main
2,773
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Krew < Extension PACKAGE_TYPE = :krew PACKAGE_TYPE_NAME = "Krew Plugin" BANNER_NAME = "Krew plugins" class << self sig { override.void } def reset! ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/mac_app_store.rb
Ruby
bsd-2-clause
47,751
main
8,497
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class MacAppStore < Extension class App < T::Struct const :id, String const :name, String end CheckablePackages = T.type_alias { T.any(T::Array[Object], T::Hash[Int...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/flatpak.rb
Ruby
bsd-2-clause
47,751
main
17,099
# typed: strict # frozen_string_literal: true require "bundle/extensions/extension" module Homebrew module Bundle class Flatpak < Extension Package = T.type_alias { { name: String, remote: String, remote_url: T.nilable(String) } } PACKAGE_TYPE = :flatpak PACKAGE_TYPE_NAME = "Flatpak" BA...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/extensions/extension.rb
Ruby
bsd-2-clause
47,751
main
12,094
# typed: strict # frozen_string_literal: true require "bundle/package_type" module Homebrew module Bundle ExtensionTypes = T.type_alias { T::Hash[Symbol, T::Boolean] } class Extension < Homebrew::Bundle::PackageType extend T::Helpers abstract! sig { override.params(subclass: T.class_of(...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/install.rb
Ruby
bsd-2-clause
47,751
main
1,333
# typed: strict # frozen_string_literal: true require "bundle/brewfile" require "bundle/installer" module Homebrew module Bundle module Commands module Install sig { params( global: T::Boolean, file: T.nilable(String), no_lock: T::Boolean,...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/dump.rb
Ruby
bsd-2-clause
47,751
main
764
# typed: strict # frozen_string_literal: true require "bundle/dumper" module Homebrew module Bundle module Commands module Dump sig { params(global: T::Boolean, file: T.nilable(String), describe: T::Boolean, force: T::Boolean, no_restart: T::Boolean, taps: T::Boolean, fo...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/list.rb
Ruby
bsd-2-clause
47,751
main
699
# typed: strict # frozen_string_literal: true require "bundle/brewfile" require "bundle/lister" module Homebrew module Bundle module Commands module List sig { params(global: T::Boolean, file: T.nilable(String), formulae: T::Boolean, casks: T::Boolean, taps: T::Boolean, ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/add.rb
Ruby
bsd-2-clause
47,751
main
485
# typed: strict # frozen_string_literal: true require "bundle/adder" module Homebrew module Bundle module Commands module Add sig { params(args: String, type: Symbol, global: T::Boolean, file: T.nilable(String), describe: T::Boolean).void } def self.run(*...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/cleanup.rb
Ruby
bsd-2-clause
47,751
main
10,129
# typed: strict # frozen_string_literal: true require "utils/formatter" require "bundle/dsl" require "bundle/extensions" module Homebrew module Bundle module Commands # Uninstalls formulae, casks, taps, VSCode extensions and Flatpak packages not listed in the Brewfile. module Cleanup sig { v...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/exec.rb
Ruby
bsd-2-clause
47,751
main
12,978
# typed: true # frozen_string_literal: true require "English" require "exceptions" require "extend/ENV" require "utils" require "PATH" require "utils/output" module Homebrew module Bundle module Commands module Exec extend Utils::Output::Mixin PATH_LIKE_ENV_REGEX = /.+#{File::PATH_SEPARAT...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/check.rb
Ruby
bsd-2-clause
47,751
main
1,672
# typed: strict # frozen_string_literal: true require "bundle/checker" module Homebrew module Bundle module Commands module Check sig { params(global: T::Boolean, file: T.nilable(String), no_upgrade: T::Boolean, verbose: T::Boolean, quiet: T::Boolean).void } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/bundle/commands/remove.rb
Ruby
bsd-2-clause
47,751
main
410
# typed: strict # frozen_string_literal: true require "bundle/remover" module Homebrew module Bundle module Commands module Remove sig { params(args: String, type: Symbol, global: T::Boolean, file: T.nilable(String)).void } def self.run(*args, type:, global:, file:) Homebrew::Bun...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/path.rb
Ruby
bsd-2-clause
47,751
main
2,036
# typed: strict # frozen_string_literal: true module Utils module Path sig { params(parent: T.any(Pathname, String), child: T.any(Pathname, String)).returns(T::Boolean) } def self.child_of?(parent, child) parent_pathname = Pathname(parent).expand_path child_pathname = Pathname(child).expand_path ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/linkage.rb
Ruby
bsd-2-clause
47,751
main
550
# typed: strict # frozen_string_literal: true module Utils sig { params(binary: T.any(String, Pathname), library: T.any(String, Pathname)).returns(T::Boolean) } def self.binary_linked_to_library?(binary, library) library = library.to_s library = File.realpath(library) if library.start_with?(HOMEBREW_...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/backtrace.rb
Ruby
bsd-2-clause
47,751
main
1,874
# typed: strict # frozen_string_literal: true require "utils/output" module Utils module Backtrace extend Utils::Output::Mixin @print_backtrace_message = T.let(false, T::Boolean) # Cleans `sorbet-runtime` gem paths from the backtrace unless... # 1. `verbose` is set # 2. first backtrace line st...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/inreplace.rb
Ruby
bsd-2-clause
47,751
main
3,619
# typed: strict # frozen_string_literal: true require "utils/string_inreplace_extension" module Utils # Helper functions for replacing text in files in-place. module Inreplace # Error during text replacement. class Error < RuntimeError sig { params(errors: T::Hash[String, T::Array[String]]).void } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/github.rb
Ruby
bsd-2-clause
47,751
main
33,678
# typed: strict # frozen_string_literal: true require "uri" require "utils/github/actions" require "utils/github/api" require "utils/output" require "system_command" # A module that interfaces with GitHub, code like PAT scopes, credential handling and API errors. # # @api internal module GitHub extend SystemComman...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/pid_path.rb
Ruby
bsd-2-clause
47,751
main
1,742
#!/usr/bin/env ruby # typed: strict # frozen_string_literal: true pid = ARGV[0]&.to_i raise "Missing `pid` argument!" unless pid require "fiddle" # Canonically, this is a part of libproc.dylib. libproc is however just a symlink to libSystem # and some security tools seem to not support aliases from the dyld shared c...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/output.rb
Ruby
bsd-2-clause
47,751
main
9,382
# typed: strict # frozen_string_literal: true module Utils # Helper methods for outputting messages in Homebrew's formats. module Output # Mixin used to add these helpers to stdout and stderr. module Mixin extend T::Helpers requires_ancestor { Kernel } sig { params(title: String).return...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/popen.rb
Ruby
bsd-2-clause
47,751
main
3,623
# typed: strict # frozen_string_literal: true module Utils IO_DEFAULT_BUFFER_SIZE = 4096 private_constant :IO_DEFAULT_BUFFER_SIZE sig { type_parameters(:U) .params( args: T.nilable(T.any(String, Pathname, T::Hash[String, String])), safe: T::Boolean, options: T.nilable(T.a...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/shell.rb
Ruby
bsd-2-clause
47,751
main
6,195
# typed: strict # frozen_string_literal: true module Utils module Shell extend T::Helpers requires_ancestor { Kernel } module_function # Take a path and heuristically convert it to a shell name, # return `nil` if there's no match. sig { params(path: String).returns(T.nilable(Symbol)) } ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/analytics.rb
Ruby
bsd-2-clause
47,751
main
18,489
# typed: strict # frozen_string_literal: true require "context" require "erb" require "settings" require "cachable" require "utils/output" module Utils # Helper module for fetching and reporting analytics data. module Analytics INFLUX_BUCKET = "analytics" INFLUX_TOKEN = "iVdsgJ_OjvTYGAA79gOfWlA_fX0QCuj4eY...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/socket.rb
Ruby
bsd-2-clause
47,751
main
1,457
# typed: strict # frozen_string_literal: true require "socket" module Utils # Wrapper around UNIXSocket to allow > 104 characters on macOS. module UNIXSocketExt extend T::Generic sig { type_parameters(:U).params( path: String, _block: T.proc.params(arg0: UNIXSocket).returns(T.type...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/svn.rb
Ruby
bsd-2-clause
47,751
main
1,835
# typed: strict # frozen_string_literal: true require "system_command" require "utils/output" module Utils # Helper functions for querying SVN information. module Svn class << self include SystemCommand::Mixin include Utils::Output::Mixin sig { returns(T::Boolean) } def available? ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/service.rb
Ruby
bsd-2-clause
47,751
main
2,292
# typed: strict # frozen_string_literal: true module Utils # Helpers for `brew services` related code. module Service # Check if a service is running for a specified formula. sig { params(formula: Formula).returns(T::Boolean) } def self.running?(formula) if launchctl? quiet_system(launchc...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/gzip.rb
Ruby
bsd-2-clause
47,751
main
2,543
# typed: strict # frozen_string_literal: true require "utils/output" module Utils # Helper functions for creating gzip files. module Gzip extend ::Utils::Output::Mixin # Apple's gzip also uses zlib so use the same buffer size here. # https://github.com/apple-oss-distributions/file_cmds/blob/file_cmds...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/shared_audits.rb
Ruby
bsd-2-clause
47,751
main
14,859
# typed: strict # frozen_string_literal: true require "utils/curl" require "utils/github/api" # Auditing functions for rules common to both casks and formulae. module SharedAudits URL_TYPE_HOMEPAGE = "homepage URL" SELF_SUBMISSION_THRESHOLD_MULTIPLIER = 3 GITHUB_NOTABILITY_THRESHOLDS = T.let({ forks: 30, watche...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/gems.rb
Ruby
bsd-2-clause
47,751
main
10,619
# typed: true # rubocop:disable Sorbet/StrictSigil # frozen_string_literal: true # Never `require` anything in this file (except English). It needs to be able to # work as the first item in `brew.rb` so we can load gems with Bundler when # needed before anything else is loaded (e.g. `json`). Homebrew::FastBootRequir...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/tty.rb
Ruby
bsd-2-clause
47,751
main
3,877
# typed: strict # frozen_string_literal: true # Various helper functions for interacting with TTYs. module Tty @stream = T.let($stdout, T.nilable(T.any(IO, StringIO))) COLOR_CODES = T.let( { red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36, ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/git_repository.rb
Ruby
bsd-2-clause
47,751
main
1,542
# typed: strict # frozen_string_literal: true module Utils # Gets the full commit hash of the HEAD commit. sig { params( repo: T.any(String, Pathname), length: T.nilable(Integer), safe: T::Boolean, ).returns(T.nilable(String)) } def self.git_head(repo = Pathname.pwd, length: nil, ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/user.rb
Ruby
bsd-2-clause
47,751
main
880
# typed: strict # frozen_string_literal: true require "delegate" require "etc" require "system_command" # A system user. class User < SimpleDelegator include SystemCommand::Mixin # Return whether the user has an active GUI session. sig { returns(T::Boolean) } def gui? out, _, status = system_command("wh...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/git.rb
Ruby
bsd-2-clause
47,751
main
6,914
# typed: strict # frozen_string_literal: true require "system_command" module Utils # Helper functions for querying Git information. # # @see GitRepository module Git extend SystemCommand::Mixin sig { returns(T::Boolean) } def self.available? !version.null? end sig { returns(Versio...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/attestation.rb
Ruby
bsd-2-clause
47,751
main
2,680
# typed: strict # frozen_string_literal: true require "attestation" require "bottle" require "utils/output" module Utils module Attestation extend Utils::Output::Mixin sig { params(bottle: Bottle, quiet: T::Boolean).void } def self.check_attestation(bottle, quiet: false) ohai "Verifying attestati...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/timer.rb
Ruby
bsd-2-clause
47,751
main
463
# typed: strong # frozen_string_literal: true module Utils module Timer sig { params(time: T.nilable(Time)).returns(T.nilable(T.any(Float, Integer))) } def self.remaining(time) return unless time [0, time - Time.now].max end sig { params(time: T.nilable(Time)).returns(T.nilable(T.any(Fl...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/autoremove.rb
Ruby
bsd-2-clause
47,751
main
4,449
# typed: strict # frozen_string_literal: true module Utils # Helper function for finding autoremovable formulae. # # @private module Autoremove class << self # An array of {Formula} without {Formula} or {Cask} # dependents that weren't installed on request and without # build dependencies...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/tar.rb
Ruby
bsd-2-clause
47,751
main
1,465
# typed: strict # frozen_string_literal: true require "system_command" require "utils/output" module Utils # Helper functions for interacting with tar files. module Tar class << self include SystemCommand::Mixin include Utils::Output::Mixin TAR_FILE_EXTENSIONS = %w[.tar .tb2 .tbz .tbz2 .tgz...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/pypi.rb
Ruby
bsd-2-clause
47,751
main
19,503
# typed: strict # frozen_string_literal: true require "utils/inreplace" require "utils/output" require "utils/ast" require "time" # Helper functions for updating PyPI resources. module PyPI extend Utils::Output::Mixin PYTHONHOSTED_URL_PREFIX = "https://files.pythonhosted.org/packages/" private_constant :PYTHON...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/topological_hash.rb
Ruby
bsd-2-clause
47,751
main
2,182
# typed: strict # frozen_string_literal: true require "tsort" module Utils # Topologically sortable hash map. class TopologicalHash < Hash extend T::Generic include TSort CaskOrFormula = T.type_alias { T.any(Cask::Cask, Formula) } K = type_member { { fixed: CaskOrFormula } } V = type_member ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/bottles.rb
Ruby
bsd-2-clause
47,751
main
12,319
# typed: strict # frozen_string_literal: true require "tab" module Utils # Helper functions for bottles. # # @api internal module Bottles class << self # Gets the tag for the running OS. # # @api internal sig { params(tag: T.nilable(T.any(Symbol, Tag))).returns(Tag) } def tag...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/cpan.rb
Ruby
bsd-2-clause
47,751
main
5,926
# typed: strict # frozen_string_literal: true require "utils/inreplace" require "utils/output" # Helper functions for updating CPAN resources. module CPAN METACPAN_URL_PREFIX = "https://cpan.metacpan.org/authors/id/" CPAN_ARCHIVE_REGEX = /^(.+)-([0-9.v]+)\.(?:tar\.gz|tgz)$/ private_constant :METACPAN_URL_PREFIX...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/curl.rb
Ruby
bsd-2-clause
47,751
main
28,070
# typed: strict # frozen_string_literal: true require "open3" require "utils/timer" require "system_command" module Utils # Helper function for interacting with `curl`. module Curl include SystemCommand::Mixin extend SystemCommand::Mixin include Utils::Output::Mixin extend Utils::Output::Mixin ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/string_inreplace_extension.rb
Ruby
bsd-2-clause
47,751
main
2,625
# typed: strong # frozen_string_literal: true require "utils/output" # Used by the {Utils::Inreplace.inreplace} function. class StringInreplaceExtension include Utils::Output::Mixin sig { returns(T::Array[String]) } attr_accessor :errors sig { returns(String) } attr_accessor :inreplace_string sig { par...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/formatter.rb
Ruby
bsd-2-clause
47,751
main
6,898
# typed: strict # frozen_string_literal: true require "utils/tty" # Helper module for formatting output. # # @api internal module Formatter COMMAND_DESC_WIDTH = 80 OPTION_DESC_WIDTH = 45 sig { params(string: String, color: T.nilable(Symbol)).returns(String) } def self.arrow(string, color: nil) prefix("==...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/utils/spdx.rb
Ruby
bsd-2-clause
47,751
main
8,317
# typed: strict # frozen_string_literal: true require "utils/curl" require "utils/github" # Helper module for updating SPDX license data. module SPDX module_function DATA_PATH = T.let((HOMEBREW_DATA_PATH/"spdx").freeze, Pathname) API_URL = "https://api.github.com/repos/spdx/license-list-data/releases/latest" ...