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/dev-cmd/bump-revision.rb
Ruby
bsd-2-clause
47,751
main
2,686
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" module Homebrew module DevCmd class BumpRevision < AbstractCommand cmd_args do description <<~EOS Create a commit to increment the revision of <formula>. If no revision is present, "revis...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/cat.rb
Ruby
bsd-2-clause
47,751
main
1,904
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class Cat < AbstractCommand include FileUtils cmd_args do description <<~EOS Display the source of a <formula> or <cask>. EOS switch "--formul...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/install-bundler-gems.rb
Ruby
bsd-2-clause
47,751
main
1,140
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class InstallBundlerGems < AbstractCommand cmd_args do description <<~EOS Install Homebrew's Bundler gems. EOS comma_array "--groups", description: "...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/lgtm.rb
Ruby
bsd-2-clause
47,751
main
4,479
# typed: strict # frozen_string_literal: true require "tap" module Homebrew module DevCmd class Lgtm < AbstractCommand include SystemCommand::Mixin cmd_args do description <<~EOS Run `brew typecheck`, `brew style --changed` and the relevant `brew tests`, `brew audit` and...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-perl-resources.rb
Ruby
bsd-2-clause
47,751
main
1,164
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/cpan" module Homebrew module DevCmd class UpdatePerlResources < AbstractCommand cmd_args do description <<~EOS Update versions for CPAN resource blocks in <formula>. EOS switch "-p", "...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/debugger.rb
Ruby
bsd-2-clause
47,751
main
1,403
# typed: strict # frozen_string_literal: true module Homebrew module DevCmd class Debugger < AbstractCommand cmd_args do description <<~EOS Run the specified Homebrew command in debug mode. To pass flags to the command, use `--` to separate them from the `brew` flags. ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/create.rb
Ruby
bsd-2-clause
47,751
main
8,883
# typed: strict # frozen_string_literal: true require "formula" require "formula_creator" require "missing_formula" require "cask/cask_loader" module Homebrew module DevCmd class Create < AbstractCommand cmd_args do description <<~EOS Generate a formula or, with `--cask`, a cask for the ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/bump-cask-pr.rb
Ruby
bsd-2-clause
47,751
main
19,661
# typed: strict # frozen_string_literal: true require "abstract_command" require "bump" require "bump_version_parser" require "cask" require "cask/download" require "livecheck/livecheck" require "livecheck/livecheck_version" require "utils/tar" module Homebrew module DevCmd class BumpCaskPr < AbstractCommand ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/unbottled.rb
Ruby
bsd-2-clause
47,751
main
12,553
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "api" require "os/mac/xcode" module Homebrew module DevCmd class Unbottled < AbstractCommand PORTABLE_FORMULAE = T.let(%w[ portable-libffi portable-libxcrypt portable-libyaml ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-test.rb
Ruby
bsd-2-clause
47,751
main
6,083
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class UpdateTest < AbstractCommand include FileUtils cmd_args do description <<~EOS Run a test of `brew update` with a new repository clone. If no o...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/release.rb
Ruby
bsd-2-clause
47,751
main
9,518
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class Release < AbstractCommand cmd_args do description <<~EOS Create a new draft Homebrew/brew release with the appropriate version number and release notes. By default, `br...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-portable-ruby.rb
Ruby
bsd-2-clause
47,751
main
3,171
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "utils/bottles" module Homebrew module DevCmd class UpdatePortableRuby < AbstractCommand cmd_args do description <<~EOS Update the vendored portable Ruby version files, bottle checksums, ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-zap.rb
Ruby
bsd-2-clause
47,751
main
8,772
# typed: strict # frozen_string_literal: true require "abstract_command" require "cask/cask_loader" module Homebrew module DevCmd class GenerateZap < AbstractCommand cmd_args do description <<~EOS Generate a `zap` stanza for a cask by scanning the system for associated files an...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-internal-api.rb
Ruby
bsd-2-clause
47,751
main
3,315
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "formula" require "cask/cask" module Homebrew module DevCmd class GenerateInternalApi < AbstractCommand cmd_args do description <<~EOS Generate internal API data files for <#{HOMEBREW_API...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-analytics-api.rb
Ruby
bsd-2-clause
47,751
main
5,763
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class GenerateAnalyticsApi < AbstractCommand CATEGORIES = %w[ build-error install install-on-request core-build-error core-install core-install-on-request cask...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/typecheck.rb
Ruby
bsd-2-clause
47,751
main
10,264
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class Typecheck < AbstractCommand include FileUtils cmd_args do description <<~EOS Check for typechecking errors using Sorbet. EOS switch "--f...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/formula.rb
Ruby
bsd-2-clause
47,751
main
760
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" module Homebrew module DevCmd class FormulaCmd < AbstractCommand cmd_args do description <<~EOS Display the path where <formula> is located. EOS named_args :formula, min: 1, withou...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/dispatch-build-bottle.rb
Ruby
bsd-2-clause
47,751
main
3,648
# typed: strict # frozen_string_literal: true require "abstract_command" require "tap" require "utils/bottles" require "utils/github" module Homebrew module DevCmd class DispatchBuildBottle < AbstractCommand cmd_args do description <<~EOS Build bottles for these formulae with GitHub Acti...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-python-resources.rb
Ruby
bsd-2-clause
47,751
main
3,041
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class UpdatePythonResources < AbstractCommand cmd_args do description <<~EOS Update versions for PyPI resource blocks in <formula>. EOS switch "-p", "--print-only", ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-sponsors.rb
Ruby
bsd-2-clause
47,751
main
2,457
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/github" require "system_command" module Homebrew module DevCmd class UpdateSponsors < AbstractCommand include SystemCommand::Mixin NAMED_MONTHLY_AMOUNT = 100 URL_MONTHLY_AMOUNT = 1000 cmd_args do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-formula-api.rb
Ruby
bsd-2-clause
47,751
main
3,541
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "formula" module Homebrew module DevCmd class GenerateFormulaApi < AbstractCommand FORMULA_JSON_TEMPLATE = <<~EOS --- layout: formula_json --- {{ content }} EOS ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/test.rb
Ruby
bsd-2-clause
47,751
main
4,300
# typed: strict # frozen_string_literal: true require "abstract_command" require "extend/ENV" require "sandbox" require "timeout" module Homebrew module DevCmd class Test < AbstractCommand cmd_args do description <<~EOS Run the test method provided by an installed formula. Ther...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/prof.rb
Ruby
bsd-2-clause
47,751
main
2,596
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class Prof < AbstractCommand cmd_args do description <<~EOS Run Homebrew with a Ruby profiler. For example, `brew prof readall`. EOS switch "--stackp...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/rubydoc.rb
Ruby
bsd-2-clause
47,751
main
1,018
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class Rubydoc < AbstractCommand cmd_args do description <<~EOS Generate Homebrew's RubyDoc documentation. EOS switch "--only-public", description: "Only g...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/tap-new.rb
Ruby
bsd-2-clause
47,751
main
9,356
# typed: strict # frozen_string_literal: true require "abstract_command" require "erb" require "fileutils" require "system_command" require "tap" require "utils/uid" module Homebrew module DevCmd class TapNew < AbstractCommand include FileUtils include SystemCommand::Mixin cmd_args do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-man-completions.rb
Ruby
bsd-2-clause
47,751
main
1,535
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "completions" require "manpages" require "system_command" module Homebrew module DevCmd class GenerateManCompletions < AbstractCommand include SystemCommand::Mixin cmd_args do description <<~E...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/generate-cask-ci-matrix.rb
Ruby
bsd-2-clause
47,751
main
14,829
# typed: strict # frozen_string_literal: true require "abstract_command" require "tap" require "utils/github/api" require "cli/parser" require "system_command" module Homebrew module DevCmd class GenerateCaskCiMatrix < AbstractCommand MAX_JOBS = 256 # Weight for each arch must add up to 1.0. ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/bottle.rb
Ruby
bsd-2-clause
47,751
main
35,010
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "formula" require "utils/bottles" require "tab" require "sbom" require "keg" require "formula_versions" require "utils/inreplace" require "erb" require "utils/gzip" require "api" require "extend/hash/deep_merge" requir...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/vendor-gems.rb
Ruby
bsd-2-clause
47,751
main
3,747
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/git" require "fileutils" require "utils/github" module Homebrew module DevCmd class VendorGems < AbstractCommand cmd_args do description <<~EOS Install and commit Homebrew's vendored gems. EOS...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/pr-automerge.rb
Ruby
bsd-2-clause
47,751
main
3,084
# typed: strict # frozen_string_literal: true require "abstract_command" require "tap" require "utils/github" module Homebrew module DevCmd class PrAutomerge < AbstractCommand cmd_args do description <<~EOS Find pull requests that can be automatically merged using `brew pr-publish`. ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/ruby.rb
Ruby
bsd-2-clause
47,751
main
1,105
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class Ruby < AbstractCommand cmd_args do usage_banner "`ruby` [<options>] (`-e` <text>|<file>)" description <<~EOS Run a Ruby instance with Homebrew's libraries loaded. For exam...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/pr-publish.rb
Ruby
bsd-2-clause
47,751
main
2,795
# typed: strict # frozen_string_literal: true require "abstract_command" require "tap" require "utils/github" module Homebrew module DevCmd class PrPublish < AbstractCommand cmd_args do description <<~EOS Publish bottles for a pull request with GitHub Actions. Requires write ac...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/extract.rb
Ruby
bsd-2-clause
47,751
main
9,952
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/git" require "formulary" require "software_spec" require "tap" module Homebrew module DevCmd class Extract < AbstractCommand BOTTLE_BLOCK_REGEX = / bottle (?:do.+?end|:[a-z]+)\n\n/m cmd_args do usage_ba...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/pr-pull.rb
Ruby
bsd-2-clause
47,751
main
24,796
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "utils/github" require "utils/github/artifacts" require "tmpdir" require "formula" module Homebrew module DevCmd class PrPull < AbstractCommand include FileUtils cmd_args do description <<~E...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/bump-formula-pr.rb
Ruby
bsd-2-clause
47,751
main
37,012
# typed: strict # frozen_string_literal: true require "abstract_command" require "bump" require "fileutils" require "formula" require "livecheck/livecheck" require "utils/inreplace" require "utils/tar" module Homebrew module DevCmd class BumpFormulaPr < AbstractCommand cmd_args do description <<~E...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/unpack.rb
Ruby
bsd-2-clause
47,751
main
3,928
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "stringio" require "formula" require "cask/download" require "unpack_strategy" module Homebrew module DevCmd class Unpack < AbstractCommand include FileUtils cmd_args do description <<~EOS ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/bump.rb
Ruby
bsd-2-clause
47,751
main
39,031
# typed: strict # frozen_string_literal: true require "abstract_command" require "bump_version_parser" require "livecheck/livecheck" require "utils/curl" require "utils/repology" module Homebrew module DevCmd class Bump < AbstractCommand MIN_RELEASE_AGE_DAYS = 1 DEFAULT_CURL_ARGS = T.let([ "...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/bump-unversioned-casks.rb
Ruby
bsd-2-clause
47,751
main
5,595
# typed: strict # frozen_string_literal: true require "timeout" require "cask/download" require "cask/installer" require "cask/cask_loader" require "system_command" require "tap" require "unversioned_cask_checker" module Homebrew module DevCmd class BumpUnversionedCasks < AbstractCommand include SystemCom...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/pr-upload.rb
Ruby
bsd-2-clause
47,751
main
6,741
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "github_packages" require "github_releases" require "extend/hash/deep_merge" module Homebrew module DevCmd class PrUpload < AbstractCommand cmd_args do description <<~EOS Apply the bottle c...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/irb.rb
Ruby
bsd-2-clause
47,751
main
1,848
# typed: strict # frozen_string_literal: true require "abstract_command" module Homebrew module DevCmd class Irb < AbstractCommand cmd_args do description <<~EOS Enter the interactive Homebrew Ruby shell. EOS switch "--examples", description: "Show several ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/audit.rb
Ruby
bsd-2-clause
47,751
main
15,161
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "utils/curl" require "utils/github/actions" require "utils/spdx" require "extend/ENV" require "formula_cellar_checks" require "cmd/search" require "style" require "date" require "missing_formula" require "digest" require...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/verify.rb
Ruby
bsd-2-clause
47,751
main
3,024
# typed: strict # frozen_string_literal: true require "abstract_command" require "attestation" module Homebrew module DevCmd class Verify < AbstractCommand cmd_args do description <<~EOS Verify the build provenance of bottles using GitHub's attestation tools. This is done by fi...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/test-bot.rb
Ruby
bsd-2-clause
47,751
main
7,245
# typed: strict # frozen_string_literal: true require "abstract_command" require "test_bot" module Homebrew module Cmd class TestBotCmd < AbstractCommand cmd_args do usage_banner <<~EOS `test-bot` [<options>] [<formula>] Tests the full lifecycle of a Homebrew change to a tap (...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-license-data.rb
Ruby
bsd-2-clause
47,751
main
788
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/spdx" require "system_command" module Homebrew module DevCmd class UpdateLicenseData < AbstractCommand include SystemCommand::Mixin cmd_args do description <<~EOS Update SPDX license data in th...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/sh.rb
Ruby
bsd-2-clause
47,751
main
3,885
# typed: strict # frozen_string_literal: true require "abstract_command" require "extend/ENV" require "formula" require "utils/gems" require "utils/shell" module Homebrew module DevCmd class Sh < AbstractCommand cmd_args do description <<~EOS Enter an interactive shell for Homebrew's bui...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/livecheck.rb
Ruby
bsd-2-clause
47,751
main
6,366
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" require "livecheck/livecheck" require "livecheck/strategy" module Homebrew module DevCmd class LivecheckCmd < AbstractCommand cmd_args do description <<~EOS Check for newer versions of formulae and...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/edit.rb
Ruby
bsd-2-clause
47,751
main
5,692
# typed: strict # frozen_string_literal: true require "abstract_command" require "formula" module Homebrew module DevCmd class Edit < AbstractCommand cmd_args do description <<~EOS Open a <formula>, <cask> or <tap> in the editor set by `$EDITOR` or `$HOMEBREW_EDITOR`, or open t...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/determine-test-runners.rb
Ruby
bsd-2-clause
47,751
main
2,570
# typed: strict # frozen_string_literal: true require "abstract_command" require "test_runner_formula" require "github_runner_matrix" module Homebrew module DevCmd class DetermineTestRunners < AbstractCommand cmd_args do usage_banner <<~EOS `determine-test-runners` {<testing-formulae> [<...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/tests.rb
Ruby
bsd-2-clause
47,751
main
12,305
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" require "hardware" require "system_command" module Homebrew module DevCmd class Tests < AbstractCommand include SystemCommand::Mixin cmd_args do description <<~EOS Run Homebrew's unit and ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/rubocop.rb
Ruby
bsd-2-clause
47,751
main
342
# typed: strict # frozen_string_literal: true require "abstract_command" require "shell_command" module Homebrew module DevCmd class Rubocop < AbstractCommand include ShellCommand cmd_args do description <<~EOS Installs, configures and runs Homebrew's `rubocop`. EOS ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/style.rb
Ruby
bsd-2-clause
47,751
main
3,810
# typed: strict # frozen_string_literal: true require "abstract_command" require "json" require "open3" require "style" module Homebrew module DevCmd class StyleCmd < AbstractCommand cmd_args do description <<~EOS Check formulae or files for conformance to Homebrew style guidelines. ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/update-maintainers.rb
Ruby
bsd-2-clause
47,751
main
1,914
# typed: strict # frozen_string_literal: true require "abstract_command" require "utils/github" require "manpages" require "system_command" module Homebrew module DevCmd class UpdateMaintainers < AbstractCommand include SystemCommand::Mixin cmd_args do description <<~EOS Update th...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/which-update.rb
Ruby
bsd-2-clause
47,751
main
5,370
# typed: strict # frozen_string_literal: true # License: MIT # The license text can be found in Library/Homebrew/command-not-found/LICENSE require "abstract_command" require "executables_db" module Homebrew module DevCmd class WhichUpdate < AbstractCommand cmd_args do description <<~EOS ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/dev-cmd/formula-analytics.rb
Ruby
bsd-2-clause
47,751
main
16,978
# typed: strict # frozen_string_literal: true require "abstract_command" require "fileutils" module Homebrew module DevCmd class FormulaAnalytics < AbstractCommand cmd_args do usage_banner <<~EOS `formula-analytics` Query Homebrew's analytics. EOS flag "--day...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dependencies_spec.rb
Ruby
bsd-2-clause
47,751
main
2,299
# typed: false # frozen_string_literal: true require "dependencies" require "dependency" RSpec.describe Dependencies do subject(:dependencies) { described_class.new } describe "#<<" do it "returns itself" do expect(dependencies << Dependency.new("foo")).to eq(dependencies) end it "preserves or...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/abstract_command_spec.rb
Ruby
bsd-2-clause
47,751
main
2,035
# typed: false # frozen_string_literal: true require "abstract_command" RSpec.describe Homebrew::AbstractCommand do describe "subclasses" do before do test_cat = Class.new(described_class) do cmd_args do description "test" switch "--foo" flag "--bar=" end ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/system_command_result_spec.rb
Ruby
bsd-2-clause
47,751
main
4,838
# typed: false # frozen_string_literal: true require "system_command" RSpec.describe SystemCommand::Result do RSpec::Matchers.alias_matcher :a_string_containing, :include subject(:result) do described_class.new([], output_array, instance_double(Process::Status, exitstatus: 0, success?: true), ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/build_options_spec.rb
Ruby
bsd-2-clause
47,751
main
1,304
# typed: false # frozen_string_literal: true require "build_options" require "options" RSpec.describe BuildOptions do alias_matcher :be_built_with, :be_with alias_matcher :be_built_without, :be_without subject(:build_options) { described_class.new(args, opts) } let(:bad_build) { described_class.new(bad_args...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dependable_spec.rb
Ruby
bsd-2-clause
47,751
main
1,319
# typed: false # frozen_string_literal: true require "dependable" RSpec.describe Dependable do alias_matcher :be_a_build_dependency, :be_build subject(:dependable) do Class.new do include Dependable def initialize @tags = ["foo", "bar", :build] end end.new end specify "#op...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bottle_filename_spec.rb
Ruby
bsd-2-clause
47,751
main
1,813
# typed: false # frozen_string_literal: true require "formula" require "software_spec" RSpec.describe Bottle::Filename do subject(:filename) { described_class.new(name, version, tag, rebuild) } let(:name) { "user/repo/foo" } let(:version) { PkgVersion.new(Version.new("1.0"), 0) } let(:tag) { Utils::Bottles::...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/requirement_spec.rb
Ruby
bsd-2-clause
47,751
main
7,001
# typed: false # frozen_string_literal: true require "extend/ENV" require "requirement" RSpec.describe Requirement do alias_matcher :be_a_build_requirement, :be_a_build subject(:requirement) { klass.new } let(:klass) { Class.new(described_class) } describe "base class" do it "raises an error when insta...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/utils_spec.rb
Ruby
bsd-2-clause
47,751
main
7,675
# typed: false # frozen_string_literal: true require "utils" RSpec.describe Utils do describe ".deconstantize" do it "removes the rightmost segment from the constant expression in the string" do expect(described_class.deconstantize("Net::HTTP")).to eq("Net") expect(described_class.deconstantize("::N...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/compiler_failure_spec.rb
Ruby
bsd-2-clause
47,751
main
2,319
# typed: false # frozen_string_literal: true require "compilers" RSpec.describe CompilerFailure do alias_matcher :fail_with, :be_fails_with describe "::create" do it "creates a failure when given a symbol" do failure = described_class.create(:clang) expect(failure).to fail_with( instance_...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/diagnostic_checks_spec.rb
Ruby
bsd-2-clause
47,751
main
5,630
# typed: false # frozen_string_literal: true require "diagnostic" RSpec.describe Homebrew::Diagnostic::Checks do subject(:checks) { described_class.new } specify "#inject_file_list" do expect(checks.inject_file_list([], "foo:\n")).to eq("foo:\n") expect(checks.inject_file_list(%w[/a /b], "foo:\n")).to eq...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/linkage_cache_store_spec.rb
Ruby
bsd-2-clause
47,751
main
1,999
# typed: false # frozen_string_literal: true require "linkage_cache_store" RSpec.describe LinkageCacheStore do subject(:linkage_cache) { described_class.new(keg_name, database) } let(:keg_name) { "keg_name" } let(:database) { instance_double(CacheStoreDatabase, "database") } describe "#keg_exists?" do c...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/formula_spec.rb
Ruby
bsd-2-clause
47,751
main
74,836
# typed: false # frozen_string_literal: true require "test/support/fixtures/testball" require "formula" PHASES = [:build, :postinstall, :test].freeze # These tests need to duplicate methods. RSpec.describe Formula do alias_matcher :follow_installed_alias, :be_follow_installed_alias alias_matcher :have_any_versio...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/completions_spec.rb
Ruby
bsd-2-clause
47,751
main
18,318
# typed: false # frozen_string_literal: true require "completions" RSpec.describe Homebrew::Completions do let(:completions_dir) { HOMEBREW_REPOSITORY/"completions" } let(:internal_path) { HOMEBREW_REPOSITORY/"Library/Taps/homebrew/homebrew-bar" } let(:external_path) { HOMEBREW_REPOSITORY/"Library/Taps/foo/home...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/cxxstdlib_spec.rb
Ruby
bsd-2-clause
47,751
main
405
# typed: false # frozen_string_literal: true require "formula" require "cxxstdlib" RSpec.describe CxxStdlib do let(:clang) { described_class.create(:libstdcxx, :clang) } let(:lcxx) { described_class.create(:libcxx, :clang) } describe "#type_string" do specify "formatting" do expect(clang.type_string)...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bash_spec.rb
Ruby
bsd-2-clause
47,751
main
1,587
# typed: false # frozen_string_literal: true require "open3" RSpec.describe "Bash" do matcher :have_valid_bash_syntax do match do |file| stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file) @actual = [file, stderr] stdout.empty? && status.success? end failure_message do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/global_spec.rb
Ruby
bsd-2-clause
47,751
main
290
# typed: false # frozen_string_literal: true RSpec.describe Homebrew, :integration_test do it "does not require slow dependencies at startup" do expect { brew "verify-undefined" } .to not_to_output.to_stdout .and not_to_output.to_stderr .and be_a_success end end
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/lazy_object_spec.rb
Ruby
bsd-2-clause
47,751
main
825
# typed: false # frozen_string_literal: true require "lazy_object" RSpec.describe LazyObject do describe "#initialize" do it "does not evaluate the block" do expect do |block| described_class.new(&block) end.not_to yield_control end end describe "when receiving a message" do it ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/settings_spec.rb
Ruby
bsd-2-clause
47,751
main
1,958
# typed: false # frozen_string_literal: true require "settings" RSpec.describe Homebrew::Settings do before do HOMEBREW_REPOSITORY.cd do system "git", "init" end end def setup_setting HOMEBREW_REPOSITORY.cd do system "git", "config", "--replace-all", "homebrew.foo", "true" end end...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/attestation_spec.rb
Ruby
bsd-2-clause
47,751
main
13,278
# typed: false # frozen_string_literal: true require "diagnostic" RSpec.describe Homebrew::Attestation do let(:fake_gh) { Pathname.new("/extremely/fake/gh") } let(:fake_old_gh) { Pathname.new("/extremely/fake/old/gh") } let(:fake_gh_creds) { "fake-gh-api-token" } let(:fake_error_status) { instance_double(Proc...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/livecheck_spec.rb
Ruby
bsd-2-clause
47,751
main
8,856
# typed: false # frozen_string_literal: true require "formula" require "livecheck" RSpec.describe Livecheck do let(:f) do formula do homepage "https://brew.sh" url "https://brew.sh/test-0.0.1.tgz" head "https://github.com/Homebrew/brew.git", branch: "main" end end let(:livecheck_f) { d...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dependencies_helpers_spec.rb
Ruby
bsd-2-clause
47,751
main
942
# typed: false # frozen_string_literal: true require "dependencies_helpers" RSpec.describe DependenciesHelpers do specify "#dependents" do foo = formula "foo" do url "foo" version "1.0" end foo_cask = Cask::CaskLoader.load(+<<-RUBY) cask "foo_cask" do end RUBY bar = for...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/keg_spec.rb
Ruby
bsd-2-clause
47,751
main
9,848
# typed: false # frozen_string_literal: true require "keg" require "stringio" RSpec.describe Keg do include FileUtils def setup_test_keg(name, version) path = HOMEBREW_CELLAR/name/version (path/"bin").mkpath %w[hiworld helloworld goodbye_cruel_world].each do |file| touch path/"bin"/file en...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/formulary_spec.rb
Ruby
bsd-2-clause
47,751
main
32,898
# typed: false # frozen_string_literal: true require "formula" require "formula_installer" require "utils/bottles" # rubocop:todo RSpec/AggregateExamples RSpec.describe Formulary do let(:formula_name) { "testball_bottle" } let(:formula_path) { CoreTap.instance.new_formula_path(formula_name) } let(:formula_conte...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/migrator_spec.rb
Ruby
bsd-2-clause
47,751
main
8,281
# typed: false # frozen_string_literal: true require "migrator" require "test/support/fixtures/testball" require "tab" require "keg" RSpec.describe Migrator do subject(:migrator) { described_class.new(new_formula, old_formula.name) } let(:new_formula) { Testball.new("newname") } let(:old_formula) { Testball.ne...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bump_version_parser_spec.rb
Ruby
bsd-2-clause
47,751
main
5,152
# typed: false # frozen_string_literal: true require "bump_version_parser" RSpec.describe Homebrew::BumpVersionParser do let(:general_version) { "1.2.3" } let(:intel_version) { "2.3.4" } let(:arm_version) { "3.4.5" } context "when initializing with no versions" do it "raises a usage error" do expec...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bundle_version_spec.rb
Ruby
bsd-2-clause
47,751
main
2,606
# typed: false # frozen_string_literal: true require "bundle_version" RSpec.describe Homebrew::BundleVersion do describe "#<=>" do it "compares both the `short_version` and `version`" do expect(described_class.new("1.2.3", "3000")).to be < described_class.new("1.2.3", "4000") expect(described_class....
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/requirements_spec.rb
Ruby
bsd-2-clause
47,751
main
468
# typed: false # frozen_string_literal: true require "requirements" RSpec.describe Requirements do subject(:requirements) { described_class.new } describe "#<<" do it "returns itself" do expect(requirements << Class.new(Requirement).new).to be(requirements) end it "merges duplicate requirement...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/dependency_expansion_spec.rb
Ruby
bsd-2-clause
47,751
main
4,458
# typed: false # frozen_string_literal: true require "dependency" RSpec.describe Dependency do def build_dep(name, tags = [], deps = []) dep = described_class.new(name.to_s, tags) allow(dep).to receive(:to_formula).and_return \ instance_double(Formula, deps:, name:, full_name: name) dep end l...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/style_spec.rb
Ruby
bsd-2-clause
47,751
main
4,762
# typed: false # frozen_string_literal: true require "style" RSpec.describe Homebrew::Style do around do |example| FileUtils.ln_s HOMEBREW_LIBRARY_PATH, HOMEBREW_LIBRARY/"Homebrew" FileUtils.ln_s HOMEBREW_LIBRARY_PATH.parent/".rubocop.yml", HOMEBREW_LIBRARY/".rubocop.yml" example.run ensure FileU...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/bottle_spec.rb
Ruby
bsd-2-clause
47,751
main
561
# typed: false # frozen_string_literal: true require "bottle_specification" require "test/support/fixtures/testball_bottle" RSpec.describe Bottle do describe "#filename" do it "renders the bottle filename" do bottle_spec = BottleSpecification.new bottle_spec.sha256(arm64_big_sur: "deadbeef" * 8) ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/git_repository_spec.rb
Ruby
bsd-2-clause
47,751
main
3,242
# typed: false # frozen_string_literal: true require "git_repository" RSpec.describe GitRepository do subject(:git_repo) { described_class.new(clone_path) } let(:branch_name) { "main" } let(:tag_name) { branch_name } let(:repo_root) { mktmpdir } let(:remote_path) { repo_root/"origin.git" } let(:work_path...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/linux_runner_spec_spec.rb
Ruby
bsd-2-clause
47,751
main
740
# typed: false # frozen_string_literal: true require "linux_runner_spec" RSpec.describe LinuxRunnerSpec do let(:spec) do described_class.new( name: "Linux", runner: "ubuntu-latest", container: { image: "ghcr.io/homebrew/brew:main", options: "--user=linuxbrew" }, workdir: "/gith...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/rubocop_spec.rb
Ruby
bsd-2-clause
47,751
main
833
# typed: false # frozen_string_literal: true require "open3" require "yaml" RSpec.describe "RuboCop" do context "when calling `rubocop` outside of the Homebrew environment" do before do ENV.each_key do |key| allowlist = %w[ HOMEBREW_TESTS HOMEBREW_USE_RUBY_FROM_PATH H...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/checksum_verification_spec.rb
Ruby
bsd-2-clause
47,751
main
809
# typed: false # frozen_string_literal: true require "formula" RSpec.describe Formula do def formula(&block) super do url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" instance_eval(&block) end end describe "#brew" do it "does not raise an error when the checksum matches" do ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/commands_spec.rb
Ruby
bsd-2-clause
47,751
main
3,075
# typed: false # frozen_string_literal: true require "commands" # These shared contexts starting with `when` don't make sense. RSpec.shared_context "custom internal commands" do # rubocop:disable RSpec/ContextWording let(:tmpdir) { mktmpdir } let(:cmd_path) { tmpdir/"cmd" } let(:dev_cmd_path) { tmpdir/"dev-cmd"...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/mcp_server_spec.rb
Ruby
bsd-2-clause
47,751
main
8,016
# typed: false # frozen_string_literal: true require "mcp_server" require "stringio" require "timeout" RSpec.describe Homebrew::McpServer do let(:stdin) { StringIO.new } let(:stdout) { StringIO.new } let(:stderr) { StringIO.new } let(:server) { described_class.new(stdin:, stdout:, stderr:) } let(:jsonrpc) {...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/cleaner_spec.rb
Ruby
bsd-2-clause
47,751
main
6,979
# typed: false # frozen_string_literal: true require "cleaner" require "formula" RSpec.describe Cleaner do include FileUtils describe "#clean" do subject(:cleaner) { described_class.new(f) } let(:f) { formula("cleaner_test") { url "foo-1.0" } } before do f.prefix.mkpath end it "clean...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/free_port_spec.rb
Ruby
bsd-2-clause
47,751
main
699
# typed: false # frozen_string_literal: true require "socket" require "formula_free_port" RSpec.describe Homebrew::FreePort do subject(:instance) { Object.new.extend(described_class) } describe "#free_port" do it "returns a free TCP/IP port" do # IANA recommends: # - User ports: 1024–49151 ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/patch_spec.rb
Ruby
bsd-2-clause
47,751
main
2,811
# typed: false # frozen_string_literal: true require "patch" RSpec.describe Patch do describe "#create" do context "with a simple patch" do subject(:patch) { described_class.create(:p2, nil) } specify(:aggregate_failures) do expect(subject).to be_a ExternalPatch # rubocop:todo RSpec/NamedSu...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/checksum_spec.rb
Ruby
bsd-2-clause
47,751
main
669
# typed: false # frozen_string_literal: true require "checksum" RSpec.describe Checksum do describe "#empty?" do subject { described_class.new("") } it { is_expected.to be_empty } end describe "#==" do subject { described_class.new(TEST_SHA256) } let(:other) { described_class.new(TEST_SHA256)...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/description_cache_store_spec.rb
Ruby
bsd-2-clause
47,751
main
2,924
# typed: false # frozen_string_literal: true require "cmd/update-report" require "description_cache_store" RSpec.describe DescriptionCacheStore do subject(:cache_store) { described_class.new(database) } let(:database) { instance_double(CacheStoreDatabase, "database") } let(:formula_name) { "test_name" } let(...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/macos_runner_spec_spec.rb
Ruby
bsd-2-clause
47,751
main
548
# typed: false # frozen_string_literal: true require "macos_runner_spec" RSpec.describe MacOSRunnerSpec do let(:spec) { described_class.new(name: "macOS 11-arm64", runner: "11-arm64", timeout: 90, cleanup: true) } it "has immutable attributes" do [:name, :runner, :timeout, :cleanup].each do |attribute| ...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/api_spec.rb
Ruby
bsd-2-clause
47,751
main
7,466
# typed: false # frozen_string_literal: true require "api" RSpec.describe Homebrew::API do let(:text) { "foo" } let(:json) { '{"foo":"bar"}' } let(:json_hash) { JSON.parse(json) } let(:json_invalid) { '{"foo":"bar"' } def mock_curl_output(stdout: "", success: true) curl_output = instance_double(SystemC...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/locale_spec.rb
Ruby
bsd-2-clause
47,751
main
4,322
# typed: false # frozen_string_literal: true require "locale" RSpec.describe Locale do describe "::parse" do it "parses a string in the correct format" do expect(described_class.parse("zh")).to eql(described_class.new("zh", nil, nil)) expect(described_class.parse("zh-CN")).to eql(described_class.new...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/formula_installer_bottle_spec.rb
Ruby
bsd-2-clause
47,751
main
3,085
# typed: false # frozen_string_literal: true require "formula" require "formula_installer" require "keg" require "tab" require "cmd/install" require "test/support/fixtures/testball" require "test/support/fixtures/testball_bottle" require "test/support/fixtures/testball_bottle_cellar" RSpec.describe FormulaInstaller d...
github
Homebrew/brew
https://github.com/Homebrew/brew
Library/Homebrew/test/options_spec.rb
Ruby
bsd-2-clause
47,751
main
2,822
# typed: false # frozen_string_literal: true require "options" RSpec.describe Options do subject(:options) { described_class.new } it "removes duplicate options" do options << Option.new("foo") options << Option.new("foo") expect(options).to include("--foo") expect(options.count).to eq(1) end ...